Skip to content

bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error #10919

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 5, 2018
Merged

bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error #10919

merged 3 commits into from
Dec 5, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Dec 5, 2018

  • posixpath.expanduser() now returns the input path unchanged if
    the HOME environment variable is not set and pwd.getpwuid() raises
    KeyError (the current user identifier doesn't exist in the password
    database).
  • Add test_no_home_directory() to test_site.

https://bugs.python.org/issue10496

* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.
@vstinner
Copy link
Member Author

vstinner commented Dec 5, 2018

I tested manually this change on my Fedora 29:

$ git clone ~/prog/python/master /tmp/cpython
$ cd /tmp/cpython
$ wget https://github.com/python/cpython/pull/10919.patch
$ git apply 10919.patch
$ ./configure --with-pydebug && make

$ wget https://bugs.python.org/file47211/user.py
$ sudo ./python user.py
['',
 '/tmp/cpython/Lib',
 '/tmp/cpython/build/lib.linux-x86_64-3.8-pydebug',
 '/usr/local/lib/python38.zip']
PARENT: child exited with status 0

The site module doesn't fail anymore. Test to ensure that site fails without the fix:

$ cd /tmp/cpython
$ git checkout .
$ sudo ./python user.py
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
  File "/tmp/cpython/Lib/site.py", line 579, in <module>
    main()
  File "/tmp/cpython/Lib/site.py", line 565, in main
    known_paths = addusersitepackages(known_paths)
  File "/tmp/cpython/Lib/site.py", line 312, in addusersitepackages
    user_site = getusersitepackages()
  File "/tmp/cpython/Lib/site.py", line 297, in getusersitepackages
    userbase = getuserbase() # this will also set USER_BASE
  File "/tmp/cpython/Lib/site.py", line 286, in getuserbase
    USER_BASE = _getuserbase()
  File "/tmp/cpython/Lib/site.py", line 261, in _getuserbase
    return joinuser("~", ".local")
  File "/tmp/cpython/Lib/site.py", line 251, in joinuser
    return os.path.expanduser(os.path.join(*args))
  File "/tmp/cpython/Lib/posixpath.py", line 249, in expanduser
    userhome = pwd.getpwuid(os.getuid()).pw_dir
KeyError: 'getpwuid(): uid not found: 12345'
PARENT: child exited with status 256

Note: I had to re-clone CPython in /tmp since user 12345 is not allowed to access my $HOME directory.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. Just added few minor suggestion for tests.

@seirl
Copy link
Contributor

seirl commented Dec 5, 2018

@vstinner I can confirm that the patch works:

seirl$ sudo systemd-run -p DynamicUser=yes -t ./python
Running as unit: run-re97322e33fce4b94b6382887f9c8fca2.service
Press ^] three times within 1s to disconnect TTY.
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
  File "/home/seirl/contrib/cpython/./Lib/site.py", line 579, in <module>
    main()
  File "/home/seirl/contrib/cpython/./Lib/site.py", line 565, in main
    known_paths = addusersitepackages(known_paths)
  File "/home/seirl/contrib/cpython/./Lib/site.py", line 312, in addusersitepackages
    user_site = getusersitepackages()
  File "/home/seirl/contrib/cpython/./Lib/site.py", line 297, in getusersitepackages
    userbase = getuserbase() # this will also set USER_BASE
  File "/home/seirl/contrib/cpython/./Lib/site.py", line 286, in getuserbase
    USER_BASE = _getuserbase()
  File "/home/seirl/contrib/cpython/./Lib/site.py", line 261, in _getuserbase
    return joinuser("~", ".local")
  File "/home/seirl/contrib/cpython/./Lib/site.py", line 251, in joinuser
    return os.path.expanduser(os.path.join(*args))
  File "/home/seirl/contrib/cpython/./Lib/posixpath.py", line 249, in expanduser
    userhome = pwd.getpwuid(os.getuid()).pw_dir
KeyError: 'getpwuid(): uid not found: 62472'
seirl$ git apply 10919.patch 
seirl$ sudo systemd-run -p DynamicUser=yes -t ./python
Running as unit: run-r4311d63070164e1490211b0614942960.service
Press ^] three times within 1s to disconnect TTY.
Python 3.8.0a0 (heads/master-dirty:476b113ed8, Dec  5 2018, 14:36:04) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

LGTM.

* Add more tests to test_expanduser_home_envvar()
* Fix typo: assertTrue => assertEqual
* Use support.import_module()
@vstinner
Copy link
Member Author

vstinner commented Dec 5, 2018

@serhiy-storchaka, @izbyshev: Would you mind to review the updated PR?

Copy link
Contributor

@izbyshev izbyshev left a comment

Choose a reason for hiding this comment

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

LGTM, though I'm uncertain about unexpanded paths in sysconfig (see https://bugs.python.org/issue10496#msg331115).

@vstinner
Copy link
Member Author

