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

Incompatible change in collect_entry_point #7958

Closed
6 tasks done
danyeaw opened this issue Sep 28, 2023 · 2 comments · Fixed by #7981
Closed
6 tasks done

Incompatible change in collect_entry_point #7958

danyeaw opened this issue Sep 28, 2023 · 2 comments · Fixed by #7981
Labels

Comments

@danyeaw
Copy link
Contributor

danyeaw commented Sep 28, 2023

Description of the issue

In 7889dbe, the collect_entry_point hook util was updated to use importlib.metadata. However, the imports returned now includes the Class name instead of only the module name.

Context information (for bug reports)

  • Output of pyinstaller --version: latest develop
  • Version of Python: 3.12.0rc2
  • Platform: Linux openSUSE Aeon
  • How you installed Python: pyenv
  • Did you also try this on another platform? Does it work there? I haven't tried

Make sure everything is packaged correctly

  • start with clean installation
  • use the latest development version
  • Run your frozen program from a command window (shell) — instead of double-clicking on it
  • Package your program in --onedir mode
  • Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
  • Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

A minimal example program which shows the error

In PyInstaller 5.13.2:

collect_entry_point("gaphor.modelinglanguages")
([('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info'),
  ('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info'),
  ('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info'),
  ('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info'),
  ('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info')],
 ['gaphor.C4Model.modelinglanguage',
  'gaphor.core.modeling.modelinglanguage',
  'gaphor.RAAML.modelinglanguage',
  'gaphor.SysML.modelinglanguage',
  'gaphor.UML.modelinglanguage'])

In PyInstaller 6.0 and latest Develop:

collect_entry_point("gaphor.modelinglanguages")
Out[4]: 
([('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info'),
  ('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info'),
  ('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info'),
  ('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info'),
  ('/home/dan/Projects/gaphor/.venv/lib/python3.12/site-packages/gaphor-2.21.0.dist-info',
   'gaphor-2.21.0.dist-info')],
 ['gaphor.C4Model.modelinglanguage:C4ModelLanguage',
  'gaphor.core.modeling.modelinglanguage:CoreModelingLanguage',
  'gaphor.RAAML.modelinglanguage:RAAMLModelingLanguage',
  'gaphor.SysML.modelinglanguage:SysMLModelingLanguage',
  'gaphor.UML.modelinglanguage:UMLModelingLanguage'])

If you agree that this change in behavior is a bug, I can submit a PR to fix it 👍, thanks!

@danyeaw danyeaw added the triage Please triage and relabel this issue label Sep 28, 2023
@rokm rokm added bug and removed triage Please triage and relabel this issue labels Sep 28, 2023
@rokm
Copy link
Member

rokm commented Sep 28, 2023

If you agree that this change in behavior is a bug, I can submit a PR to fix it 👍, thanks!

Sure, go ahead.

@danyeaw
Copy link
Contributor Author

danyeaw commented Oct 6, 2023

Thanks for the fix @rokm! Sorry, I got busy and hadn't gotten to it yet

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants