Skip to content

python 3.12+ uses importlib.metadata instead of pkg_resources - #74

Merged
uhurusurfa merged 6 commits into
pinax:masterfrom
DavidVadnais:fix/support_python3_12
Jun 13, 2026
Merged

python 3.12+ uses importlib.metadata instead of pkg_resources#74
uhurusurfa merged 6 commits into
pinax:masterfrom
DavidVadnais:fix/support_python3_12

Conversation

@DavidVadnais

@DavidVadnais DavidVadnais commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Closes #73 .

First setup with yaml in issue.

Test fix with:

micromamba run -n pinax-break python -c "import pinax.teams"

TODO:

  • Change Log has been updated ---- Not sure what I need to do.

@DavidVadnais

Copy link
Copy Markdown
Collaborator Author

@uhurusurfa Hello, I ran into this while working on helpdesk. the optional dependency on this was broken

https://github.com/django-helpdesk/django-helpdesk/blob/main/pyproject.toml

@DavidVadnais

Copy link
Copy Markdown
Collaborator Author

Also tested with python 3.14

name: pinax-break-14
channels:
  - conda-forge
dependencies:
  - python=3.14
  - pip
  - pip:
      - django
      - pinax-teams

then run

micromamba run -n pinax-break-14 python -c "import pinax.teams"

@uhurusurfa uhurusurfa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@uhurusurfa

Copy link
Copy Markdown
Collaborator

Looks like it will be necessary to upgrade to a modern package manager instead of the legacy setup.py because Pillow specifies pybind11 in a pyproject.toml but setup.py sees the setup.py in Pillow and runs that instead of using the pyporject.toml so it ends up failing.

A quick hack may be to install Pillow in pinax-teams.

@DavidVadnais

Copy link
Copy Markdown
Collaborator Author

Okay I think we've done it.

@uhurusurfa

Copy link
Copy Markdown
Collaborator

You will have to bump the version on Pinax invitations so I can run a release to avoid the pkg_resources error.

@DavidVadnais

Copy link
Copy Markdown
Collaborator Author

pinax/pinax-invitations#40 and now let me push the change here.

@uhurusurfa

Copy link
Copy Markdown
Collaborator

Now it is the Pinax templates project holding this back - needs the same upgrade to pyproject.toml
https://github.com/pinax/pinax-templates

@DavidVadnais

Copy link
Copy Markdown
Collaborator Author

Okay ill do that now

@DavidVadnais

Copy link
Copy Markdown
Collaborator Author

hmm the version has bumped yet for pinax-templates. Let me look at that.

@DavidVadnais

Copy link
Copy Markdown
Collaborator Author

Okay I manually published the pinax-templates release.

@uhurusurfa uhurusurfa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@uhurusurfa
uhurusurfa merged commit 8367f73 into pinax:master Jun 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pinax teams is broken after python 3.12 due to pkg_resources deprecation

2 participants