vstinner commented Dec 5, 2018

On Travis CI, the coverage job (gcc) failed with:

0:33:35 load avg: 0.87 [299/415] test_site
test test_site failed -- Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_site.py", line 307, in test_no_home_directory
    mock_isdir.assert_called_once_with(user_site)
  File "/home/travis/build/python/cpython/Lib/unittest/mock.py", line 837, in assert_called_once_with
    raise AssertionError(msg)
AssertionError: Expected 'isdir' to be called once. Called 0 times.

It should be fixed by my latest commit.

@vstinner vstinner merged commit f2f4555 into python:master Dec 5, 2018
@vstinner vstinner deleted the expanduser branch December 5, 2018 15:49
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-10924 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2018
…GH-10919)

* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.
(cherry picked from commit f2f4555)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
miss-islington added a commit that referenced this pull request Dec 5, 2018
* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.
(cherry picked from commit f2f4555)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
vstinner added a commit that referenced this pull request Dec 5, 2018
…) (GH-10925)

* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.

(cherry picked from commit f2f4555)
@bedevere-bot
Copy link

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

Hi! The buildbot x86 Windows7 3.7 has failed when building commit 983d1ab.

What do you need to do:

  1. Don't panic.
  2. Check the 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/111/builds/762) and take a look at the build logs.
  4. Check if the failure is related to this commit (983d1ab) 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/111/builds/762

Click to see traceback logs
From https://github.com/python/cpython
 * branch            3.7        -> FETCH_HEAD
Reset branch '3.7'

The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio
n, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At line:1 char:18
+ Invoke-WebRequest <<<<  https://aka.ms/nugetclidl -OutFile 'D:\cygwin\home\db
3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe'
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
'py' is not recognized as an internal or external command,
operable program or batch file.
'"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe"' is not recognized as an internal or external command,
operable program or batch file.
The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio
n, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At line:1 char:18
+ Invoke-WebRequest <<<<  https://aka.ms/nugetclidl -OutFile 'D:\cygwin\home\db
3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe'
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
'py' is not recognized as an internal or external command,
operable program or batch file.
'"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe"' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\Lib\*.pyc
The system cannot find the file specified.
Could Not Find D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\PCbuild\python*.zip
The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio
n, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At line:1 char:18
+ Invoke-WebRequest <<<<  https://aka.ms/nugetclidl -OutFile 'D:\cygwin\home\db
3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe'
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
'py' is not recognized as an internal or external command,
operable program or batch file.
'"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe"' is not recognized as an internal or external command,
operable program or batch file.

test_pty skipped -- No module named 'termios'
test_posix skipped -- No module named 'posix'
test_kqueue skipped -- test works only on BSD
Timeout (0:15:00)!
Thread 0x0000099c (most recent call first):
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\connection.py", line 306 in _recv_bytes
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\connection.py", line 250 in recv
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\managers.py", line 547 in start
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 2839 in test_rapid_restart
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\case.py", line 615 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\case.py", line 663 in __call__
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\runner.py", line 176 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\support\__init__.py", line 1891 in _run_suite
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\support\__init__.py", line 1987 in run_unittest
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 178 in test_runner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 182 in runtest_inner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 127 in runtest
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest_mp.py", line 68 in run_tests_worker
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py", line 596 in _main
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py", line 582 in main
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py", line 636 in main
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\regrtest.py", line 46 in _main
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\regrtest.py", line 50 in <module>
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\runpy.py", line 85 in _run_code
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\runpy.py", line 193 in _run_module_as_main
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\spawn.py", line 115, in _main
    self = reduction.pickle.load(from_parent)
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\connection.py", line 951, in rebuild_pipe_connection
    handle = dh.detach()
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\reduction.py", line 129, in detach
    self._access, False, _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied
test_devpoll skipped -- test works only on Solaris OS family
minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
test_grp skipped -- No module named 'grp'
skipped 'forkserver start method not supported'

----------------------------------------------------------------------

Ran 0 tests in 0.150s

OK (skipped=1)
test_curses skipped -- No module named '_curses'
D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\support\__init__.py:1029: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\cygwin\\home\\db3l\\buildarea\\3.7.bolen-windows7\\build\\build\\test_python_3520': [WinError 183] Cannot create a file when that file already exists: 'D:\\cygwin\\home\\db3l\\buildarea\\3.7.bolen-windows7\\build\\build\\test_python_3520'
  with temp_dir(path=name, quiet=quiet) as temp_path:
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
test_resource skipped -- No module named 'resource'
test_crypt skipped -- No module named '_crypt'
skipped 'dtrace(1) failed: [WinError 2] The system cannot find the file specified'
skipped 'dtrace(1) failed: [WinError 2] The system cannot find the file specified'
skipped 'stap(1) failed: [WinError 2] The system cannot find the file specified'
skipped 'stap(1) failed: [WinError 2] The system cannot find the file specified'

