FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.7] gh-96848: Fix -X int_max_str_digits option parsing (#96988) by vstinner · Pull Request #97576 · python/cpython · GitHub

/ cpython Public

[3.7] gh-96848: Fix -X int_max_str_digits option parsing (#96988) - #97576

Merged
ambv merged 1 commit into
python:3.7from
vstinner:maxdigits_cmdline37
Oct 5, 2022
Merged

[3.7] gh-96848: Fix -X int_max_str_digits option parsing (#96988)#97576
ambv merged 1 commit into
python:3.7from
vstinner:maxdigits_cmdline37

Conversation

vstinner commented Sep 26, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Fix command line parsing: reject "-X int_max_str_digits" option with no value (invalid) when the PYTHONINTMAXSTRDIGITS environment variable is set to a valid limit.

(cherry picked from commit 4135166)

Fix command line parsing: reject "-X int_max_str_digits" option with
no value (invalid) when the PYTHONINTMAXSTRDIGITS environment
variable is set to a valid limit.

(cherry picked from commit 4135166)

Copy link
Copy Markdown
Member Author

Ah, Windows (x64) failed with a time issue:

FAIL: test_denial_of_service_prevented_str_to_int (test.test_int.IntStrDigitLimitsTests)
Regression test: ensure we fail before performing O(N**2) work.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\lib\test\test_int.py", line 654, in test_denial_of_service_prevented_str_to_int
    self.assertLess(seconds_to_fail_extra_huge, seconds_to_convert/8)
AssertionError: 0.015625 not less than 0.013671875

I re-run the failed job.

ambv merged commit 98884f5 into python:3.7 Oct 5, 2022
vstinner deleted the maxdigits_cmdline37 branch December 13, 2022 15:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL