-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: to_datetime support iso week year (16607) Updated #24844
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
Codecov Report
@@ Coverage Diff @@
## master #24844 +/- ##
===========================================
- Coverage 92.39% 42.9% -49.49%
===========================================
Files 166 166
Lines 52378 52378
===========================================
- Hits 48393 22472 -25921
- Misses 3985 29906 +25921
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24844 +/- ##
==========================================
- Coverage 92.38% 91.75% -0.63%
==========================================
Files 166 173 +7
Lines 52398 52960 +562
==========================================
+ Hits 48406 48595 +189
- Misses 3992 4365 +373
Continue to review full report at Codecov.
|
Failures in travisci build for python 3.5? |
Hey so I am currently stuck on making the checks pass. From what I can understand from the CI checks, it seems on Linux builds the pandas/pandas/_libs/tslibs/strptime.pyx Line 157 in e99049a
pandas/pandas/_libs/tslibs/strptime.pyx Line 282 in e99049a
|
@RjLi13 : Our codebase changes relatively quickly, so a year is essentially an eternity in our world. A lot could have changed since then. 🙂 Here's what I would do:
If you're having issues, feel free to share the stacktrace, and we can have a look. |
@gfyoung So I have a Mac running python3.7 and the Azure pipelines show that only Linux builds seems to fail. I don't know what OS travisCI runs on but I don't have this specific environment currently on my machine
Because of this I can't reproduce the test failures. Could you give me some steps on how to recreate such an env or reproduce the failures? |
Generally, such failures can be reproduced locally without having to follow the exact setup for the test. Thus, try running the code in your development environment. If you can't reproduce, ping us again. |
Here's my console output on my dev environment. I followed the instructions to run my tests from the doc (they contain 'iso_week_year')
In addition, I ran |
@RjLi13 : Cool! Thanks for doing that. Alright, so what I'm observing is that all of the relevant failures occurred on Python 3.x environments with a locale override, which are:
Do you mind overriding your locale first, double check that the override works, and then run those same test commands again? |
pandas/_libs/tslibs/strptime.pyx
Outdated
week_starts_Mon) | ||
if julian == -1 and weekday != -1: | ||
if week_of_year != -1: | ||
week_starts_Mon = True if week_of_year_start == 0 else False |
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.
just week_starts_Mon = week_of_year_start == 0
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.
Nice catch!
@gfyoung can you explain how to override the locale? I'm not quite understanding what you linked. Edit: From my understanding, I just run the 'ci/run_test.sh` script with -n and one of the locale options you provided? |
@RjLi13 : Before you run
Just do that and then run your original |
@gfyoung I'm having trouble having pandas detect my system locale ovveride. Running lines 16-17 did change my system locale, I can confirm that with the |
Hmmm...I see...since it is successfully changed after you check with the |
…to pandas-rosy-new
* fix pandas-dev#25487 add modify documentation
…nlargest (pandas-dev#25358) * DOC: Fix pandas-dev#24268 by updating description for keep
Rebase gone wrong, not sure how to fix. I'm closing the PR and remaking a new one which I will reference here. |
git diff upstream/master -u -- "*.py" | flake8 --diff
I found the issue stagnant, but since the fix was already in place, I manually took the code @rosygupta made and applied it onto latest master. Rebase wasn't an option that I found would work since the file in question has been split into multiple. Let me know what else needs to be updated.
Question: Given the code was created from a reference of cpython https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Lib/_strptime.py#L321
I'm wondering why we can't use cpython's strptime directly and have to make our own implementation?