-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update datetime.py and test_datetime.py to CPYTHON v3.11.2 #5018
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
Conversation
Thanks for the feedback. Do you know why the tests are failing? |
TESTS = 'test.datetimetester' | ||
|
||
@unittest.skip("TODO: RUSTPYTHON, incorrect datetime struct implementation in time.rs") | ||
def load_tests(loader, tests, pattern): |
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.
I don't believe you can skip this. This function is part of the load_tests
protocol and generates the test suite to be executed.
If you unskip this what is the error?
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.
I can take a look later since am on mobile now. There's probably a reason this file wasn't already added.
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.
when it loads _strptime.py I get an error of no attribute : tzinfo
so I guess ill have to fix that before I can add these. On that topic, could you point me in the right direction for creating a field for the time_struct that may of may not be present for a given instance (naive vs timezone aware time struct)
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.
aha, gotcha. Makes sense to remove this file for now and see how the updates play with the rest of the test suite.
could you point me in the right direction for creating a field for the time_struct that may of may not be present for a given instance
It being an Option
seems like the way to go, the docs state it as optional and looking through Python code I'm seeing it being guarded by if tzinfo is None
all over the place.
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.
Do you know how I would go about making it so that when the option is none the python object no longer has that attribute? I still don't fully understand how pystructsequence works.
Co-authored-by: fanninpm <fanninpm@miamioh.edu>
12877f9
to
f319633
Compare
Thank you for contributing! we now have 3.12 datetime |
I also had to add _strptime.py but test_datetime.py fails due to incorrect datetime struct implementation in time.rs
Contributing to issue :
#4564