Serhiy Storchaka
700cfa8c90
bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035)
2020-06-25 17:56:31 +03:00
Victor Stinner
ddbeb2f3e0
bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944)
...
On Linux, skip tests using multiprocessing if the current user cannot
create a file in /dev/shm/ directory. Add the
skip_if_broken_multiprocessing_synchronize() function to the
test.support module.
2020-06-18 14:53:19 +02:00
Xavier Fernandez
5f79f46612
bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491)
2020-06-15 15:16:48 -04:00
Hai Shi
a3ec3ad9e2
bpo-40275: More lazy imports in test.support (GH-20131)
...
Make the the following imports lazy in test.support:
* bz2
* gzip
* lzma
* resource
* zlib
The following test.support decorators now need to be called
with parenthesis:
* @support.requires_bz2
* @support.requires_gzip
* @support.requires_lzma
* @support.requires_zlib
For example, "@requires_zlib" becomes "@requires_zlib()".
2020-05-19 00:02:57 +02:00
Ronald Oussoren
044cf94f61
bpo-22490: Remove __PYVENV_LAUNCHER__ from environment during launch (GH-9516)
...
* bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS
This changeset removes the environment varialbe "__PYVENV_LAUNCHER__"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.
Leaving the environment variable present may lead to misbehaviour when
launching other scripts.
* Actually commit the changes for issue 22490...
* Correct typo
Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
* Run make patchcheck
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2020-03-22 14:31:46 -04:00
Vinay Sajip
7d6378051f
bpo-38901: Allow setting a venv's prompt to the basename of the current directory. (GH-17946)
...
When a prompt value of '.' is specified, os.path.basename(os.getcwd()) is used to
configure the prompt for the created venv.
2020-01-14 20:49:30 +00:00
Tzu-ping Chung
d9aa216d49
bpo-38927: Use python -m pip to upgrade venv deps (GH-17403)
...
I suggest you add `bpo-NNNNN: ` as a prefix for the first commit for future PRs. Thanks!
2019-11-27 20:25:23 +00:00
Daniel Abrahamsson
5209e586b7
bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15330)
...
Before, running deactivate from a bash shell configured to treat undefined variables as errors (`set -u`) would produce a warning:
```
$ python3 -m venv test
$ source test/bin/activate
(test) $ deactivate
-bash: $1: unbound variable
```
2019-09-11 07:58:56 -07:00
Steve Dower
df2d4a6f3d
bpo-37834: Normalise handling of reparse points on Windows (GH-15231)
...
bpo-37834: Normalise handling of reparse points on Windows
* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)
* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)
* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)
* nt.readlink() will read destinations for symlinks and junction points only
bpo-1311: os.path.exists('nul') now returns True on Windows
* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
2019-08-21 15:27:33 -07:00
Min ho Kim
c4cacc8c5e
Fix typos in comments, docs and test names ( #15018 )
...
* Fix typos in comments, docs and test names
* Update test_pyparse.py
account for change in string length
* Apply suggestion: splitable -> splittable
Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Apply suggestion: splitable -> splittable
Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Apply suggestion: Dealloccte -> Deallocate
Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Update posixmodule checksum.
* Reverse idlelib changes.
2019-07-30 18:16:13 -04:00
Steve Dower
b1eb20e68e
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
2019-07-26 09:06:04 -07:00
Steve Dower
9048c49322
bpo-37369: Fix initialization of sys members when launched via an app container (GH-14428)
...
sys._base_executable is now always defined on all platforms, and can be overridden through configuration.
Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
2019-06-29 10:34:11 -07:00
Cooper Lees
4acdbf11b1
bpo-34556: Add --upgrade-deps to venv module ( #13100 )
...
Add --upgrade-deps to venv module
- This allows for pip + setuptools to be automatically upgraded to the latest version on PyPI
- Update documentation to represent this change
bpo-34556: Add --upgrade to venv module
2019-06-17 19:18:13 +01:00
Victor Stinner
bc6469f79c
bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816)
...
test_venv.test_mutiprocessing() now explicitly calls pool.terminate()
to wait until the pool completes.
2019-06-04 19:03:13 +02:00
xdegaye
5437ccca14
bpo-36342: Fix test_multiprocessing in test_venv (GH-12513)
...
when platform lacks a functioning sem_open implementation
https://bugs.python.org/issue36342
2019-05-30 14:42:29 -07:00
Steve Dower
8bba81fd55
bpo-35978: Correctly skips venv tests in venvs (GH-12220)
...
Also fixes venvs from the build directory on Windows.
2019-03-21 10:04:21 -07:00
Cheryl Sabella
839b925f63
bpo-35661: Fix failing test on buildbot (GH-12297)
2019-03-12 20:15:47 -04:00
Cheryl Sabella
d5a70c6b03
bpo-35661: Store the venv prompt in pyvenv.cfg (GH-11440)
2019-03-08 17:01:27 -05:00
Steve Dower
a8474d025c
bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)
...
After reading __PYVENV_LAUNCHER__ we now set sys._base_executable value for later use.
Make the same changes for macOS to avoid extra platform checks.
2019-02-03 23:19:38 -08:00
Steve Dower
a1f9a3332b
bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows (GH-11700)
2019-01-30 13:49:14 -08:00
Steve Dower
4e02f8f8b4
bpo-35797: Fix default executable used by the multiprocessing module (GH-11676)
2019-01-25 14:59:12 -08:00
Steve Dower
1c3de541e6
bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029)
2018-12-10 08:11:21 -08:00
Victor Stinner
cb0b78a070
Revert "bpo-34977: Add Windows App Store package (GH-10245)" (GH-11019)
...
This reverts commit 468a15aaf9
.
2018-12-07 12:57:43 +01:00
Steve Dower
468a15aaf9
bpo-34977: Add Windows App Store package (GH-10245)
2018-12-06 21:09:20 -08:00
Pablo Galindo
b93925047a
Fix the construction of subprocess.CalledProcessError in test_venv (GH-10400)
...
The constructor of subprocess.CalledProcessError in the check_output function had an extra None in it.
2018-11-07 22:21:17 +00:00
Steve Dower
f14c28f397
bpo-34011: Fixes missing venv files and other tests (GH-9458)
2018-09-20 13:38:34 -07:00
Steve Dower
6240917b77
bpo-32409: Ensures activate.bat can handle Unicode contents (GH-5757)
2018-02-19 17:25:24 -08:00
Victor Stinner
895862aa01
bpo-32088: Display Deprecation in debug mode ( #4474 )
...
When Python is build is debug mode (Py_DEBUG), DeprecationWarning,
PendingDeprecationWarning and ImportWarning warnings are now
displayed by default.
test_venv: run "-m pip" and "-m ensurepip._uninstall" with -W
ignore::DeprecationWarning since pip code is not part of Python.
2017-11-20 18:47:03 +01:00
Serhiy Storchaka
5e0df74b3b
bpo-31999: Fix test_venv in case the zlib module is not available. ( #4359 )
2017-11-10 12:09:39 +02:00
Antoine Pitrou
a6a4dc816d
bpo-31370: Remove support for threads-less builds ( #3385 )
...
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Vinay Sajip
993f535ae9
Fixes #24875 : Merged fix from 3.5.
2017-02-02 19:17:02 +00:00
Vinay Sajip
db6322cb8a
Fixes #24875 : pip can now be installed in a venv with --system-site-packages.
2017-02-02 19:05:19 +00:00
Donald Stufft
c96b8fcf25
Allow ensurepip even when ssl is unavailable
2016-11-02 20:32:37 -04:00
Berker Peksag
5a5ae745ff
Issue #26610 : Skip test_with_pip if _ctypes is not available in OpenIndiana
2016-09-18 14:52:25 +03:00
Vinay Sajip
fd0f84bd8f
Closes #22829 : Added --prompt option to venv.
2016-08-06 10:43:44 +01:00
Serhiy Storchaka
e437a10d15
Issue #23277 : Remove unused imports in tests.
2016-04-24 21:41:02 +03:00
Victor Stinner
bdc337b7a8
test_venv: enhance test_devnull()
2016-03-25 12:30:40 +01:00
Victor Stinner
b347788b82
Skip test_venv.test_with_pip() if ctypes miss
...
Issue #26610 .
2016-03-25 12:27:02 +01:00
Victor Stinner
0ab7d0978b
Merge 3.5 (test_venv)
2016-03-14 18:22:12 +01:00
Victor Stinner
87d6e1364c
Fix test_venv on FreeBSD buildbot
...
Ignore pip warning in test_venv.test_with_venv().
2016-03-14 18:21:58 +01:00
Serhiy Storchaka
885bdc4946
Issue #25985 : sys.version_info is now used instead of sys.version
...
to format short Python version.
2016-02-11 13:10:36 +02:00
Berker Peksag
1b25eff76e
Issue #25366 : Skip test_with_pip when threading module is not available
...
Some dependencies of pip import threading module unconditionally so
we need to skip the test to make buildbots happy.
2016-01-19 02:01:53 +02:00
Zachary Ware
38c707e7e0
Issue #21741 : Update 147 test modules to use test discovery.
...
I have compared output between pre- and post-patch runs of these tests
to make sure there's nothing missing and nothing broken, on both
Windows and Linux. The only differences I found were actually tests
that were previously *not* run.
2015-04-13 15:00:43 -05:00
Victor Stinner
866c4e2188
test_venv: use support.rmtree() instead of shutil.rmtree() to fix sporadic
...
failures on Windows
2014-10-10 14:23:00 +02:00
Vinay Sajip
b9b965f6dd
Issue #21643 : Updated test and fixed logic bug in lib64 symlink creation.
2014-06-03 16:47:51 +01:00
Vinay Sajip
1e53f8d9bf
Issue #21197 : Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX.
2014-04-15 11:18:10 +01:00
Nick Coghlan
11c5afd138
Issue #20053 : Mark as an expected failure for 3.4
2014-02-07 23:46:38 +10:00
Nick Coghlan
d49fa5eb11
Issue #20053 : Actually test relevant assumption
2014-02-07 22:28:18 +10:00
Nick Coghlan
456ab5d909
Issue #20053 : new test to check an assumption
2014-02-05 23:54:55 +10:00
Nick Coghlan
6edd82a1d2
Close #20053 : ignore default pip config settings
...
ensurepip now sets PIP_CONFIG_FILE to os.devnull before
import pip from the wheel file. This also ensures venv
ignores the default settings when bootstrapping pip.
2014-02-04 23:02:36 +10:00
Nick Coghlan
ae2ee96ad7
Issue #19744 : improve ensurepip error when ssl is missing
2013-12-23 23:07:07 +10:00
Nick Coghlan
6256fcbc97
Close #19734 : ignore pip env vars in ensurepip
2013-12-23 16:16:07 +10:00
Nick Coghlan
8ddd59e870
Issue #19728 : don't be sensitive to line endings
2013-11-30 18:35:32 +10:00
Nick Coghlan
fdf3a620a2
Issue #19728 : add private ensurepip._uninstall CLI
...
MvL would like to be able to preserve CPython's existing clean
uninstall behaviour on Windows before enabling the pip
installation option by default.
This private CLI means running "python -m ensurepip._uninstall"
will remove pip and setuptools before proceeding with the rest
of the uninstallation process.
If the version of pip differs from the one bootstrapped by
CPython, then the uninstallation helper will leave it alone
(just like any other pip installed packages)
2013-11-30 17:15:09 +10:00
Nick Coghlan
1b1b1789d0
Fix and test pip version consistency
2013-11-30 15:56:58 +10:00
Nick Coghlan
1d1d834328
Issue #19734 : Also run pip version check in isolated mode
2013-11-24 16:49:20 +10:00
Nick Coghlan
091167c1ca
Issue #19734 : Ensure test_venv ignores PIP_REQUIRE_VIRTUALENV
2013-11-24 14:58:31 +10:00
Nick Coghlan
878d258a22
Issue #19744 (temp workaround): without ssl, skip pip test
2013-11-24 12:45:25 +10:00
Nick Coghlan
6fd12f2b33
Issue 19734: better diagnostics for test_venv failures
2013-11-24 11:36:31 +10:00
Nick Coghlan
d76cdc161e
Close #19694 : venv now runs ensurepip in isolated mode
2013-11-23 11:37:28 +10:00
Nick Coghlan
8fbdb097cf
Close #19552 : venv and pyvenv ensurepip integration
2013-11-23 00:30:34 +10:00
Vinay Sajip
53b1c24f54
Issue #18224 : Updated test.
2013-06-30 22:11:46 +01:00
Vinay Sajip
ef1f777e0a
Issue #18224 : Updated test.
2013-06-30 22:11:10 +01:00
Vinay Sajip
bd40d3e144
Closes #15776 : pyvenv now works with existing directories.
2012-10-11 17:22:45 +01:00
Antoine Pitrou
9c92a691e1
Fix test_venv to work with universal newlines (issue #13119 )
2012-08-05 00:33:10 +02:00
Vinay Sajip
90db661b43
Closes #15307 : symlinks now work on OS X with framework Python builds. Patch by Ronald Oussoren.
2012-07-17 17:33:46 +01:00
Vinay Sajip
509d87d4a0
Issue #15307 : Skipped test_venv:test_prefixes when run from a venv.
2012-07-15 16:12:54 +01:00
Ned Deily
045bd5340f
Issue #15241 : Fix test_prefixes failure in test_venv due to symlink in
...
tempfile directory path (i.e. on OS X /tmp is actually /private/tmp).
2012-07-13 15:48:04 -07:00
Vinay Sajip
3874e547b4
Issue #15241 : Added test for venv prefixes.
2012-07-03 16:56:40 +01:00
Vinay Sajip
2895244653
Closes #15173 : Tidied up copyright statements and removed pythonv references.
2012-06-25 00:47:46 +01:00
Éric Araujo
aa789ace66
Restore test that was using pysetup and can now ( #15157 ) use pydoc
2012-06-24 13:51:22 -04:00
Éric Araujo
859aad6a36
Remove packaging from the standard library.
...
Distutils2 will live on on PyPI and be included in the stdlib when it
is ready. See discussion starting at
http://mail.python.org/pipermail/python-dev/2012-June/120430.html
2012-06-24 00:07:41 -04:00
Vinay Sajip
c1f0b53875
Updated test to reflect renamed file.
2012-05-29 22:29:50 +01:00
Vinay Sajip
ef4c5010e4
Fixed typo.
2012-05-28 17:01:17 +01:00
Vinay Sajip
382a7c0180
Tweaked tests to use launcher executable name on OS X.
2012-05-28 16:34:47 +01:00
Vinay Sajip
393da3240a
Changed executable name computation in test_venv to allow for debug executables.
2012-05-27 19:05:36 +01:00
Vinay Sajip
b3b49cd1d2
Refined venv tests.
2012-05-27 18:39:22 +01:00
Vinay Sajip
7e203498d1
Fixed _sys_home computation and added diagnostics for Windows buildbot failures.
2012-05-27 17:30:09 +01:00
Vinay Sajip
42211426eb
Addressed some buildbot errors and comments on the checkin by Antoine on python-dev.
2012-05-26 20:36:12 +01:00
Vinay Sajip
7ded1f0f69
Implemented PEP 405 (Python virtual environments).
2012-05-26 03:45:29 +01:00