Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DegenerateFiles.Path mismatch to Traversable interface #89582

Closed
jaraco opened this issue Oct 10, 2021 · 2 comments
Closed

DegenerateFiles.Path mismatch to Traversable interface #89582

jaraco opened this issue Oct 10, 2021 · 2 comments
Labels
3.10 only security fixes stdlib Python modules in the Lib dir

Comments

@jaraco
Copy link
Member

jaraco commented Oct 10, 2021

BPO 45419
Nosy @brettcannon, @jaraco, @ncoghlan, @ericsnowcurrently, @miss-islington
PRs
  • [3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path #28844
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-10-10.14:24:01.519>
    created_at = <Date 2021-10-10.00:38:04.030>
    labels = ['library', '3.10']
    title = 'DegenerateFiles.Path mismatch to Traversable interface'
    updated_at = <Date 2021-10-10.14:24:01.518>
    user = 'https://github.com/jaraco'

    bugs.python.org fields:

    activity = <Date 2021-10-10.14:24:01.518>
    actor = 'jaraco'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-10.14:24:01.519>
    closer = 'jaraco'
    components = ['Library (Lib)']
    creation = <Date 2021-10-10.00:38:04.030>
    creator = 'jaraco'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45419
    keywords = ['patch']
    message_count = 2.0
    messages = ['403564', '403589']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'jaraco', 'ncoghlan', 'eric.snow', 'miss-islington']
    pr_nums = ['28844']
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue45419'
    versions = ['Python 3.10']

    @jaraco
    Copy link
    Member Author

    jaraco commented Oct 10, 2021

    In pytest-dev/pytest#9174, it became clear that the DegenerateFiles object has a couple of interface mismatches to Traversable:

    • name is a property
    • open accepts a 'mode' and arbitrary args and kwargs.

    Because DegenerateFiles is an intentionally broken handle (when a resource provider is unavailable), there's little harm in the interface being broken, and the interface is already gone in Python 3.11, so the urgency of fixing this is small.

    @jaraco jaraco added 3.10 only security fixes labels Oct 10, 2021
    @serhiy-storchaka serhiy-storchaka added stdlib Python modules in the Lib dir 3.11 only security fixes type-bug An unexpected behavior, bug, or error and removed 3.11 only security fixes labels Oct 10, 2021
    @miss-islington
    Copy link
    Contributor

    New changeset 14a483a by Jason R. Coombs in branch '3.10':
    [3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)
    14a483a

    @jaraco jaraco closed this as completed Oct 10, 2021
    @jaraco jaraco removed the type-bug An unexpected behavior, bug, or error label Oct 10, 2021
    @jaraco jaraco closed this as completed Oct 10, 2021
    @jaraco jaraco removed the type-bug An unexpected behavior, bug, or error label Oct 10, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants