Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-53203: Fix test_strptime on Solaris#125785

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
serhiy-storchaka merged 2 commits intopython:mainfromserhiy-storchaka:test_strptime
Oct 21, 2024

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedOct 21, 2024
edited by bedevere-appbot
Loading

@serhiy-storchaka
Copy link
MemberAuthor

@kulikjak, please check if these tests are passed on Solaris.

deftest_date_time_locale2(self):
# Test %c directive
loc=locale.getlocale(locale.LC_TIME)[0]
ifsys.platform.startswith(('sunos','solaris')):
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be safely just 'sunos'. AFAIK, neither Oracle nor OpenSolaris forks will report 'solaris' here.

self.roundtrip('%c',slice(0,6), (1800,1,1,0,0,0,0,1,0))
exceptValueError:
if'LMT'intime.strftime('%c', (1800,1,1,0,0,0,0,1,0)):
self.skipTest('different timezone in the past is not supported')
Copy link
Contributor

Choose a reason for hiding this comment

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

When implemented this way, all the tests look like skipped (because there is always a 'LMT' zone when running the test for 1800), even though the 1900 round trip already passed. But I don't really mind that - I just noticed it :).

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is because you run tests in a place where LMT was in 1800.

Please check the tests again, now with a fixed timezone.

deftest_date_locale2(self):
# Test %x directive
loc=locale.getlocale(locale.LC_TIME)[0]
ifsys.platform.startswith(('sunos','solaris')):
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@kulikjak
Copy link
Contributor

Thank you. I tested the patch and it works.

(I was a little surprised that all the skips matched what I found.)

@serhiy-storchaka
Copy link
MemberAuthor

(I was a little surprised that all the skips matched what I found.)

I looked in the illumos locale data.

@kulikjak
Copy link
Contributor

Now it works.

I'd suggest adding a comment or updating the skip message with the reason (the year has only two digits), but that is just a detail. Thank you for all the fixes!

I looked in the illumos locale data.

Ah, makes sense.

@miss-islington-app
Copy link

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@serhiy-storchakaserhiy-storchaka deleted the test_strptime branchOctober 21, 2024 19:17
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 21, 2024
Use fixed timezone.Skip roundtrip tests on locales with 2-digit year.(cherry picked from commit9dde463)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 21, 2024
Use fixed timezone.Skip roundtrip tests on locales with 2-digit year.(cherry picked from commit9dde463)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-125806 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelOct 21, 2024
@bedevere-app
Copy link

GH-125807 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelOct 21, 2024
serhiy-storchaka added a commit that referenced this pull requestOct 21, 2024
Use fixed timezone.Skip roundtrip tests on locales with 2-digit year.(cherry picked from commit9dde463)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull requestOct 21, 2024
Use fixed timezone.Skip roundtrip tests on locales with 2-digit year.(cherry picked from commit9dde463)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull requestJan 12, 2025
Use fixed timezone.Skip roundtrip tests on locales with 2-digit year.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pgansslepganssleAwaiting requested review from pgansslepganssle is a code owner

@abalkinabalkinAwaiting requested review from abalkinabalkin is a code owner

1 more reviewer

@kulikjakkulikjakkulikjak left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@serhiy-storchaka@kulikjak

[8]ページ先頭

©2009-2025 Movatter.jp