Commit Graph

113 Commits

Author SHA1 Message Date
Steve Dower 936a660945
bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495) 2020-07-15 22:56:49 +01:00
Serhiy Storchaka 9355868458
bpo-41043: Escape literal part of the path for glob(). (GH-20994) 2020-06-20 11:10:31 +03:00
native-api 2145c8c972
bpo-33944: site: Add site-packages tracing in verbose mode (GH-12110) 2020-06-12 15:20:11 +09:00
Serhiy Storchaka bfb1cf4465
bpo-40275: Move transient_internet from test.support to socket_helper (GH-19711) 2020-04-29 10:36:20 +03:00
Victor Stinner d18de46117
bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060)
test_site.test_startup_imports() is now skipped if a path of sys.path
contains a .pth file.

Sort test_site imports.
2020-03-18 18:27:32 +01:00
Victor Stinner 8510f43078
bpo-1294959: Add sys.platlibdir attribute (GH-18381)
Add --with-platlibdir option to the configure script: name of the
platform-specific library directory, stored in the new sys.platlitdir
attribute. It is used to build the path of platform-specific dynamic
libraries and the path of the standard library.

It is equal to "lib" on most platforms. On Fedora and SuSE, it is
equal to "lib64" on 64-bit systems.

Co-Authored-By: Jan Matějek <jmatejek@suse.com>
Co-Authored-By: Matěj Cepl <mcepl@cepl.eu>
Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
2020-03-10 09:53:09 +01:00
Inada Naoki c4d92c8ada
simplify StartupImportTests (GH-13096)
_osx_support and copyreg are not imported from site on macOS for now.
2019-05-05 18:06:30 +09:00
Serhiy Storchaka 5b10b98247
bpo-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929) 2019-03-05 10:06:26 +02:00
native-api 45d8d2469a fixed duplicated method name of test_getuserbase() (GH-12140) 2019-03-04 01:05:19 +09:00
Serhiy Storchaka 94cf308ee2
bpo-33306: Improve SyntaxError messages for unbalanced parentheses. (GH-6516) 2018-12-17 17:34:14 +02:00
Victor Stinner f2f4555d82
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (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.
2018-12-05 16:49:35 +01:00
INADA Naoki d4c76d960b
bpo-30167: Add test for module.__cached__ is None (GH-7617) 2018-10-01 21:10:37 +09:00
Steve Dower f14c28f397
bpo-34011: Fixes missing venv files and other tests (GH-9458) 2018-09-20 13:38:34 -07:00
Serhiy Storchaka 0185f34ddc
bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant to invalid paths. (#7695)
Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(),
os.path.isfile(), os.path.islink(), and os.path.ismount() now return False
instead of raising ValueError or its subclasses UnicodeEncodeError
and UnicodeDecodeError for paths that contain characters or bytes
unrepresentative at the OS level.
2018-09-18 11:28:51 +03:00
Serhiy Storchaka 95c3262762
Use assertTrue() instead of deprecated assert_(). (#5526) 2018-02-04 18:14:47 +02:00
Ned Deily 763f094b1f
bpo-28440: Don't add /Library/Python/3.x/site-packages to sys.path (#5445)
No longer add /Library/Python/3.x/site-packages, the Apple-supplied
system Python site-packages directory, to sys.path for macOS framework
builds in case Apple ships a version of Python 3. A similar change
was made earlier to Python 2.7 where it was found that the coupling
between the system Python and a user-installed framework Python often
caused confusion or pip install failures.
2018-01-30 05:14:09 -05:00
Mike 53f7a7c281 bpo-32297: Few misspellings found in Python source code comments. (#4803)
* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py
2017-12-14 13:04:53 +02:00
INADA Naoki ba9ddb7eea bpo-29585: fix test fail on macOS Framework build (GH-2928) 2017-07-28 21:28:19 +09:00
Ned Deily c22bd58d93 bpo-28095: Re-enable temporarily disabled part of test_startup_imports on macOS (#2927)
The changes for bpo-29585 eliminate the extra imports on macOS that caused
the original test failure.

This reverts commit 8a2150aae6.
2017-07-28 03:02:10 -04:00
INADA Naoki a8f8d5b4bd bpo-29585: optimize site.py startup time (GH-136)
Avoid importing `sysconfig` from `site` by copying minimum code.
Python startup is 5% faster on Linux and 30% faster on macOS
2017-06-29 00:31:53 +09:00
Steve Dower 9b33bf50da Improves test_underpth_nosite_file to reveal why it fails. (#1763)
* Improves test_underpth_nosite_file to reveal why it fails.

* Enable building with Windows 10 SDK.

* Fix WinSDK detection

* Fix initialization on Windows when a ._pth file exists.

* Fix tabs

* Adds comment about Py_GetPath call.
2017-05-23 16:25:25 -07:00
Eric Snow 6b4be195cd bpo-22257: Small changes for PEP 432. (#1728)
PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
2017-05-22 21:36:03 -07:00
Zachary Ware d48214f22c bpo-29763: Clean up _pth tests (GH-954) 2017-05-14 15:49:46 -05:00
Victor Stinner b85c136903 bpo-30108: Restore sys.path in test_site (#1197)
Add setUpModule() and tearDownModule() functions to test_site to
save/restore sys.path at the module level to prevent warning if the
user site directory is created, since site.addsitedir() modifies
sys.path.
2017-04-20 13:39:39 +02:00
Zachary Ware cd815edf01 Revert "bpo-29763: Use unittest cleanup in test_site (GH-841)" (GH-942)
This reverts commit b94d7fd4ef.
2017-04-01 01:29:31 -05:00
Zachary Ware b94d7fd4ef bpo-29763: Use unittest cleanup in test_site (GH-841) 2017-04-01 00:18:23 -05:00
Zachary Ware 93710c152e bpo-29763: Use support.unlink instead of os.unlink (GH-624)
support.unlink waits for the files to be removed before returning
2017-03-11 22:10:07 -06:00
Steve Dower 5f9193a6ed Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev) 2017-02-04 15:19:29 -08:00
Steve Dower 1da055ee0d Makes test_underpth* tests more robust by copying the executable. 2016-10-29 08:50:31 -07:00
Steve Dower c6dd415252 Issue #28522: Fixes mishandled buffer reallocation in getpathp.c 2016-10-27 14:28:07 -07:00
Steve Dower 6dd8eca4a9 Issue #28192: Adds tests for hook in isolated mode 2016-09-17 14:35:32 -07:00
Steve Dower 313523ce2d Issue #28192: Don't import readline in isolated mode 2016-09-17 12:22:41 -07:00
Ned Deily 8a2150aae6 Issue #28095: Temporarily disable part of test_startup_imports on OS X. 2016-09-12 00:26:20 -04:00
Eric Snow 46f97b85a8 Issue #15767: Use ModuleNotFoundError. 2016-09-07 16:56:15 -07:00
Brett Cannon 5f0507d8ab Issue #26587: Allow .pth files to specify file paths as well as
directories.

Thanks to Wolfgang Langner for the bug report and initial version of
the patch.
2016-04-08 15:04:28 -07:00
Victor Stinner 3719779765 Merge 3.5 (test_site) 2016-03-14 17:47:30 +01:00
Victor Stinner 21d0e1b5fc Skip test_site if USER_SITE cannot be created
Issue #17758: Skip test_site if site.USER_SITE directory doesn't exist and
cannot be created.
2016-03-14 17:47:03 +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
Eric Snow 00607e91bd Issue #23911: Fix mixed bytes/strings. 2015-05-04 11:48:39 -06:00
Eric Snow 32439d6eb6 Issue #23911: Move path-based bootstrap code to a separate frozen module. 2015-05-02 19:15:18 -06:00
Benjamin Peterson ad9f99e41f merge 3.4 2015-02-01 20:18:29 -05:00
Benjamin Peterson 337578b242 fix tests on systems that can't validate python.org 2015-02-01 20:16:59 -05:00
Serhiy Storchaka d8a1447c99 Issue #22215: Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
2014-09-06 20:07:17 +03:00
Antoine Pitrou 9e82b17e9d Issue #21711: support for "site-python" directories has now been removed from the site module (it was deprecated in 3.4). 2014-06-12 19:41:30 -04:00
doko@ubuntu.com 9574355ff3 - Issue #21223: Pass test_site/test_startup_imports when some of the extensions
are built as builtins.
2014-04-15 20:37:54 +02:00
Ned Deily 944d597faa Issue #20939: remove stray character from comment 2014-03-26 23:43:26 -07:00
Ned Deily 5a507f0f05 Issue #20939: Use www.example.com instead of www.python.org to avoid test
failures when ssl is not present.
2014-03-26 23:31:39 -07:00
Zachary Ware 63321b4978 Issue #19828: Merge with 3.3 2013-12-11 17:01:21 -06:00
Zachary Ware 36193e73b8 Issue #19828: Fixed test_site when the whole suite is run with -S.
Also, cleaned up an unused import.
2013-12-11 16:59:44 -06:00
Zachary Ware 101d9e7250 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:44:27 -06:00