----------------------------------------------------------------------

Ran 0 tests in 0.045s

OK (skipped=4)
stty: standard input: Inappropriate ioctl for device
test_xxtestfuzz skipped -- No module named '_xxtestfuzz'
test_wait4 skipped -- object <module 'os' from 'D:\\cygwin\\home\\db3l\\buildarea\\3.7.bolen-windows7\\build\\lib\\os.py'> has no attribute 'fork'
test_syslog skipped -- No module named 'syslog'
test_dbm_ndbm skipped -- No module named '_dbm'
test_threadsignals skipped -- Can't test signal on win32
test_wait3 skipped -- os.fork not defined
test_ossaudiodev skipped -- No module named 'ossaudiodev'
minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
test_poll skipped -- select.poll not defined
test_pwd skipped -- No module named 'pwd'
test_spwd skipped -- No module named 'spwd'
test_gdb skipped -- Couldn't find gdb on the path
test_fork1 skipped -- object <module 'os' from 'D:\\cygwin\\home\\db3l\\buildarea\\3.7.bolen-windows7\\build\\lib\\os.py'> has no attribute 'fork'

----------------------------------------------------------------------

Ran 0 tests in 0.000s

OK
test_readline skipped -- No module named 'readline'
skipped 'fork start method not supported'

----------------------------------------------------------------------

Ran 0 tests in 0.050s

OK (skipped=1)
skipped 'test requires 2500000000 bytes and a long time to run'

----------------------------------------------------------------------

Ran 0 tests in 0.010s

OK (skipped=1)
test_ioctl skipped -- No module named 'fcntl'
D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\support\__init__.py:1029: RuntimeWarning: tests may fail, unable to create temporary directory 'D:\\cygwin\\home\\db3l\\buildarea\\3.7.bolen-windows7\\build\\build\\test_python_3520': [WinError 183] Cannot create a file when that file already exists: 'D:\\cygwin\\home\\db3l\\buildarea\\3.7.bolen-windows7\\build\\build\\test_python_3520'
  with temp_dir(path=name, quiet=quiet) as temp_path:
test_dbm_gnu skipped -- No module named '_gdbm'
test_fcntl skipped -- No module named 'fcntl'
test_epoll skipped -- test works only on Linux 2.6
test_pipes skipped -- pipes module only works on posix
test_openpty skipped -- os.openpty() not available.
test_nis skipped -- No module named 'nis'
Timeout (0:15:00)!
Thread 0x00000e30 (most recent call first):
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 296 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 625 in _enter
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 604 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1870 in _test_thousand_f
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 865 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 917 in _bootstrap_inner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap

Thread 0x00000c50 (most recent call first):
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 300 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 331 in wait_for
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 648 in _wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 613 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1870 in _test_thousand_f
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 865 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 917 in _bootstrap_inner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap

Thread 0x000006cc (most recent call first):
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 300 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 331 in wait_for
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 648 in _wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 613 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1870 in _test_thousand_f
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 865 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 917 in _bootstrap_inner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap

Thread 0x00000af8 (most recent call first):
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 296 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 625 in _enter
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 604 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1870 in _test_thousand_f
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 865 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 917 in _bootstrap_inner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap

Thread 0x000007e4 (most recent call first):
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 296 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 625 in _enter
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 604 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1870 in _test_thousand_f
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 865 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 917 in _bootstrap_inner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap

Thread 0x00000b88 (most recent call first):
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 296 in wait
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\queue.py", line 170 in get
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1888 in test_thousand
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\case.py", line 615 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\case.py", line 663 in __call__
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\runner.py", line 176 in run
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\support\__init__.py", line 1891 in _run_suite
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\support\__init__.py", line 1987 in run_unittest
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 178 in test_runner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 182 in runtest_inner
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 137 in runtest
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py", line 304 in rerun_failed_tests
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py", line 619 in _main
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py", line 582 in main
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py", line 636 in main
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\__main__.py", line 2 in <module>
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\runpy.py", line 85 in _run_code
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\runpy.py", line 193 in _run_module_as_main

The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio
n, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At line:1 char:18
+ Invoke-WebRequest <<<<  https://aka.ms/nugetclidl -OutFile 'D:\cygwin\home\db
3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe'
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
'py' is not recognized as an internal or external command,
operable program or batch file.
'"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe"' is not recognized as an internal or external command,
operable program or batch file.
The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio
n, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At line:1 char:18
+ Invoke-WebRequest <<<<  https://aka.ms/nugetclidl -OutFile 'D:\cygwin\home\db
3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe'
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
'py' is not recognized as an internal or external command,
operable program or batch file.
'"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\PCbuild\\..\externals\nuget.exe"' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\PCbuild\python*.zip

vstinner added a commit that referenced this pull request Dec 5, 2018
…) (GH-10930)

* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.

(cherry picked from commit f2f4555)
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.

7 participants