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 — Cannot import modules from Zip64 files · Issue #89739 · python/cpython

Cannot import modules from Zip64 files #89739

New issue
Copy link
New issue
Copy link
Closed
#94146
Closed
Cannot import modules from Zip64 files#89739
#94146
Copy link
Assignees
gpshead
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

luisffranca
mannequin
opened on Oct 22, 2021
Issue body actions
BPO 45576
Nosy @luisffranca

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-10-22.16:40:33.579>
labels = ['type-bug', 'library', '3.9']
title = 'Cannot import modules from Zip64 files'
updated_at = <Date 2021-10-22.16:40:33.579>
user = 'https://github.com/luisffranca'

bugs.python.org fields:

activity = <Date 2021-10-22.16:40:33.579>
actor = 'lfamorim'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-10-22.16:40:33.579>
creator = 'lfamorim'
dependencies = []
files = []
hgrepos = []
issue_num = 45576
keywords = []
message_count = 1.0
messages = ['404792']
nosy_count = 1.0
nosy_names = ['lfamorim']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue45576'
versions = ['Python 3.9']

Linked PRs

  • gh-89739: gh-77140: Support zip64 in zipimport #94146

Activity

  1. luisffranca commented on Oct 22, 2021

    @luisffranca
    luisffrancamannequin
    on Oct 22, 2021
    MannequinAuthor
    More actions

    I've tried to import a module from a fat jar file and got a ModuleNotFoundError: No module named ... error.

    I checked that the jar file had more than 65k files and was created using Zip64. When I unzip the file, Python is capable of importing the modules.

    I was able to reproduce the error on a simple project, such as:

    simplePackage/
    __init__.py
    a/
    __init__.py
    moduleA.py

    where

    • I'm using Python 3.9.4
    • __init__.py files are empty
    • moduleA.py only has a printA() function

    I ran the following tests:

    1. When importing from the folder, it works
    python
    >>> import sys
    >>> sys.path.append('C:\\Users\\...\\simplePackage')
    >>> from a.moduleA import printA
    >>> printA()
    I'm module a
    1. When zipping the folder, it works
    python
    >>> import sys
    >>> sys.path.append('C:\\Users\\...\\simplePackage.zip')
    >>> from a.moduleA import printA
    >>> printA()
    I'm module a
    1. When forcing to zip with Zip64 it doesn't work

    On linux: zip -fzr simple64Package.zip .

    python
    >>> import sys
    >>> sys.path.append('C:\\Users\\...\\simple64Package.zip')
    >>> from a.moduleA import printA
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'a'

    Is this an expected behavior? Am I missing something?

    Thanks!

  2. luisffranca
    added
    3.9 (EOL)end of lifeend of life
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 22, 2021
  3. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  4. gpshead
    added
    3.13only security fixesonly security fixes
    type-featureA feature request or enhancementA feature request or enhancement
    and removed
    3.9 (EOL)end of lifeend of life
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Sep 6, 2023
  5. facebook-github-bot
    added a commit that references this issue on Mar 4, 2024

    Support zip64 in zipimport

    e4cd001
  6. gpshead
    self-assigned this
    on Mar 28, 2024
  7. gpshead
    closed this as completedin #94146on Mar 28, 2024
  8. gpshead
    added a commit that references this issue on Mar 28, 2024

    gh-89739: gh-77140: Support zip64 in zipimport (GH-94146)

    b448982
  9. NGRsoftlab
    added 2 commits that reference this issue on Apr 2, 2024

    Squashed commit of the following:

    1b5fe4c

    Squashed commit of the following:

    a016a54
  10. diegorusso
    added a commit that references this issue on Apr 17, 2024

    pythongh-89739: pythongh-77140: Support zip64 in zipimport (pythonGH-…

    3c8fa9d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @gpshead
    gpshead

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.