{{ message }}
bpo-39406: os.putenv() avoids putenv_dict on Windows#18126
Merged
vstinner merged 1 commit intoJan 22, 2020
Merged
Conversation
Windows: _wputenv(env) copies the *env* string and doesn't require the caller to manage the variable memory.
Member
Author
|
Only Unix putenv() requires the caller to manage the memory. On Windows, putenv() and _wputenv() are more regular function: they copy the string. |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot PPC64LE Fedora 3.x has failed when building commit 0852c7d. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/11/builds/212 Failed tests:
Summary of the results of the build (if available): == Click to see traceback logsremote: Enumerating objects: 4, done.�[K
remote: Counting objects: 25% (1/4)�[K
remote: Counting objects: 50% (2/4)�[K
remote: Counting objects: 75% (3/4)�[K
remote: Counting objects: 100% (4/4)�[K
remote: Counting objects: 100% (4/4), done.�[K
remote: Total 4 (delta 3), reused 3 (delta 3), pack-reused 0�[K
From https://github.com/python/cpython
* branch master -> FETCH_HEAD
Reset branch 'master'
test_devpoll skipped -- test works only on Solaris OS family
test_ttk_guionly skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_winreg skipped -- No module named 'winreg'
test_ioctl skipped -- Unable to open /dev/tty
test_kqueue skipped -- test works only on BSD
Timeout (0:15:00)!
Thread 0x00003fff97095330 (most recent call first):
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/selectors.py", line 468 in select
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py", line 1852 in _run_once
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py", line 596 in run_forever
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py", line 629 in run_until_complete
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_asyncio/test_subprocess.py", line 441 in test_cancel_make_subprocess_transport_exec
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/case.py", line 616 in _callTestMethod
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/case.py", line 659 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/case.py", line 719 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/runner.py", line 176 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/support/__init__.py", line 2079 in _run_suite
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/support/__init__.py", line 2201 in run_unittest
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 209 in _test_module
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 140 in _runtest
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 193 in runtest
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest_mp.py", line 80 in run_tests_worker
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/main.py", line 654 in _main
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/main.py", line 634 in main
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/main.py", line 712 in main
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/regrtest.py", line 43 in _main
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/regrtest.py", line 47 in <module>
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/runpy.py", line 86 in _run_code
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/runpy.py", line 193 in _run_module_as_main
test_tix skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
stty: standard input: Inappropriate ioctl for device
test_msilib skipped -- No module named '_msi'
test_flock (__main__.FNTLEINTRTest) ... ok
test_lockf (__main__.FNTLEINTRTest) ... ok
test_read (__main__.OSEINTRTest) ... ok
test_wait (__main__.OSEINTRTest) ... ok
test_wait3 (__main__.OSEINTRTest) ... ok
test_wait4 (__main__.OSEINTRTest) ... ok
test_waitpid (__main__.OSEINTRTest) ... ok
test_write (__main__.OSEINTRTest) ... ok
test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
test_epoll (__main__.SelectEINTRTest) ... ok
test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue'
test_poll (__main__.SelectEINTRTest) ... ok
test_select (__main__.SelectEINTRTest) ... ok
test_sigtimedwait (__main__.SignalEINTRTest) ... ok
test_sigwaitinfo (__main__.SignalEINTRTest) ... ok
test_accept (__main__.SocketEINTRTest) ... ok
test_open (__main__.SocketEINTRTest) ... ok
test_os_open (__main__.SocketEINTRTest) ... ok
test_recv (__main__.SocketEINTRTest) ... ok
test_recvmsg (__main__.SocketEINTRTest) ... ok
test_send (__main__.SocketEINTRTest) ... ok
test_sendall (__main__.SocketEINTRTest) ... ok
test_sendmsg (__main__.SocketEINTRTest) ... ok
test_sleep (__main__.TimeEINTRTest) ... ok
----------------------------------------------------------------------
Ran 24 tests in 7.237s
OK (skipped=2)
test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp'
/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/multiprocessing/resource_tracker.py:229: UserWarning: resource_tracker: '/psm_74ae6aea': [Errno 2] No such file or directory: '/psm_74ae6aea'
warnings.warn('resource_tracker: %r: %s' % (name, e))
test_tk skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_startfile skipped -- object <module 'os' from '/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/os.py'> has no attribute 'startfile'
test_winsound skipped -- No module named 'winsound'
/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/multiprocessing/resource_tracker.py:229: UserWarning: resource_tracker: '/psm_76b3b912': [Errno 2] No such file or directory: '/psm_76b3b912'
warnings.warn('resource_tracker: %r: %s' % (name, e))
test_winconsoleio skipped -- test only relevant on win32
Timeout (0:15:00)!
Thread 0x00003fff9d515330 (most recent call first):
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/selectors.py", line 468 in select
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py", line 1852 in _run_once
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py", line 596 in run_forever
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/asyncio/base_events.py", line 629 in run_until_complete
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_asyncio/test_subprocess.py", line 441 in test_cancel_make_subprocess_transport_exec
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/case.py", line 616 in _callTestMethod
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/case.py", line 659 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/case.py", line 719 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 122 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/unittest/runner.py", line 176 in run
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/support/__init__.py", line 2079 in _run_suite
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/support/__init__.py", line 2201 in run_unittest
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 209 in _test_module
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 153 in _runtest
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/runtest.py", line 193 in runtest
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/main.py", line 318 in rerun_failed_tests
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/main.py", line 691 in _main
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/main.py", line 634 in main
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/libregrtest/main.py", line 712 in main
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/__main__.py", line 2 in <module>
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/runpy.py", line 86 in _run_code
File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/runpy.py", line 193 in _run_module_as_main
make: *** [buildbottest] Error 1 |
Sorry, something went wrong.
shihai1991
pushed a commit
to shihai1991/cpython
that referenced
this pull request
Jan 31, 2020
Windows: _wputenv(env) copies the *env* string and doesn't require the caller to manage the variable memory.
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
This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.
Windows: _wputenv(env) copies the env string and doesn't require
the caller to manage the variable memory.
https://bugs.python.org/issue39406