Commit Graph

103849 Commits

Author SHA1 Message Date
Victor Stinner 6c44fde3e0
bpo-36707: Remove the "m" flag (pymalloc) from SOABI (GH-12931)
"./configure --with-pymalloc" no longer adds the "m" flag to SOABI
(sys.implementation.cache_tag).

Enabling or disabling pymalloc has no impact on the ABI.
2019-04-24 16:10:09 +02:00
Maximilian Nöthe 4f5a3493b5 fix typo in gzip.py (GH-12928) 2019-04-24 18:21:02 +09:00
Victor Stinner d246a6766b
bpo-36454: Fix test_time.test_monotonic() (GH-12929)
Change test_time.test_monotonic() to test only the lower bound of elapsed time
after a sleep command rather than the upper bound. This prevents unnecessary
test failures on slow buildbots. Patch by Victor Stinner.
2019-04-24 00:15:12 +02:00
Mathieu Dupuy 29d018aa63 replace 'sequencial argument' by 'positional' in doc (GH-12925) 2019-04-23 22:01:09 +09:00
Zackery Spytz 359bd4f61b bpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505) 2019-04-23 20:56:08 +09:00
Inada Naoki 09415ff0eb
fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
Victor Stinner 574913479f
bpo-36635, bpo-36696: Fix setup.py on AIX (GH-12922)
xlc compiler doesn't support "-D define" flag only "-Ddefine".
2019-04-23 12:26:33 +02:00
tyomitch 84b4784f12 use `const` in graminit.c (GH-12713) 2019-04-23 18:29:57 +09:00
Raymond Hettinger fb8c7d5332
bpo-36018: Make "seed" into a keyword only argument (GH-12921) 2019-04-23 01:46:18 -07:00
Raymond Hettinger 7280048690
bpo-35904: Add missing fmean() entry to the summary table (GH-12919) 2019-04-23 01:35:16 -07:00
jkleint 39baace622 Document that TestCase.assertCountEqual() can take iterables (GH-686) 2019-04-23 01:34:29 -07:00
Jakub Molinski b4c7f39bbf Add module specification: itemgetter -> operator.itemgetter (GH-12823) 2019-04-23 01:30:30 -07:00
Raymond Hettinger 9013ccf6d8
bpo-36546: Add statistics.quantiles() (#12710) 2019-04-23 00:06:35 -07:00
Windson yang d437012cdd bpo-36679: Rename duplicate test_class_getitem function (GH-12892) 2019-04-22 11:51:06 -07:00
Windson yang c442b1c486 bpo-36680: Rename duplicate test_source_from_cache_path_like_arg function (GH-12893) 2019-04-22 11:50:24 -07:00
Windson yang 3d6f61edb8 bpo-36681: Remove duplicate test_regression_29220 function (GH-12894) 2019-04-22 11:49:11 -07:00
Windson yang 007d0b0188 bpo-36682: Rename duplicate tests in test_sys_setprofile (GH-12895) 2019-04-22 11:48:12 -07:00
Windson yang f51dd4feb0 bpo-36683: Rename duplicate test_io_encoding to test_pyio_encoding (GH-12896) 2019-04-22 11:46:27 -07:00
Windson yang be372d73b4 bpo-36678: Rename duplicate tests in test_dataclasses (GH-12899) 2019-04-22 11:45:34 -07:00
Steve Dower d307d05350
Fixes platform.win32_ver on non-Windows platforms (GH-12912) 2019-04-22 11:40:12 -07:00
Steve Dower 264490797a
bpo-33608: Normalize atomic macros so that they all expect an atomic struct (GH-12877) 2019-04-22 11:13:11 -07:00
Zackery Spytz 34366b7f91 bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882) 2019-04-22 10:08:05 -07:00
Zackery Spytz 56ed86490c bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687) 2019-04-22 10:01:32 -07:00
Berker Peksag 6ef726af3e
bpo-29734: Cleanup test_getfinalpathname_handles test (GH-12908) 2019-04-22 18:46:28 +03:00
周家未 d59b662e49 bpo-36690: Fix typo in Tools/demo/rpython.py (GH-12903) 2019-04-22 16:28:57 +03:00
Marcin Niemira ab86521a9d bpo-36523: Add docstring to io.IOBase.writelines (GH-12683) 2019-04-22 20:13:51 +09:00
Wu Wei 662ebd2ab2 Doc: add the missing ".tp_flags" in type definition (GH-12902) 2019-04-22 20:08:20 +09:00
Xtreak 9b21856b0f bpo-23078: Add support for {class,static}method to mock.create_autospec() (GH-11613)
Co-authored-by: Felipe <felipe.nospam.ochoa@gmail.com>
2019-04-22 05:30:23 +03:00
Joannah Nanjekye 9541bd321a bpo-24011: Use PyModule_Add{Object,IntMacro} in PyInit__signal() (GH-12765) 2019-04-22 04:47:06 +03:00
mollison 5ebfa840a1 bpo-36645: Fix ambiguous formatting in re.sub() documentation (GH-12879) 2019-04-22 01:14:45 +03:00
Fredrik Averpil 3e986de0d6 Fix typo (GH-12878)
"sychronization" -> "synchronization"
2019-04-20 16:06:38 -07:00
Raymond Hettinger 14adbd4598
bpo-36650: Fix handling of empty keyword args in C version of lru_cache. (GH-12881) 2019-04-20 07:20:44 -10:00
Inada Naoki 9d062d690b
ctypes: remove use of legacy unicode API (GH-12340)
PyUnicode_AsUnicodeAndSize() -> PyUnicode_AsWideChar()
2019-04-19 16:07:19 +09:00
Stefan Behnel e8113f51a8
bpo-30485: Change the prefix for defining the default namespace in ElementPath from None to '' since there is existing code that uses that and it's more convenient to have an all-string-keys dict (e.g. when sorting items etc.). (#12860) 2019-04-18 19:05:03 +02:00
Enrico Alarico Carbognani 7e954e7de4 bpo-36651: Fixed Asyncio Event Loop documentation inconsistency (GH-12866)
# [bpo-36651](https://bugs.python.org/issue36651): Fixed Asyncio Event Loop documentation inconsistency  

