]> granicus.if.org Git - python/log
python
5 years agoreplace 'sequencial argument' by 'positional' in doc (GH-12925)
Mathieu Dupuy [Tue, 23 Apr 2019 13:01:09 +0000 (15:01 +0200)]
replace 'sequencial argument' by 'positional' in doc (GH-12925)

5 years agobpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505)
Zackery Spytz [Tue, 23 Apr 2019 11:56:08 +0000 (05:56 -0600)]
bpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505)

5 years agofix warnings by adding more const (GH-12924)
Inada Naoki [Tue, 23 Apr 2019 11:39:37 +0000 (20:39 +0900)]
fix warnings by adding more const (GH-12924)

5 years agobpo-36635, bpo-36696: Fix setup.py on AIX (GH-12922)
Victor Stinner [Tue, 23 Apr 2019 10:26:33 +0000 (12:26 +0200)]
bpo-36635, bpo-36696: Fix setup.py on AIX (GH-12922)

xlc compiler doesn't support "-D define" flag only "-Ddefine".

5 years agouse `const` in graminit.c (GH-12713)
tyomitch [Tue, 23 Apr 2019 09:29:57 +0000 (12:29 +0300)]
use `const` in graminit.c (GH-12713)

5 years agobpo-36018: Make "seed" into a keyword only argument (GH-12921)
Raymond Hettinger [Tue, 23 Apr 2019 08:46:18 +0000 (01:46 -0700)]
bpo-36018: Make "seed" into a keyword only argument (GH-12921)

5 years agobpo-35904: Add missing fmean() entry to the summary table (GH-12919)
Raymond Hettinger [Tue, 23 Apr 2019 08:35:16 +0000 (01:35 -0700)]
bpo-35904: Add missing fmean() entry to the summary table (GH-12919)

5 years agoDocument that TestCase.assertCountEqual() can take iterables (GH-686)
jkleint [Tue, 23 Apr 2019 08:34:29 +0000 (01:34 -0700)]
Document that TestCase.assertCountEqual() can take iterables (GH-686)

5 years agoAdd module specification: itemgetter -> operator.itemgetter (GH-12823)
Jakub Molinski [Tue, 23 Apr 2019 08:30:30 +0000 (10:30 +0200)]
Add module specification: itemgetter -> operator.itemgetter (GH-12823)

5 years agobpo-36546: Add statistics.quantiles() (#12710)
Raymond Hettinger [Tue, 23 Apr 2019 07:06:35 +0000 (00:06 -0700)]
bpo-36546: Add statistics.quantiles() (#12710)

5 years agobpo-36679: Rename duplicate test_class_getitem function (GH-12892)
Windson yang [Mon, 22 Apr 2019 18:51:06 +0000 (02:51 +0800)]
bpo-36679: Rename duplicate test_class_getitem function (GH-12892)

5 years agobpo-36680: Rename duplicate test_source_from_cache_path_like_arg function (GH-12893)
Windson yang [Mon, 22 Apr 2019 18:50:24 +0000 (02:50 +0800)]
bpo-36680: Rename duplicate test_source_from_cache_path_like_arg function (GH-12893)

5 years agobpo-36681: Remove duplicate test_regression_29220 function (GH-12894)
Windson yang [Mon, 22 Apr 2019 18:49:11 +0000 (02:49 +0800)]
bpo-36681: Remove duplicate test_regression_29220 function (GH-12894)

5 years agobpo-36682: Rename duplicate tests in test_sys_setprofile (GH-12895)
Windson yang [Mon, 22 Apr 2019 18:48:12 +0000 (02:48 +0800)]
bpo-36682: Rename duplicate tests in test_sys_setprofile (GH-12895)

5 years agobpo-36683: Rename duplicate test_io_encoding to test_pyio_encoding (GH-12896)
Windson yang [Mon, 22 Apr 2019 18:46:27 +0000 (02:46 +0800)]
bpo-36683: Rename duplicate test_io_encoding to test_pyio_encoding (GH-12896)

5 years agobpo-36678: Rename duplicate tests in test_dataclasses (GH-12899)
Windson yang [Mon, 22 Apr 2019 18:45:34 +0000 (02:45 +0800)]
bpo-36678: Rename duplicate tests in test_dataclasses (GH-12899)

5 years agoFixes platform.win32_ver on non-Windows platforms (GH-12912)
Steve Dower [Mon, 22 Apr 2019 18:40:12 +0000 (11:40 -0700)]
Fixes platform.win32_ver on non-Windows platforms (GH-12912)

5 years agobpo-33608: Normalize atomic macros so that they all expect an atomic struct (GH-12877)
Steve Dower [Mon, 22 Apr 2019 18:13:11 +0000 (11:13 -0700)]
bpo-33608: Normalize atomic macros so that they all expect an atomic struct (GH-12877)

5 years agobpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)
Zackery Spytz [Mon, 22 Apr 2019 17:08:05 +0000 (11:08 -0600)]
bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)

5 years agobpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687)
Zackery Spytz [Mon, 22 Apr 2019 17:01:32 +0000 (11:01 -0600)]
bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687)

5 years agobpo-29734: Cleanup test_getfinalpathname_handles test (GH-12908)
Berker Peksag [Mon, 22 Apr 2019 15:46:28 +0000 (18:46 +0300)]
bpo-29734: Cleanup test_getfinalpathname_handles test (GH-12908)

5 years agobpo-36690: Fix typo in Tools/demo/rpython.py (GH-12903)
周家未 [Mon, 22 Apr 2019 13:28:57 +0000 (21:28 +0800)]
bpo-36690: Fix typo in Tools/demo/rpython.py (GH-12903)

5 years agobpo-36523: Add docstring to io.IOBase.writelines (GH-12683)
Marcin Niemira [Mon, 22 Apr 2019 11:13:51 +0000 (21:13 +1000)]
bpo-36523: Add docstring to io.IOBase.writelines (GH-12683)

5 years agoDoc: add the missing ".tp_flags" in type definition (GH-12902)
Wu Wei [Mon, 22 Apr 2019 11:08:20 +0000 (19:08 +0800)]
Doc: add the missing ".tp_flags" in type definition (GH-12902)

5 years agobpo-23078: Add support for {class,static}method to mock.create_autospec() (GH-11613)
Xtreak [Mon, 22 Apr 2019 02:30:23 +0000 (08:00 +0530)]
bpo-23078:  Add support for {class,static}method to mock.create_autospec() (GH-11613)

Co-authored-by: Felipe <felipe.nospam.ochoa@gmail.com>
5 years agobpo-24011: Use PyModule_Add{Object,IntMacro} in PyInit__signal() (GH-12765)
Joannah Nanjekye [Mon, 22 Apr 2019 01:47:06 +0000 (21:47 -0400)]
bpo-24011: Use PyModule_Add{Object,IntMacro} in PyInit__signal() (GH-12765)

5 years agobpo-36645: Fix ambiguous formatting in re.sub() documentation (GH-12879)
mollison [Sun, 21 Apr 2019 22:14:45 +0000 (18:14 -0400)]
bpo-36645: Fix ambiguous formatting in re.sub() documentation (GH-12879)

5 years agoFix typo (GH-12878)
Fredrik Averpil [Sat, 20 Apr 2019 23:06:38 +0000 (01:06 +0200)]
Fix typo (GH-12878)

"sychronization" -> "synchronization"

5 years agobpo-36650: Fix handling of empty keyword args in C version of lru_cache. (GH-12881)
Raymond Hettinger [Sat, 20 Apr 2019 17:20:44 +0000 (07:20 -1000)]
bpo-36650: Fix handling of empty keyword args in C version of lru_cache. (GH-12881)

5 years agoctypes: remove use of legacy unicode API (GH-12340)
Inada Naoki [Fri, 19 Apr 2019 07:07:19 +0000 (16:07 +0900)]
ctypes: remove use of legacy unicode API (GH-12340)

PyUnicode_AsUnicodeAndSize() -> PyUnicode_AsWideChar()

5 years agobpo-30485: Change the prefix for defining the default namespace in ElementPath from...
Stefan Behnel [Thu, 18 Apr 2019 17:05:03 +0000 (19:05 +0200)]
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)

5 years agobpo-36651: Fixed Asyncio Event Loop documentation inconsistency (GH-12866)
Enrico Alarico Carbognani [Thu, 18 Apr 2019 12:43:14 +0000 (14:43 +0200)]
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

5 years agobpo-36635: Add _testinternalcapi module (GH-12841)
Victor Stinner [Thu, 18 Apr 2019 09:37:26 +0000 (11:37 +0200)]
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.

5 years agobpo-36071 Add support for Windows ARM32 in ctypes/libffi (GH-12059)
Paul Monson [Thu, 18 Apr 2019 01:09:16 +0000 (18:09 -0700)]
bpo-36071 Add support for Windows ARM32 in ctypes/libffi (GH-12059)

5 years agobpo-36638: Fix WindowsLoadTracker exception on some Windows versions (GH-12849)
Paul Monson [Thu, 18 Apr 2019 01:06:06 +0000 (18:06 -0700)]
bpo-36638: Fix WindowsLoadTracker exception on some Windows versions (GH-12849)

5 years agoFix wrong indentation of a paragraph in documentation (GH-12868)
cocoatomo [Thu, 18 Apr 2019 00:54:51 +0000 (09:54 +0900)]
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.

5 years agobpo-32913: Added re.Match.groupdict example to regex HOWTO (GH-5821)
josh [Wed, 17 Apr 2019 22:43:30 +0000 (22:43 +0000)]
bpo-32913: Added re.Match.groupdict example to regex HOWTO (GH-5821)

5 years agobpo-36649: Remove trailing spaces for registry keys when installed via the Store...
Steve Dower [Wed, 17 Apr 2019 21:31:32 +0000 (14:31 -0700)]
bpo-36649: Remove trailing spaces for registry keys when installed via the Store (GH-12865)

5 years agobpo-36635: Change pyport.h for Py_BUILD_CORE_MODULE define (GH-12853)
Victor Stinner [Wed, 17 Apr 2019 21:02:26 +0000 (23:02 +0200)]
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.

5 years agobpo-32849: Fix is_valid_fd() on FreeBSD (GH-12852)
Victor Stinner [Wed, 17 Apr 2019 16:09:12 +0000 (18:09 +0200)]
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.

5 years agobpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861)
Victor Stinner [Wed, 17 Apr 2019 15:44:06 +0000 (17:44 +0200)]
bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861)

5 years agobpo-31904: Port test_resource to VxWorks (GH-12719)
Lihua Zhao [Wed, 17 Apr 2019 15:41:33 +0000 (23:41 +0800)]
bpo-31904: Port test_resource to VxWorks (GH-12719)

Skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU on VxWorks.

5 years agobpo-31904: Port test_cmd_line to VxWorks (#12648)
Lihua Zhao [Wed, 17 Apr 2019 15:33:25 +0000 (23:33 +0800)]
bpo-31904:  Port test_cmd_line to VxWorks (#12648)

subprocess.Popen doesn't support preexec on VxWorks.

5 years agobpo-35755: Remove current directory from posixpath.defpath (GH-11586)
Victor Stinner [Wed, 17 Apr 2019 15:05:30 +0000 (17:05 +0200)]
bpo-35755: Remove current directory from posixpath.defpath (GH-11586)

Document the change in a NEWS entry of the Security category.

5 years agobpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12858)
Victor Stinner [Wed, 17 Apr 2019 14:26:36 +0000 (16:26 +0200)]
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.

5 years agoClarify file-closing example in tutorial (GH-11652)
Colin Watson [Wed, 17 Apr 2019 12:18:37 +0000 (13:18 +0100)]
Clarify file-closing example in tutorial (GH-11652)

5 years agobpo-31904: Fix test_tabnanny on VxWorks (GH-12646)
Lihua Zhao [Wed, 17 Apr 2019 09:46:50 +0000 (17:46 +0800)]
bpo-31904: Fix test_tabnanny on VxWorks (GH-12646)

 Fix test_tabnanny on VxWorks: adjust ENOENT error message,
use os.strerror().

5 years agobpo-36642: make unicodedata const (GH-12855)
Inada Naoki [Tue, 16 Apr 2019 23:40:34 +0000 (08:40 +0900)]
bpo-36642: make unicodedata const (GH-12855)

5 years agobpo-36641: Add "const" to PyDoc_VAR macro (GH-12854)
Inada Naoki [Tue, 16 Apr 2019 23:39:46 +0000 (08:39 +0900)]
bpo-36641: Add "const" to PyDoc_VAR macro (GH-12854)

It reduces "data" segment in python about 200KB.

5 years agobpo-33783: Use proper class markup for random.Random docs (GHè7817)
Matthias Bussonnier [Tue, 16 Apr 2019 16:47:11 +0000 (09:47 -0700)]
bpo-33783: Use proper class markup for random.Random docs (GHè7817)

Signed-off-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
5 years agoAdd myself to CODEOWNERS for sqlite3 and urllib.robotparser (GH-12856)
Berker Peksag [Tue, 16 Apr 2019 13:54:56 +0000 (16:54 +0300)]
Add myself to CODEOWNERS for sqlite3 and urllib.robotparser (GH-12856)

5 years agobpo-36345: Update wsgiref example (GH-12562)
Stéphane Wirtel [Tue, 16 Apr 2019 12:52:54 +0000 (14:52 +0200)]
bpo-36345: Update wsgiref example (GH-12562)

Use literalinclude markup to include Tools/scripts/serve.py code.
Tools/scripts/serve.py first argument on the command line is now optional.

5 years agobpo-27860: ipaddress: fix Interface missed some attributes (GH-12836)
Inada Naoki [Mon, 15 Apr 2019 23:32:28 +0000 (08:32 +0900)]
bpo-27860: ipaddress: fix Interface missed some attributes (GH-12836)

IPv4Interface and IPv6Interface did not has netmask and hostmask
attributes when its argument is bytes or int.

This commit extracts method for constructors of Network and Interface,
and ensure Interface class always provides them.

5 years agobpo-36348: IMAP4.logout() doesn't ignore exc (GH-12411)
Victor Stinner [Mon, 15 Apr 2019 16:23:20 +0000 (18:23 +0200)]
bpo-36348: IMAP4.logout() doesn't ignore exc (GH-12411)

The imap.IMAP4.logout() method no longer ignores silently arbitrary
exceptions.

Changes:

* The IMAP4.logout() method now expects a "BYE" untagged response,
  rather than relying on _check_bye() which raises a self.abort()
  exception.
* IMAP4.__exit__() now does nothing if the client already logged out.
* Add more debug info if test_logout() tests fail.

5 years agobpo-36389: Cleanup gc.set_threshold() (GH-12844)
Victor Stinner [Mon, 15 Apr 2019 15:54:09 +0000 (17:54 +0200)]
bpo-36389: Cleanup gc.set_threshold() (GH-12844)

Don't assign generations[2].threshold to generations[2].threshold:
useless operation.

5 years agobpo-35134: Add cpython/pymem.h to build system (GH-12842)
Victor Stinner [Mon, 15 Apr 2019 15:29:31 +0000 (17:29 +0200)]
bpo-35134: Add cpython/pymem.h to build system (GH-12842)

5 years agobpo-35134: Add Include/cpython/pymem.h (GH-12840)
Victor Stinner [Mon, 15 Apr 2019 15:00:19 +0000 (17:00 +0200)]
bpo-35134: Add Include/cpython/pymem.h (GH-12840)

Move unstable CPython API from Include/pymem.h into a new
Include/cpython/pymem.h header file.

5 years agoDoc: update PendingDeprecationWarning explanation (GH-12837)
Inada Naoki [Mon, 15 Apr 2019 12:40:23 +0000 (21:40 +0900)]
Doc: update PendingDeprecationWarning explanation (GH-12837)

Keep the nudge towards DeprecationWarning, but remove the
"Note" markup and generally shorten the description.

Ref: https://github.com/python/cpython/pull/12505/files#r273978757

5 years agobpo-36625: Remove obsolete comments from docstrings in fractions module (GH-12822)
Jakub Molinski [Mon, 15 Apr 2019 12:37:04 +0000 (14:37 +0200)]
bpo-36625: Remove obsolete comments from docstrings in fractions module (GH-12822)

Remove left-over references to Python 3.0 as the future in Fraction class docstrings.

5 years agobpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834)
Victor Stinner [Mon, 15 Apr 2019 10:34:53 +0000 (12:34 +0200)]
bpo-36629: Add support.get_socket_conn_refused_errs() (GH-12834)

Fix test_imap4_host_default_value() of test_imaplib: catch also
errno.ENETUNREACH error.

5 years agobpo-31904: Port the time module on VxWorks (GH-12305)
pxinwr [Mon, 15 Apr 2019 09:06:21 +0000 (17:06 +0800)]
bpo-31904: Port the time module on VxWorks (GH-12305)

time.clock() is not available on VxWorks.

5 years agobpo-31904: Don't build the _crypt extension on VxWorks (GH-12833)
pxinwr [Mon, 15 Apr 2019 09:02:20 +0000 (17:02 +0800)]
bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833)

5 years agobpo-27860: use cached_property (GH-12832)
Inada Naoki [Mon, 15 Apr 2019 07:01:00 +0000 (16:01 +0900)]
bpo-27860: use cached_property (GH-12832)

* cached_property is more efficient than hand crafted cache.
* In IPv[46]Network, `self.network.prefixlen` is same to `self._prefixlen`.

5 years agobpo-30485: Re-allow empty strings in ElementPath namespace mappings since they might...
Stefan Behnel [Sun, 14 Apr 2019 19:12:34 +0000 (21:12 +0200)]
bpo-30485: Re-allow empty strings in ElementPath namespace mappings since they might actually be harmless and unused (and thus went undetected previously). (#12830)

5 years agobpo-16079: fix duplicate test method name in test_gzip. (GH-12827)
Gregory P. Smith [Sun, 14 Apr 2019 17:32:07 +0000 (10:32 -0700)]
bpo-16079: fix duplicate test method name in test_gzip. (GH-12827)

5 years agobpo-31658: Make xml.sax.parse accepting Path objects (GH-8564)
Mickaël Schoentgen [Sun, 14 Apr 2019 09:16:54 +0000 (09:16 +0000)]
bpo-31658: Make xml.sax.parse accepting Path objects (GH-8564)

5 years agobpo-30485: support a default prefix mapping in ElementPath by passing None as prefix...
Stefan Behnel [Sun, 14 Apr 2019 08:09:09 +0000 (10:09 +0200)]
bpo-30485: support a default prefix mapping in ElementPath by passing None as prefix (#1823)

5 years agobpo-36227: ElementTree.tostring() default_namespace and xml_declaration arguments...
Bernt Røskar Brenna [Sun, 14 Apr 2019 08:07:02 +0000 (10:07 +0200)]
bpo-36227: ElementTree.tostring() default_namespace and xml_declaration arguments (GH-12225)

Add new keyword arguments "default_namespace" and "xml_declaration" to functions ET.tostring() and ET.tostringlist(), as known from ElementTree.write().

5 years agobpo-36593: Fix isinstance check for Mock objects with spec executed under tracing...
Xtreak [Sat, 13 Apr 2019 19:12:33 +0000 (00:42 +0530)]
bpo-36593: Fix isinstance check for Mock objects with spec executed under tracing (GH-12790)

In Python having a trace function in effect while mock is imported causes isinstance to be wrong for MagicMocks. This is due to the usage of super() in some class methods, as this sets the __class__ attribute. To avoid this, as a workaround, alias the usage of super .

5 years agobpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate...
Pablo Galindo [Sat, 13 Apr 2019 16:23:24 +0000 (17:23 +0100)]
bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread (GH-12541)

Calling these function from a thread when the runtime is finalizing will terminate
the thread, even if the thread was not created by Python. Users can use
_Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of
being finalized before calling this function to avoid unwanted termination.

5 years agoSkip test_preadv_flags if RWF_HIPRI is not supported by the system (GH-12762)
Pablo Galindo [Sat, 13 Apr 2019 16:06:03 +0000 (17:06 +0100)]
Skip test_preadv_flags if RWF_HIPRI is not supported by the system (GH-12762)

5 years agobpo-36623: Clean parser headers and include files (GH-12253)
Pablo Galindo [Sat, 13 Apr 2019 16:05:14 +0000 (17:05 +0100)]
bpo-36623: Clean parser headers and include files (GH-12253)

After the removal of pgen, multiple header and function prototypes that lack implementation or are unused are still lying around.

5 years agobpo-18610: Update wsgiref.validate docstring for wsgi.input read() (GH-11663)
Cheryl Sabella [Sat, 13 Apr 2019 12:01:15 +0000 (08:01 -0400)]
bpo-18610: Update wsgiref.validate docstring for wsgi.input read() (GH-11663)

5 years agobpo-35734: ipaddress: remove unused methods (GH-11591)
Rémi Lapeyre [Sat, 13 Apr 2019 08:49:34 +0000 (10:49 +0200)]
bpo-35734: ipaddress: remove unused methods (GH-11591)

5 years agoDoc: define PY_SSIZE_T_CLEAN always (GH-12794)
Inada Naoki [Sat, 13 Apr 2019 01:46:21 +0000 (10:46 +0900)]
Doc: define PY_SSIZE_T_CLEAN always (GH-12794)

5 years agobpo-36618: Don't add -fmax-type-align flag to old clang (GH-12811)
Victor Stinner [Fri, 12 Apr 2019 22:51:07 +0000 (00:51 +0200)]
bpo-36618: Don't add -fmax-type-align flag to old clang (GH-12811)

5 years agobpo-35581: Document @typing.type_check_only (GH-11312)
Sebastian Rittau [Fri, 12 Apr 2019 22:33:40 +0000 (00:33 +0200)]
bpo-35581: Document @typing.type_check_only (GH-11312)

5 years agobpo-33922: Adding documentation for new "-64" suffix of Python launcher (GH-7849)
mrh1997 [Fri, 12 Apr 2019 22:26:47 +0000 (00:26 +0200)]
bpo-33922: Adding documentation for new "-64" suffix of Python launcher (GH-7849)

Since bpo-30291 it is possible to specify the architecture of Python when using the launcher

5 years agobpo-18748: test_io: silence destructor errors (GH-12805)
Victor Stinner [Fri, 12 Apr 2019 19:58:24 +0000 (21:58 +0200)]
bpo-18748: test_io: silence destructor errors (GH-12805)

5 years agobpo-36611: Disable serialno field of debug memory allocators (#12796)
Victor Stinner [Fri, 12 Apr 2019 19:54:06 +0000 (21:54 +0200)]
bpo-36611: Disable serialno field of debug memory allocators (#12796)

Omit serialno field from debug hooks on Python memory allocators to
reduce the memory footprint by 5%.

Enable tracemalloc to get the traceback where a memory block has been
allocated when a fatal memory error is logged to decide where to put
a breakpoint.

Compile Python with PYMEM_DEBUG_SERIALNO defined to get back the
field.

5 years agobpo-36389: Add _PyObject_CheckConsistency() function (GH-12803)
Victor Stinner [Fri, 12 Apr 2019 19:51:34 +0000 (21:51 +0200)]
bpo-36389: Add _PyObject_CheckConsistency() function (GH-12803)

Add a new _PyObject_CheckConsistency() function which can be used to
help debugging. The function is available in release mode.

Add a 'check_content' parameter to _PyDict_CheckConsistency().

5 years agobpo-36618: Add -fmax-type-align=8 flag for clang (GH-12809)
Victor Stinner [Fri, 12 Apr 2019 19:27:37 +0000 (21:27 +0200)]
bpo-36618: Add -fmax-type-align=8 flag for clang (GH-12809)

Add -fmax-type-align=8 to CFLAGS when clang compiler is detected.

The pymalloc memory allocator aligns memory on 8 bytes. On x86-64,
clang expects alignment on 16 bytes by default and so uses MOVAPS
instruction which can lead to segmentation fault. Instruct clang that
Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
instead: slower but don't trigger a SIGSEGV if the memory is not
aligned on 16 bytes.

Sadly, the flag must be expected to CFLAGS and not just
CFLAGS_NODIST, since third party C extensions can have the same
issue.

5 years agoAllow Windows layout builds to fully skip code signing (GH-12808)
Steve Dower [Fri, 12 Apr 2019 18:24:15 +0000 (11:24 -0700)]
Allow Windows layout builds to fully skip code signing (GH-12808)

5 years agobpo-36509: Add iot layout for Windows IoT containers (GH-12663)
Paul Monson [Fri, 12 Apr 2019 16:55:57 +0000 (09:55 -0700)]
bpo-36509: Add iot layout for Windows IoT containers (GH-12663)

This enables using the `--preset-iot` option with the PC/layout script, but does not enable IoT builds as part of any normal release.

5 years agoEnable building nuget packages for ARM32 (GH-12669)
Paul Monson [Fri, 12 Apr 2019 16:36:38 +0000 (09:36 -0700)]
Enable building nuget packages for ARM32 (GH-12669)

5 years agobpo-33608: Revert "Factor out a private, per-interpreter _Py_AddPendingCall()." ...
Eric Snow [Fri, 12 Apr 2019 16:20:10 +0000 (10:20 -0600)]
bpo-33608: Revert "Factor out a private, per-interpreter _Py_AddPendingCall()." (gh-12806)

This reverts commit f13c5c8b9401a9dc19e95d8b420ee100ac022208 (gh-12360).

5 years agoCorrect grammar in concurrent/futures/process.py docstring (GH-12761)
Thomas Grainger [Fri, 12 Apr 2019 16:17:17 +0000 (17:17 +0100)]
Correct grammar in concurrent/futures/process.py docstring (GH-12761)

5 years agoIndicate that seek and tell are mandatory on BufferedRandom. (GH-11216)
Christopher Head [Fri, 12 Apr 2019 15:50:41 +0000 (08:50 -0700)]
Indicate that seek and tell are mandatory on BufferedRandom. (GH-11216)

For BufferedReader and BufferedWriter, seek and tell operations are
optional (they may or may not exist based on the underlying stream). For
BufferedRandom, they are mandatory: a BufferedRandom should not be
constructed over an unseekable underlying stream. Document this.

5 years agobpo-36549: str.capitalize now titlecases the first character instead of uppercasing...
Kingsley M [Fri, 12 Apr 2019 15:35:39 +0000 (16:35 +0100)]
bpo-36549: str.capitalize now titlecases the first character instead of uppercasing it (GH-12804)

5 years agobpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-12360)
Eric Snow [Fri, 12 Apr 2019 15:18:16 +0000 (09:18 -0600)]
bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-12360)

This is effectively an un-revert of #11617 and #12024 (reverted in #12159). Portions of those were merged in other PRs (with lower risk) and this represents the remainder. Note that I found 3 different bugs in the original PRs and have fixed them here.

5 years agobpo-18748: io.IOBase destructor now logs close() errors in dev mode (GH-12786)
Victor Stinner [Fri, 12 Apr 2019 15:06:47 +0000 (17:06 +0200)]
bpo-18748: io.IOBase destructor now logs close() errors in dev mode (GH-12786)

In development mode (-X dev) and in debug build, the io.IOBase
destructor now logs close() exceptions. These exceptions are silent
by default in release mode.

5 years agobpo-36588: On AIX, remove major version from sys.platform (GH-12787)
Michael Felt [Fri, 12 Apr 2019 14:15:32 +0000 (16:15 +0200)]
bpo-36588: On AIX, remove major version from sys.platform (GH-12787)

On AIX, sys.platform doesn't contain the major version anymore.
Always return 'aix', instead of 'aix3' .. 'aix7'.  Since
older Python versions include the version number, it is recommended to
always use sys.platform.startswith('aix').

5 years agobpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797)
Victor Stinner [Fri, 12 Apr 2019 13:15:04 +0000 (15:15 +0200)]
bpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797)

Fix test_sys.test_getallocatedblocks() when tracemalloc is enabled.
If the name of Python memory allocators cannot get read, consider
that pymalloc is disabled.

Fix the following error:

./python -X tracemalloc -m test test_sys -v -m test_getallocatedblocks

ERROR: test_getallocatedblocks (test.test_sys.SysModuleTest)
------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_sys.py", line 770, in test_getallocatedblocks
    alloc_name = _testcapi.pymem_getallocatorsname()
RuntimeError: cannot get allocators name

5 years agobpo-20180: Use argument clinic for dict.pop() and dict.popitem() (GH-12792)
Inada Naoki [Fri, 12 Apr 2019 07:11:28 +0000 (16:11 +0900)]
bpo-20180: Use argument clinic for dict.pop() and dict.popitem() (GH-12792)

5 years agobpo-20582: add link for manpage for flags on getnameinfo() (GH-11977)
Emmanuel Arias [Thu, 11 Apr 2019 21:13:37 +0000 (18:13 -0300)]
bpo-20582: add link for manpage for flags on getnameinfo() (GH-11977)

5 years agobpo-36605: make tags: parse Modules/_io directory (GH-12789)
Victor Stinner [Thu, 11 Apr 2019 20:28:12 +0000 (22:28 +0200)]
bpo-36605: make tags: parse Modules/_io directory (GH-12789)

