-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Support Python 3.12 and drop 3.7 #164
Support Python 3.12 and drop 3.7 #164
Conversation
Codecov Report
@@ Coverage Diff @@
## master #164 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 11
Lines 400 400
Branches 68 68
=========================================
Hits 400 400
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Before merging this in, one issue is that 3.7 users might not have the |
Good point! I'm personally planning on opening a PR removing support for Python 3.7, since its EOL has passed (as has been done with previous Python versions), but presuming this PR will be merged before that, we should probably keep the code using Any thoughts? Would you mind making that change? 🙂 |
Sure, let me go ahead and package that in with this PR! I'll also add a CI check for 3.12. |
Sure, given that it passes 😅 |
Went ahead and removed the conditional import since we can now expect that all users will have |
@ddabble Looks like all checks are passing, and for 3.12, any blockers from merging this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, it's now moved a little too far out of scope of the original PR, in my opinion, but if we rename it to e.g. "Support Python 3.12 and drop 3.7", it should be good :)
I pushed a few commits to add some changes I think were missing. Do you mind if I reorganize the commits before merging? I was thinking one commit for dropping 3.7 and one for supporting 3.12.
pkg_resources
with importlib.metadata
Good callout, went ahead and renamed it!
Thanks for doing that! Sure thing, I didn't know if they would get squashed or not, so appreciate it! |
Ah, I see! I guess we should ideally keep your version, then :) |
Also removed usage of `pkg_resources` in `django_hosts/__init__.py`, as it's been deprecated (see the "Attention" notice at the top of https://setuptools.pypa.io/en/latest/pkg_resources.html). `importlib.metadata.version()` was added in Python 3.8, which is the new, recommended way to get the version of an installed package. Co-authored-by: Anders <6058745+ddabble@users.noreply.github.com>
Co-authored-by: Anders <6058745+ddabble@users.noreply.github.com>
d87d18a
to
48b1fde
Compare
Co-authored-by: Anders <6058745+ddabble@users.noreply.github.com>
48b1fde
to
ada93da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, thank you! 😊
Also removed usage of `pkg_resources` in `django_hosts/__init__.py`, as it's been deprecated (see the "Attention" notice at the top of https://setuptools.pypa.io/en/latest/pkg_resources.html). `importlib.metadata.version()` was added in Python 3.8, which is the new, recommended way to get the version of an installed package. Co-authored-by: Anders <6058745+ddabble@users.noreply.github.com>
As mentioned in this issue #163
pkg_resources
is deprecated andimportlib
should be used instead. Putting out this PR as this is blocking our upgrade to Python 3.12