In the documentation for the call_later and the call_at methods there is a note which says that the delay cannot be longer than a day, but both methods have a note saying that this limitation was removed in Python 3.8
Here I fixed this issue by removing the pre-exising note and added a versionchanged. 

To test my changes I have rebuilt the documentation with ```make html```. I did not have any errors and the effected page displayed correctly on a browser.



https://bugs.python.org/issue36651
2019-04-18 05:43:14 -07:00
Victor Stinner 23bace26ec
bpo-36635: Add _testinternalcapi module (GH-12841)
Add a new _testinternalcapi module to test the internal C API.

Move _Py_GetConfigsAsDict() function to the internal C API:
_testembed now uses _testinternalcapi to access the function.
2019-04-18 11:37:26 +02:00
Paul Monson 11efd79076 bpo-36071 Add support for Windows ARM32 in ctypes/libffi (GH-12059) 2019-04-17 18:09:16 -07:00
Paul Monson 264a0b40b0 bpo-36638: Fix WindowsLoadTracker exception on some Windows versions (GH-12849) 2019-04-17 18:06:06 -07:00
cocoatomo 9941f963fe Fix wrong indentation of a paragraph in documentation (GH-12868)
This paragraph doesn't seem to be a part of code, but merged into previous code block.
2019-04-18 01:54:51 +01:00
josh a6de52c74d bpo-32913: Added re.Match.groupdict example to regex HOWTO (GH-5821) 2019-04-17 15:43:30 -07:00
Steve Dower 4c3efd9cd0
bpo-36649: Remove trailing spaces for registry keys when installed via the Store (GH-12865) 2019-04-17 14:31:32 -07:00
Victor Stinner 5c75f37d47
bpo-36635: Change pyport.h for Py_BUILD_CORE_MODULE define (GH-12853)
Change PyAPI_FUNC(type), PyAPI_DATA(type) and PyMODINIT_FUNC macros
of pyport.h when Py_BUILD_CORE_MODULE is defined.

The Py_BUILD_CORE_MODULE define must be now be used to build a C
extension as a dynamic library accessing Python internals: export the
PyInit_xxx() function in DLL exports on Windows.

Changes:

* Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE now imply
  Py_BUILD_CORE directy in pyport.h.
* ceval.c compilation now fails with an error if Py_BUILD_CORE is not
  defined, just to ensure that Python is build with the correct
  defines.
* setup.py now compiles _pickle.c with Py_BUILD_CORE_MODULE define.
* setup.py compiles _json.c with Py_BUILD_CORE_MODULE define, rather
  than Py_BUILD_CORE_BUILTIN define
* PCbuild/pythoncore.vcxproj: Add Py_BUILD_CORE_BUILTIN define.
2019-04-17 23:02:26 +02:00
Victor Stinner 3092d6b263
bpo-32849: Fix is_valid_fd() on FreeBSD (GH-12852)
Fix Python Initialization code on FreeBSD to detect properly when
stdin file descriptor (fd 0) is invalid.

On FreeBSD, fstat() must be used to check if stdin (fd 0) is valid.
dup(0) doesn't fail if stdin is invalid in some cases.
2019-04-17 18:09:12 +02:00
Victor Stinner 197f0447e3
bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861) 2019-04-17 17:44:06 +02:00
Lihua Zhao 693c104ae7 bpo-31904: Port test_resource to VxWorks (GH-12719)
Skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU on VxWorks.
2019-04-17 17:41:33 +02:00
Lihua Zhao 2954550818 bpo-31904: Port test_cmd_line to VxWorks (#12648)
subprocess.Popen doesn't support preexec on VxWorks.
2019-04-17 17:33:25 +02:00
Victor Stinner 2c4c02f8a8
bpo-35755: Remove current directory from posixpath.defpath (GH-11586)
Document the change in a NEWS entry of the Security category.
2019-04-17 17:05:30 +02:00
Victor Stinner 228a3c99bd
bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12858)
shutil.which() and distutils.spawn.find_executable() now use
os.confstr("CS_PATH") if available instead of os.defpath, if the PATH
environment variable is not set.

Don't use os.confstr("CS_PATH") nor os.defpath if the PATH
environment variable is set to an empty string to mimick Unix 'which'
command behavior.

Changes:

* find_executable() now starts by checking for the executable in the
  current working directly case. Add an explicit
  "if not path: return None".
* Add tests for PATH='' (empty string), PATH=':' and for PATHEXT.
2019-04-17 16:26:36 +02:00
Colin Watson 71ce03df9c Clarify file-closing example in tutorial (GH-11652) 2019-04-17 08:18:37 -04:00
Lihua Zhao 36c41bc201 bpo-31904: Fix test_tabnanny on VxWorks (GH-12646)
Fix test_tabnanny on VxWorks: adjust ENOENT error message,
use os.strerror().
2019-04-17 11:46:50 +02:00