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

Add support for Python 3.7+ #7

Merged
merged 33 commits into from
Feb 8, 2024
Merged

Add support for Python 3.7+ #7

merged 33 commits into from
Feb 8, 2024

Conversation

m-aciek
Copy link
Contributor

@m-aciek m-aciek commented Aug 22, 2023

  • Uses typing syntax compatible with Python 3.7.
  • Adapts the protocols definitions for earlier Python versions.
  • Starts to test in CI Python versions from 3.7 to 3.12.
  • Extends the test to support partial functionality for Python 3.7.
    I wasn't able to make NaiveDateTime/AwareDateTime work properly for Python 3.7 due to interface incompatibilities. Only Date/DateTime is supported as expected for Python 3.7. Full functionality for Python 3.8+.

Closes #6.

Copy link

@roman-affirm roman-affirm left a comment

Choose a reason for hiding this comment

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

LGTM

@m-aciek
Copy link
Contributor Author

m-aciek commented Feb 8, 2024

@glyph would it be possible for you to take some time to review the PR?

@glyph
Copy link
Owner

glyph commented Feb 8, 2024

@m-aciek Sure, I'll have a look. Per https://endoflife.date/python, 3.7 is unsupported, but given that this is a load-bearing piece of infrastructure it seems worthwhile to have a bit of extra long-tail support. Plus, I did say I'd look at your PR :).

I'll do a release, but you should expect 3.7 support to be fairly short-lived.

This commit was sponsored by Jason Walker, Matt Campbell, Sergio Bost,
and my other patrons.  If you want to join them, you can support my
work at https://patreon.com/creatorglyph.
This commit was sponsored by Matt Campbell, Sergio Bost, Jason Walker,
and my other patrons.  If you want to join them, you can support my
work at https://patreon.com/creatorglyph.
@glyph glyph merged commit b993060 into glyph:trunk Feb 8, 2024
13 checks passed
@glyph
Copy link
Owner

glyph commented Feb 9, 2024

@m-aciek This is included in a new release here: https://pypi.org/project/datetype/2024.2.8/

@m-aciek
Copy link
Contributor Author

m-aciek commented Feb 10, 2024

Thank you very much!

@glyph
Copy link
Owner

glyph commented Feb 11, 2024

You're welcome! Thanks for your contribution.

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.

Feature request: supporting older Python versions
3 participants