Skip to content

Fix issues with running under Python 3.12 - #5777

Closed
theacodes wants to merge 5 commits into
inventree:masterfrom
theacodes:master
Closed

theacodes wants to merge 5 commits into
inventree:masterfrom
theacodes:master

Conversation

@theacodes

Copy link
Copy Markdown
Contributor

These two commit address issues encountered when running with Python 3.12.0. Notably, the changes remove the use of deprecated APIs related to import machinery.

(This is my first PR to this repo, my feelings won't be hurt if this doesn't get accepted or if you decide to make significant changes)

The entire `imp` module has been removed from Python 3.12. This patch applies the recommended replacement using `importlib`.
@netlify

netlify Bot commented Oct 24, 2023 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit 9eb35f8
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/6537fc461e5be40008598f67

@SchrodingersGat

SchrodingersGat commented Oct 24, 2023 •

Copy link
Copy Markdown
Member

@theacodes welcome! We have been following your kicanvas project for a while :)

Have you done any specific testing on this change with python 3.9, our lowest officially supported version?

@theacodes

theacodes commented Oct 24, 2023 via email

Copy link
Copy Markdown
Contributor Author

Fix order of imports
Comment thread InvenTree/plugin/helpers.py Resolved
@SchrodingersGat

Copy link
Copy Markdown
Member

Nope, not any specific testing on 3.9.

Our CI has done the heavy lifting for you!

@matmair

matmair commented Oct 24, 2023

Copy link
Copy Markdown
Member

Works on my machine, I have approved the CI again - we should know more in a few minutes.

@matmair matmair left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread InvenTree/plugin/helpers.py Resolved
@matmair matmair added bug Identifies a bug which needs to be addressed dependency Relates to a project dependency labels Oct 24, 2023
@matmair matmair modified the milestones: 0.13.0, 0.12.9 Oct 24, 2023
@SchrodingersGat

Copy link
Copy Markdown
Member

TypeError: entry_points() got an unexpected keyword argument 'group' - still some compatibility issues

@SchrodingersGat SchrodingersGat modified the milestones: 0.12.9, 0.13.0 Nov 14, 2023
@SchrodingersGat SchrodingersGat modified the milestones: 0.13.0, 0.13.1 Dec 10, 2023
@SchrodingersGat SchrodingersGat modified the milestones: 0.13.1, 0.13.2, 0.13.3 Jan 12, 2024
@SchrodingersGat SchrodingersGat modified the milestones: 0.13.3, 0.14.0 Jan 21, 2024
@SchrodingersGat

Copy link
Copy Markdown
Member

From the django release notes:

image

3.12 support has only been introduced in django 4.2.8 anyway...

@SchrodingersGat SchrodingersGat modified the milestones: 0.14.0, 1.0.0 Feb 6, 2024
@SchrodingersGat

Copy link
Copy Markdown
Member

Closed by #6424

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

Labels

bug Identifies a bug which needs to be addressed dependency Relates to a project dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants