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 — deprecate pydoc.ispackage() · Issue #64020 · python/cpython

deprecate pydoc.ispackage() #64020

New issue
Copy link
New issue
Copy link
Closed
Closed
deprecate pydoc.ispackage()#64020
Copy link
Labels
3.13only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@ericsnowcurrently
ericsnowcurrently
opened on Nov 28, 2013
Issue body actions
BPO 19821
Nosy @PCManticore, @ericsnowcurrently, @wm75, @ZackerySpytz
PRs
  • gh-64020: Deprecate pydoc.ispackage() #20908
  • 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 2013-11-28.07:55:30.790>
    labels = ['type-feature', 'library', '3.11']
    title = 'deprecate pydoc.ispackage()'
    updated_at = <Date 2021-05-21.20:20:33.155>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2021-05-21.20:20:33.155>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2013-11-28.07:55:30.790>
    creator = 'eric.snow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 19821
    keywords = ['patch']
    message_count = 3.0
    messages = ['204646', '204697', '221548']
    nosy_count = 4.0
    nosy_names = ['Claudiu.Popa', 'eric.snow', 'wolma', 'ZackerySpytz']
    pr_nums = ['20908']
    priority = 'low'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue19821'
    versions = ['Python 3.11']

    Activity

    1. ericsnowcurrently commented on Nov 28, 2013

      @ericsnowcurrently
      ericsnowcurrently
      on Nov 28, 2013
      MemberAuthor
      More actions

      pydoc.ispackage() is a best-effort guess at whether or not a path is the location of a package. However, it uses hard-coded suffixes when matching file names, which can miss files (e.g. extension modules and sourceless packages on Windows). It should probably use suffixes defined in importlib.util, as they're used elsewhere in pydoc. The function also does not comprehend namespace packages, but I'm not sure that's worth worrying about.

      FWIW, it isn't clear to me what is using pydoc.ispackage(). It may not be used in the stdlib at all.

    2. ericsnowcurrently
      added
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancementA feature request or enhancement
      on Nov 28, 2013
    3. PCManticore commented on Nov 28, 2013

      @PCManticore
      PCManticoremannequin
      on Nov 28, 2013
      Mannequin
      More actions

      It was used by pydoc.py until 2006, when it was removed with this commit:

      Changeset:
      37821 (3135648026c4) Second phase of refactoring for runpy, pkgutil, pydoc, and setuptools.

      Is it worth to fix this?

    4. PCManticore commented on Jun 25, 2014

      @PCManticore
      PCManticoremannequin
      on Jun 25, 2014
      Mannequin
      More actions

      I would go on the deprecation route with this and removing it in 3.6, just like the formatter module.

    5. iritkatriel
      added
      3.11only security fixesonly security fixes
      on May 21, 2021
    6. iritkatriel
      changed the title [-]pydoc.ispackage() could be more accurate[/-] [+]deprecate pydoc.ispackage()[/+] on May 21, 2021
    7. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    8. hugovk commented on May 5, 2023

      @hugovk
      hugovk
      on May 5, 2023
      Member
      More actions

      Searching the top 5k PyPI packages shows only a single use:

      ❯ python3 ~/github/misc/cpython/search_pypi_top.py -q . "pydoc.*ispackage"
      ./PyDispatcher-2.0.7.tar.gz: PyDispatcher-2.0.7/docs/pydoc/pydoc2.py: elif pydoc.ispackage(path):
      ./PyDispatcher-2.0.7.tar.gz: PyDispatcher-2.0.7/docs/pydoc/pydoc2.py: elif pydoc.ispackage(path):
    9. hugovk
      added
      3.12only security fixesonly security fixes
      and removed
      3.11only security fixesonly security fixes
      on May 5, 2023
    10. serhiy-storchaka
      added a commit that references this issue on Dec 27, 2023

      gh-64020: Deprecate pydoc.ispackage() (GH-20908)

      1ddd773
    11. serhiy-storchaka
      added
      3.13only security fixesonly security fixes
      and removed
      3.12only security fixesonly security fixes
      on Dec 27, 2023
    12. serhiy-storchaka
      closed this as completedon Dec 27, 2023
    13. kulikjak
      added a commit that references this issue on Jan 22, 2024

      pythongh-64020: Deprecate pydoc.ispackage() (pythonGH-20908)

      c583a57
    14. aisk
      added a commit that references this issue on Feb 11, 2024

      pythongh-64020: Deprecate pydoc.ispackage() (pythonGH-20908)

      3a98318
    15. Glyphack
      added a commit that references this issue on Sep 2, 2024

      pythongh-64020: Deprecate pydoc.ispackage() (pythonGH-20908)

      4d4ee3f
    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.13only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — 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.