FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

useless code in zipimport can be dropped · Issue #140324 · python/cpython · GitHub

Repository navigation

useless code in zipimport can be dropped #140324

Closed as duplicate
Closed as duplicate

Description

the function load_module drop in patch https://github.com/python/cpython/pull/133662/files

but forgot to drop the _module_type

diff --git a/Lib/zipimport.py b/Lib/zipimport.py
index 188c4bca97..7311daf2b8 100644
--- a/Lib/zipimport.py
+++ b/Lib/zipimport.py
@@ -18,7 +18,6 @@
 import _imp  # for check_hash_based_pycs
 import _io  # for open
 import marshal  # for loads
-import sys  # for modules
 import time  # for mktime
 
 __all__ = ['ZipImportError', 'zipimporter']
@@ -34,8 +33,6 @@ class ZipImportError(ImportError):
 # _read_directory() cache
 _zip_directory_cache = {}
 
-_module_type = type(sys)
-
 END_CENTRAL_DIR_SIZE = 22
 END_CENTRAL_DIR_SIZE_64 = 56
 END_CENTRAL_DIR_LOCATOR_SIZE_64 = 20

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-refactorCode refactoring (with no changes in behavior)
    on Oct 19, 2025
  2. changed the title [-]useless code in zipimport can be dorp[/-] [+]useless code in zipimport can be dropped[/+] on Oct 19, 2025
  3. StanFromIreland commented on Oct 19, 2025

    Member

    Please don't create issues for such things in the future, #133656 could have been reused.

  4. yihong0618 commented on Oct 19, 2025

    ContributorAuthor

    Please don't create issues for such things in the future, #133656 could have been reused.

    copy that, will use this way next time

  5. picnixz commented on Oct 19, 2025

    Member

    @StanFromIreland Can you close this issue as a duplicate and link the PR against the previous issue so that we know that this PR is linked with the other please?

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

    stdlibStandard Library Python modules in the Lib/ directorytype-refactorCode refactoring (with no changes in behavior)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL