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

bpo-43950: Add option to opt-out of PEP-657#27023

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
pablogsal merged 1 commit intopython:mainfromcolnotab:pep657-config
Jul 7, 2021

Conversation

@ammaraskar
Copy link
Member

@ammaraskarammaraskar commentedJul 4, 2021
edited by bedevere-bot
Loading

To be merged after#26958

This adds the opt-out option and disables the compiler's column information and traceback printing.

https://bugs.python.org/issue43950

@ammaraskarammaraskarforce-pushed thepep657-config branch 2 times, most recently from1a555a1 to0268bfeCompareJuly 5, 2021 06:06
@pablogsal
Copy link
Member

Btw, do we have a test that checks that the flag works?

@ammaraskar
Copy link
MemberAuthor

Btw, do we have a test that checks that the flag works?

Not yet :)

@ammaraskar
Copy link
MemberAuthor

ammaraskar commentedJul 5, 2021
edited
Loading

@pablogsal After making these changes, I am a little worried about thesys.flags.no_debug_ranges conditionals, I fear that without it being automatically tested somewhere we could end up with code-rot in the test suite. Would it be possible to run a buildbot with-X no_debug_ranges just to ensure that no bugs in the opted-out code paths pop up.

@pablogsal
Copy link
Member

Would it be possible to run a buildbot with-X no_debug_ranges just to ensure that no bugs in the opted-out code paths pop up.

Hmmm, is possible, but I would prefer to explicitly test that the flag + env work in some specific tests using a subprocess and that would only left theskip() as conditional. Is true that that could break, but adding an entire buildbot is a bit of a big deal, although we can explore that.

@ammaraskar
Copy link
MemberAuthor

Btw, do we have a test that checks that the flag works?

Just added some, please take a look.

Hmmm, is possible, but I would prefer to explicitly test that the flag + env work in some specific tests using a subprocess

For example runningtest_traceback.py with the flag set? That would certainly work too, I like that approach.

The last remaining component for this PR is to makemarshal.c replace the tables withNone if the config option is set and test that.

@pablogsal
Copy link
Member

The last remaining component for this PR is to makemarshal.c replace the tables withNone if the config option is set and test that.

Maybe we should do the logic in the code object constructor and that way we don't need to deal with marshal.c and the compiler.

@ammaraskar
Copy link
MemberAuthor

ammaraskar commentedJul 5, 2021
edited
Loading

Maybe we should do the logic in the code object constructor and that way we don't need to deal with marshal.c and the compiler.

Great idea, did this in the common code path incodeobject.c :)
That makes the code a lot simpler.

Added tests to make sure de-marshaling with the flag results inNone for theendlinetable andcolumntable.

Hmmm, is possible, but I would prefer to explicitly test that the flag + env work in some specific tests using a subprocess

Going back to this, do you know if there is an example of such a test that already exists in the suite? Where should it go? A newtest_traceback_no_debug_range.py or similar?

@ammaraskarammaraskar marked this pull request as ready for reviewJuly 5, 2021 21:42
@pablogsal
Copy link
Member

We need more rebasing :(

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
@ammaraskar
Copy link
MemberAuthor

Rebased!

@ammaraskarammaraskar added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJul 7, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@ammaraskar for commitd34f7a9 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJul 7, 2021
@ammaraskar
Copy link
MemberAuthor

buildbot/AMD64 Ubuntu Shared PR has a weird failure...

/srv/buildbot/buildarea/pull_request.bolen-ubuntu/build/python: error while loading shared libraries: libpython3.11d.so.1.0: cannot open shared object file: No such file or directory

I wonder if we need a@requires_* on it or if it's just a buildbot problem?

@ammaraskar
Copy link
MemberAuthor

Nope, no@requires annotation is needed to useassert_python_ok andassert_python_failure. This seems to just be a problem with the buildbot.

@ammaraskar
Copy link
MemberAuthor

@pablogsal all lights are green, anything else for this one?

@pablogsalpablogsal merged commit4823d9a intopython:mainJul 7, 2021
@pablogsal
Copy link
Member

@pablogsal all lights are green, anything else for this one?

Nop. Great job! 👌

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 FreeBSD Shared 3.x has failed when building commit4823d9a.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/483/builds/469) and take a look at the build logs.
  4. Check if the failure is related to this commit (4823d9a) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/483/builds/469

Failed tests:

  • test_marshal
  • test_traceback
  • test_code

Failed subtests:

  • test_endline_and_columntable_none_when_no_debug_ranges_env - test.test_code.CodeTest
  • test_endline_and_columntable_none_when_no_debug_ranges - test.test_code.CodeTest
  • test_no_caret_with_no_debug_ranges_flag - test.test_traceback.TracebackCases
  • test_no_columntable_and_endlinetable_with_no_debug_ranges - test.test_marshal.CodeTestCase
  • test_no_caret_with_no_debug_ranges_flag_python_traceback - test.test_traceback.TracebackCases

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

404 tests OK.

10 slowest tests:

  • test_smtpnet: 6 min 6 sec
  • test_nntplib: 3 min 45 sec
  • test_concurrent_futures: 3 min 33 sec
  • test_multiprocessing_spawn: 2 min 2 sec
  • test_multiprocessing_forkserver: 2 min 2 sec
  • test_unparse: 2 min 2 sec
  • test_urllib2: 2 min 1 sec
  • test_tokenize: 1 min 42 sec
  • test_multiprocessing_fork: 1 min 34 sec
  • test_asyncio: 1 min 23 sec

3 tests failed:
test_code test_marshal test_traceback

20 tests skipped:
test_dbm_gnu test_devpoll test_epoll test_idle test_ioctl
test_msilib test_ossaudiodev test_readline test_spwd
test_startfile test_tcl test_tix test_tk test_ttk_guionly
test_ttk_textonly test_turtle test_winconsoleio test_winreg
test_winsound test_zipfile64

3 re-run tests:
test_code test_marshal test_traceback

Total duration: 14 min 59 sec

Click to see traceback logs
TracebackErrorCaretTests) ... okTracebackCases)----------------------------------------------------------------------Traceback (most recent call last):  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_traceback.py", line110, intest_no_caret_with_no_debug_ranges_flag_python_traceback    _, _, stderr= assert_python_ok(  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 1command line: ['/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '@test_77265_tmpæ']TracebackCases)----------------------------------------------------------------------Traceback (most recent call last):  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_traceback.py", line110, intest_no_caret_with_no_debug_ranges_flag_python_traceback    _, _, stderr= assert_python_ok(  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 1command line: ['/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '@test_80109_tmpæ']Traceback (most recent call last):  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_marshal.py", line150, intest_no_columntable_and_endlinetable_with_no_debug_ranges    assert_python_ok('-X','no_debug_ranges',  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 1command line: ['/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '-c', "\nimport sys\nimport marshal\nwith open(sys.argv[1], 'rb') as f:\n    co = marshal.load(f)\n\n    assert co.co_endlinetable is None\n    assert co.co_columntable is None\n", '@test_77265_tmpæ']TracebackFormatTests) ... okTracebackCases) ... okTraceback (most recent call last):  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_code.py", line398, intest_endline_and_columntable_none_when_no_debug_ranges_env    assert_python_ok('-c', code,PYTHONNODEBUGRANGES='1',__cleanenv=True)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 1command line: ['/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/python', '-X', 'faulthandler', '-c', '\ndef f():\n    pass\n\nassert f.__code__.co_endlinetable is None\nassert f.__code__.co_columntable is None\n']TracebackErrorLocationCaretTests) ... okTracebackException) ... okTracebackCases) ... FAILTraceback (most recent call last):  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_code.py", line387, intest_endline_and_columntable_none_when_no_debug_ranges    assert_python_ok('-X','no_debug_ranges','-c', code,__cleanenv=True)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 1command line: ['/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '-c', '\ndef f():\n    pass\n\nassert f.__code__.co_endlinetable is None\nassert f.__code__.co_columntable is None\n']TracebackCases)----------------------------------------------------------------------Traceback (most recent call last):  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_traceback.py", line90, intest_no_caret_with_no_debug_ranges_flagself.assertEqual(len(lines),4)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError:1 != 4Traceback (most recent call last):  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_marshal.py", line150, intest_no_columntable_and_endlinetable_with_no_debug_ranges    assert_python_ok('-X','no_debug_ranges',  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 1command line: ['/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '-c', "\nimport sys\nimport marshal\nwith open(sys.argv[1], 'rb') as f:\n    co = marshal.load(f)\n\n    assert co.co_endlinetable is None\n    assert co.co_columntable is None\n", '@test_82013_tmpæ']

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 Ubuntu Shared 3.x has failed when building commit4823d9a.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/506/builds/502) and take a look at the build logs.
  4. Check if the failure is related to this commit (4823d9a) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/506/builds/502

