-
Notifications
You must be signed in to change notification settings - Fork 53
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
NXDRIVE-2967: Upgrade deprecated methods #5257
Conversation
…NXDRIVE-2929-upgrade-python-from-3.9.5-to-3.12.3
…NXDRIVE-2929-upgrade-python-from-3.9.5-to-3.12.3
Reviewer's Guide by SourceryThis pull request upgrades deprecated methods and updates the Python version from 3.9 to 3.12 across multiple files. The main changes involve updating datetime usage, modifying GitHub workflow files, and adjusting various configuration and documentation files to reflect the new Python version. File-Level Changes
Tips
|
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.
Hey @gitofanindya - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟡 Documentation: 2 issues found
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
@@ -28,7 +28,7 @@ sudo mount -o remount,user_xattr /dev/sda3 | |||
|
|||
[//]: # (XXX_PYTHON) | |||
|
|||
Nuxeo Drive is officially supported on **Python 3.9.1+**. |
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.
suggestion (documentation): Consider using consistent version notation across all files
Other files use exact versions (e.g., 3.12.3) without the '+' symbol. Consider aligning this for consistency.
Nuxeo Drive is officially supported on **Python 3.9.1+**. | |
Nuxeo Drive is officially supported on **Python 3.12.3**. |
@@ -45,7 +45,7 @@ It may evolve quickly without notification as we are following the Python develo | |||
|
|||
[//]: # (XXX_PYTHON) | |||
|
|||
As of now, we are using the __Python 3.9.5__. | |||
As of now, we are using the __Python 3.12.3__. |
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.
suggestion (documentation): Consider updating the History section
The visible part of the file mentions a History section. Consider updating it to reflect this Python version change.
As of now, we are using __Python 3.12.3__.
History:
- 2023-10-03: Updated to Python 3.12.3
- [Previous version changes...]
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5257 +/- ##
==========================================
+ Coverage 49.24% 50.58% +1.34%
==========================================
Files 94 96 +2
Lines 15699 16109 +410
==========================================
+ Hits 7731 8149 +418
+ Misses 7968 7960 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
NXDRIVE-2967: Upgrade deprecated methods
Summary by Sourcery
Upgrade deprecated methods by replacing
datetime.utcnow()
withdatetime.now(tz=timezone.utc)
and update locale methods. Increase Python version to 3.12 in CI workflows and documentation to align with the latest Python release. Adjust test configurations to handle new deprecation warnings.Enhancements:
datetime.utcnow()
withdatetime.now(tz=timezone.utc)
across multiple files to ensure timezone-aware datetime objects.locale.getdefaultlocale()
tolocale.getlocale()
for improved accuracy.CI:
Documentation:
Tests: