gh-104306: Fix incorrect comment handling in the netrc module, minor refactor#104511
gh-104306: Fix incorrect comment handling in the netrc module, minor refactor#104511sleiderr wants to merge 19 commits into
netrc module, minor refactor#104511Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
|
Any chance we can revive this? I already spend few hours trying to identify why I was getting 404 errors from github.com, just to discover that it was a commented line in my |
Sorry, something went wrong.
|
@sleiderr the CI is failing with this PR. Here I've extracted the relevant part of the log from one of the jobs: 1 test failed:
test_netrc
435 tests OK.
0:12:34 load avg: 5.15 Re-running 1 failed tests in verbose mode in subprocesses
0:12:34 load avg: 5.15 Run 1 test in parallel using 1 worker process (timeout: 10 min, worker timeout: 15 min)
0:12:34 load avg: 5.15 [1/1/1] test_netrc failed (uncaught exception)
Re-running test_netrc in verbose mode
test test_netrc crashed -- Traceback (most recent call last):
File "D:\a\cpython\cpython\Lib\test\libregrtest\single.py", line 184, in _runtest_env_changed_exc
_load_run_test(result, runtests)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "D:\a\cpython\cpython\Lib\test\libregrtest\single.py", line 129, in _load_run_test
test_mod = importlib.import_module(module_name)
File "D:\a\cpython\cpython\Lib\importlib\__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1386, in _gcd_import
File "<frozen importlib._bootstrap>", line 1359, in _find_and_load
File "<frozen importlib._bootstrap>", line 1330, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 756, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "D:\a\cpython\cpython\Lib\test\test_netrc.py", line 6, in <module>
from test.support import os_helper, run_unittest
ImportError: cannot import name 'run_unittest' from 'test.support' (D:\a\cpython\cpython\Lib\test\support\__init__.py)
1 test failed again:
test_netrc
== Tests result: FAILURE then FAILURE ==(https://github.com/python/cpython/actions/runs/12611674426/job/35147581981?pr=104511#step:6:631) |
Sorry, something went wrong.
webknjaz
left a comment
There was a problem hiding this comment.
I think that dropping the unrelated changes may fix #104511 (comment).
Sorry, something went wrong.
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
|
Sorry, something went wrong.
|
Hi @webknjaz - thanks for reviewing this pull request. I agree that most of the changes were not relevant to the actual bug fix and were more confusing than anything else (even for myself, one year later). I've reverted to the upstream version of the module, and fixed the bug in (hopefully) a clearer manner. Removing extra new lines before storing the line count fixes that issue, I've added a few test cases based on the original bug report. |
Sorry, something went wrong.
|
@sleiderr would you improve the change note with now this affects the end-users in practice? No low-level details, just relatable high-level effects. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
For what it matters I would love to see this PR merged |
Sorry, something went wrong.
netrcemits syntax errors for comments after blank lines #104306