"make tags" and "make TAGS" now also parse Modules/_io/*.c
and Modules/_io/*.h.

5 years agobpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)
Victor Stinner [Thu, 11 Apr 2019 11:01:15 +0000 (13:01 +0200)]
bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)

Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().

5 years agobpo-36575: lsprof: Use _PyTime_GetPerfCounter() (GH-8378)
Inada Naoki [Thu, 11 Apr 2019 10:11:46 +0000 (19:11 +0900)]
bpo-36575: lsprof: Use _PyTime_GetPerfCounter() (GH-8378)

5 years agobpo-36597: fix weakref example code (GH-12779)
Inada Naoki [Thu, 11 Apr 2019 10:05:32 +0000 (19:05 +0900)]
bpo-36597: fix weakref example code (GH-12779)

Commit 57b1a2862 fixed doctest, but example code is not
match with document.
Just skip doctest for the block.

5 years agobpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)
Victor Stinner [Thu, 11 Apr 2019 09:33:27 +0000 (11:33 +0200)]
bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)

Replace _PyMem_IsFreed() function with _PyMem_IsPtrFreed() inline
function. The function is now way more efficient, it became a simple
comparison on integers, rather than a short loop. It detects also
uninitialized bytes and "forbidden bytes" filled by debug hooks
on memory allocators.

Add unit tests on _PyObject_IsFreed().