Failed tests:

  • test_marshal
  • test_traceback
  • test_code

Failed subtests:

  • test_endline_and_columntable_none_when_no_debug_ranges_env - test.test_code.CodeTest
  • test_endline_and_columntable_none_when_no_debug_ranges - test.test_code.CodeTest
  • test_no_caret_with_no_debug_ranges_flag - test.test_traceback.TracebackCases
  • test_no_columntable_and_endlinetable_with_no_debug_ranges - test.test_marshal.CodeTestCase
  • test_no_caret_with_no_debug_ranges_flag_python_traceback - test.test_traceback.TracebackCases

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

407 tests OK.

10 slowest tests:

  • test_concurrent_futures: 4 min 6 sec
  • test_gdb: 3 min 30 sec
  • test_peg_generator: 3 min 6 sec
  • test_capi: 2 min 42 sec
  • test_multiprocessing_spawn: 2 min 34 sec
  • test_asyncio: 1 min 56 sec
  • test_unparse: 1 min 48 sec
  • test_lib2to3: 1 min 33 sec
  • test_multiprocessing_forkserver: 1 min 28 sec
  • test_tokenize: 1 min 16 sec

3 tests failed:
test_code test_marshal test_traceback

17 tests skipped:
test_devpoll test_idle test_ioctl test_kqueue test_msilib
test_ossaudiodev test_startfile test_tcl test_tix test_tk
test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio
test_winreg test_winsound test_zipfile64

3 re-run tests:
test_code test_marshal test_traceback

Total duration: 26 min 47 sec

Click to see traceback logs
TracebackErrorCaretTests) ... okTraceback (most recent call last):  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_marshal.py", line150, intest_no_columntable_and_endlinetable_with_no_debug_ranges    assert_python_ok('-X','no_debug_ranges',  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 127command line: ['/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '-c', "\nimport sys\nimport marshal\nwith open(sys.argv[1], 'rb') as f:\n    co = marshal.load(f)\n\n    assert co.co_endlinetable is None\n    assert co.co_columntable is None\n", '@test_15164_tmpæ']TracebackCases)----------------------------------------------------------------------Traceback (most recent call last):  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_traceback.py", line110, intest_no_caret_with_no_debug_ranges_flag_python_traceback    _, _, stderr= assert_python_ok(  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 127command line: ['/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '@test_15685_tmpæ']TracebackCases)----------------------------------------------------------------------Traceback (most recent call last):  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_traceback.py", line90, intest_no_caret_with_no_debug_ranges_flagself.assertEqual(len(lines),4)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError:1 != 4Traceback (most recent call last):  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_marshal.py", line150, intest_no_columntable_and_endlinetable_with_no_debug_ranges    assert_python_ok('-X','no_debug_ranges',  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 127command line: ['/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '-c', "\nimport sys\nimport marshal\nwith open(sys.argv[1], 'rb') as f:\n    co = marshal.load(f)\n\n    assert co.co_endlinetable is None\n    assert co.co_columntable is None\n", '@test_29458_tmpæ']TracebackFormatTests) ... okTracebackCases) ... okTracebackCases)----------------------------------------------------------------------Traceback (most recent call last):  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_traceback.py", line110, intest_no_caret_with_no_debug_ranges_flag_python_traceback    _, _, stderr= assert_python_ok(  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 127command line: ['/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '@test_29458_tmpæ']Traceback (most recent call last):  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_code.py", line398, intest_endline_and_columntable_none_when_no_debug_ranges_env    assert_python_ok('-c', code,PYTHONNODEBUGRANGES='1',__cleanenv=True)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 127command line: ['/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/python', '-X', 'faulthandler', '-c', '\ndef f():\n    pass\n\nassert f.__code__.co_endlinetable is None\nassert f.__code__.co_columntable is None\n']TracebackErrorLocationCaretTests) ... okTracebackException) ... okTracebackCases) ... FAILTraceback (most recent call last):  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_code.py", line387, intest_endline_and_columntable_none_when_no_debug_ranges    assert_python_ok('-X','no_debug_ranges','-c', code,__cleanenv=True)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line160, inassert_python_okreturn _assert_python(True,*args,**env_vars)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line145, in_assert_python    res.fail(cmd_line)^^^^^^^^^^^^^^^^^^  File"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support/script_helper.py", line72, infailraiseAssertionError("Process return code is%d\n"AssertionError:Process return code is 127command line: ['/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/python', '-X', 'faulthandler', '-X', 'no_debug_ranges', '-c', '\ndef f():\n    pass\n\nassert f.__code__.co_endlinetable is None\nassert f.__code__.co_columntable is None\n']

@pablogsal
Copy link
Member

@ammaraskar@isidentical Hummm, have we bumped the magic number? This buildbot failure seems quite related. I'm in some meetings right now and cannot check but may need to revert:(

@isidentical
Copy link
Member

AFAIK we did. Checking the failures now...

@ammaraskar
Copy link
MemberAuthor

The errors on both are:

/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/python: error while loading shared libraries: libpython3.11d.so.1.0: cannot open shared object file: No such file or directory
stderr:---ld-elf.so.1: Shared object "libpython3.11d.so.1.0" not found, required by "python"---

when runningassert_python_ok andassert_python_failure and both buildbots have "Shared" in the name.

@ammaraskar
Copy link
MemberAuthor

The confusing thing is, it only happens with the new tests, existingassert_python_ok tests are working just fine.

@isidentical
Copy link
Member

To reproduce locally;

$ git clean -fxd$ ./configure --with-pydebug --enable-shared -C$ make -j$ LD_LIBRARY_PATH=$PWD ./python -m test -v test_traceback

@isidentical
Copy link
Member

We don't preserve the original environment, so shared builds fail. See here:

else:
# Need to preserve the original environment, for in-place testing of
# shared library builds.
env=os.environ.copy()

@isidentical
Copy link
Member

I can confirm that setting__cleanenv to False fixes the issue

@ammaraskar
Copy link
MemberAuthor

Aah, let's remove__cleanenv in that case. I set it primarily because I thought it would avoid propagation of the testing Interpreter's config.

@isidentical
Copy link
Member

Also see this example usage of how it is used (it creates a new env based on the existing one) if you want to isolate these;

defget_hash(self,repr_,seed=None):env=os.environ.copy()env['__cleanenv']=True# signal to assert_python not to do a copy# of os.environ on its ownifseedisnotNone:env['PYTHONHASHSEED']=str(seed)else:env.pop('PYTHONHASHSEED',None)out=assert_python_ok('-c',self.get_hash_command(repr_),**env)stdout=out[1].strip()returnint(stdout)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pablogsalpablogsalpablogsal approved these changes

@isidenticalisidenticalisidentical approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@ammaraskar@pablogsal@bedevere-bot@isidentical@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp