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

Consider namespacing fitz #3658

Closed
kojiromike opened this issue Jul 5, 2024 · 4 comments
Closed

Consider namespacing fitz #3658

kojiromike opened this issue Jul 5, 2024 · 4 comments

Comments

@kojiromike
Copy link

Is your feature request related to a problem? Please describe.

Due to name confusion, developers sometimes install https://github.com/kastman/fitz when they really want pymupdf. I find out when secvulns on the other fitz hit my scans.

Describe the solution you'd like

I propose that pymupdf incrementally work toward leverage namespace packaging so that they can continue to use the name fitz, but without colliding with any other package with the same name.

Instead of installing to site-packages/fitz, eventually install to site-packages/pymupdf/fitz.
Instead of import fitz, from pymupdf import fitz.

This could be done incrementally, giving folks time to plan and without causing immediate pain.

Describe alternatives you've considered

Unless kastman wants to hand over the package name to pymupdf, there aren't any completely "free" alternatives. I suspect namespacing is less distateful than renaming the fitz package in pymupdf to something else entirely.

Additional context

I'm sure there's a history here I'm not aware of. Forgive me if this has been brought up many times before. But I thought it wouldn't hurt to ask, since this is a real issue impacting us, and I'm sure you're going to get issues mentioning the other fitz from now until the end of time anyway.

@JorjMcKie
Copy link
Collaborator

All of these suggestions are already implemented!
You can do any of the following with the exact same effect:

  • import pymupdf
  • import pymupdf as fitz
  • import fitz

@kojiromike
Copy link
Author

@JorjMcKie You're quite right. I need to point devs to

https://pymupdf.readthedocs.io/en/latest/tutorial.html#note-on-the-name-fitz

in the docs and I think that's the best I can expect here.

Thanks for the reply!

@JorjMcKie
Copy link
Collaborator

There also is this entertaining blog article which you can point to 😉.

@kojiromike
Copy link
Author

ref #3431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants