GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — importlib.abc.Traversable.name does not match · Issue #89896 · python/cpython

importlib.abc.Traversable.name does not match #89896

New issue
Copy link
New issue
Copy link
Closed
Closed
importlib.abc.Traversable.name does not match#89896
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifetopic-importlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

jmg
mannequin
opened on Nov 6, 2021
Issue body actions
BPO 45733

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 = None
created_at = <Date 2021-11-06.01:23:27.490>
labels = ['type-bug', '3.9', '3.10', '3.11']
title = 'importlib.abc.Traversable.name does not match'
updated_at = <Date 2021-11-06.01:23:27.490>
user = 'https://bugs.python.org/jmg'

bugs.python.org fields:

activity = <Date 2021-11-06.01:23:27.490>
actor = 'jmg'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2021-11-06.01:23:27.490>
creator = 'jmg'
dependencies = []
files = []
hgrepos = []
issue_num = 45733
keywords = []
message_count = 1.0
messages = ['405837']
nosy_count = 1.0
nosy_names = ['jmg']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue45733'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

Activity

  1. jmg commented on Nov 6, 2021

    @jmg
    jmgmannequin
    on Nov 6, 2021
    MannequinAuthor
    More actions

    The documentation for Traversable.name says it is a method, not a property:
    https://docs.python.org/3/library/importlib.html#importlib.abc.Traversable.name

    The issue is that with Python 3.9.7 (default, Nov 1 2021, 11:26:33), using a standard posix module (on MacOSX), it returns a string and not a method. I have not tested on newer versions, but expect similar issues. I have tagged the newer versions to get exposure, feel free to untag the versions that are confirmed to be unaffected by this bug.

    $ python3.9
    Python 3.9.7 (default, Nov  1 2021, 11:26:33) 
    [Clang 7.0.2 (clang-700.1.81)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import mod
    <class 'str'>
    >>> ^D
    

    This is with a module dir named mod, w/ an empty res.txt file, and the following in __init__.py:

    from importlib import resources
    
    r = resources.files(__name__) / 'res.txt'
    
    print(repr(type(r.name)))
    
  2. jmg
    added
    3.9 (EOL)end of lifeend of life
    3.10 (EOL)end of lifeend of life
    3.11only security fixesonly security fixes
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Nov 6, 2021
  3. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  4. hauntsaninja
    added
    topic-importlib
    on May 3, 2022
  5. warsaw commented on Jun 10, 2022

    @warsaw
    warsaw
    on Jun 10, 2022
    Member
    More actions

    Yikes! I just ran into this too. I'll test it on newer versions and submit a PR. Should be an easy documentation fix.

  6. warsaw commented on Jun 10, 2022

    @warsaw
    warsaw
    on Jun 10, 2022
    Member
    More actions

    Well, not so easy apparently because of the importlib docs got reorg'd in main, so it'll take a couple of PRs most likely.

  7. warsaw commented on Jun 10, 2022

    @warsaw
    warsaw
    on Jun 10, 2022
    Member
    More actions

    Turns out, this is fixed in main but there's another problem (#93610) for which I created a PR first.

  8. warsaw
    added 3 commits that reference this issue on Jun 10, 2022

    `importlib.abc.Traversable.name` is an attribute, not a method

    This issue will close once commit a43d8dc is merged into the 'main' branch.
    a43d8dc

    pythongh-89896: `importlib.abc.Traversable.name` is an attribute, not…

    This issue will close once commit 1f47e59 is merged into the 'main' branch.
    1f47e59
  9. jaraco commented on Nov 26, 2022

    @jaraco
    jaraco
    on Nov 26, 2022
    Member
    More actions

    Looks like this work was done. Thanks warsaw and jmg. Please comment or re-open if the issue remains.

  10. jaraco
    closed this as completedon Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifetopic-importlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.