]> granicus.if.org Git - python/log
python
5 years agobpo-11001: updated cookie docs (GH-13086)
Julia Iliuk [Tue, 7 May 2019 17:05:20 +0000 (10:05 -0700)]
bpo-11001: updated cookie docs (GH-13086)

Used **spookylukey**'s patch from 2011-01-24

https://bugs.python.org/issue11001

5 years agobpo-36533: Reinit logging.Handler locks on fork(). (GH-12704)
Gregory P. Smith [Tue, 7 May 2019 16:18:20 +0000 (12:18 -0400)]
bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704)

Instead of attempting to acquire and release them all across fork
which was leading to deadlocks in some applications that had chained
their own handlers while holding multiple locks.

5 years agobpo-28795: Signal documentation: Fix misleading statement. (GH-13121)
Julien Palard [Tue, 7 May 2019 15:27:48 +0000 (17:27 +0200)]
bpo-28795: Signal documentation: Fix misleading statement. (GH-13121)

5 years agobpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDate...
Edison A [Tue, 7 May 2019 15:00:21 +0000 (08:00 -0700)]
bpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold (GH-13147)

5 years agoPost v3.8.0a4
Łukasz Langa [Tue, 7 May 2019 14:56:31 +0000 (16:56 +0200)]
Post v3.8.0a4

5 years agoMerge tag 'v3.8.0a4'
Łukasz Langa [Tue, 7 May 2019 14:56:06 +0000 (16:56 +0200)]
Merge tag 'v3.8.0a4'

Python 3.8.0a4

5 years agobpo-31855: unittest.mock.mock_open() results now respects the argument of read([size...
Rémi Lapeyre [Tue, 7 May 2019 10:48:36 +0000 (12:48 +0200)]
bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521)

unittest.mock.mock_open() results now respects the argument of read([size])

Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
5 years agoForbid creating of stream objects outside of asyncio (#13101)
Andrew Svetlov [Tue, 7 May 2019 02:52:11 +0000 (22:52 -0400)]
Forbid creating of stream objects outside of asyncio (#13101)

5 years agobpo-35925: Skip SSL tests that fail due to weak external certs. (GH-13124)
Gregory P. Smith [Mon, 6 May 2019 21:54:06 +0000 (17:54 -0400)]
bpo-35925: Skip SSL tests that fail due to weak external certs. (GH-13124)

Modern Linux distros such as Debian Buster have default OpenSSL system
configurations that reject connections to servers with weak certificates
by default.  This causes our test suite run with external networking
resources enabled to skip these tests when they encounter such a failure.

Fixing the network servers is a separate issue.

5 years agoFix rst formatting for several links in ssl documentation (GH-13133)
Toshio Kuratomi [Mon, 6 May 2019 20:28:14 +0000 (15:28 -0500)]
Fix rst formatting for several links in ssl documentation (GH-13133)

5 years agobpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)
Serhiy Storchaka [Mon, 6 May 2019 19:40:27 +0000 (22:40 +0300)]
bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)

5 years agobpo-36793: Remove unneeded __str__ definitions. (GH-13081)
Serhiy Storchaka [Mon, 6 May 2019 19:29:40 +0000 (22:29 +0300)]
bpo-36793: Remove unneeded __str__ definitions. (GH-13081)

Classes that define __str__ the same as __repr__ can
just inherit it from object.

5 years agobpo-36766: Typos in docs and code comments (GH-13116)
penguindustin [Mon, 6 May 2019 18:57:17 +0000 (14:57 -0400)]
bpo-36766: Typos in docs and code comments (GH-13116)

5 years agobpo-36275: enhance documentation for venv.create() (GH-13114)
Sebastian Koslowski [Mon, 6 May 2019 18:51:09 +0000 (14:51 -0400)]
bpo-36275: enhance documentation for venv.create() (GH-13114)

5 years agoClarify the download unit in the download section (GH-13122)
Stéphane Wirtel [Mon, 6 May 2019 18:48:17 +0000 (14:48 -0400)]
Clarify the download unit in the download section (GH-13122)

5 years agobpo-30668: add missing word in license.rst (GH-13115)
Patrick Mühlbauer [Mon, 6 May 2019 18:32:42 +0000 (20:32 +0200)]
bpo-30668: add missing word in license.rst (GH-13115)

5 years agoPython 3.8.0a4 v3.8.0a4
Łukasz Langa [Mon, 6 May 2019 18:30:25 +0000 (20:30 +0200)]
Python 3.8.0a4

5 years agoUnroll import-team in CODEOWNERS (#13118)
Brett Cannon [Mon, 6 May 2019 17:44:49 +0000 (13:44 -0400)]
Unroll import-team in CODEOWNERS (#13118)

5 years agobpo-36594: Fix incorrect use of %p in format strings (GH-12769)
Zackery Spytz [Mon, 6 May 2019 16:56:51 +0000 (10:56 -0600)]
bpo-36594: Fix incorrect use of %p in format strings (GH-12769)

In addition, fix some other minor violations of C99.

5 years agobpo-36798: Updating f-string docs for := use case (GH-13107)
Logan Jones [Mon, 6 May 2019 16:32:44 +0000 (12:32 -0400)]
bpo-36798: Updating f-string docs for := use case (GH-13107)

5 years agoUpdate wsgiref.rst (#10488)
Andre Delfino [Mon, 6 May 2019 16:01:17 +0000 (13:01 -0300)]
Update wsgiref.rst (#10488)

5 years agoDoc/c-api/exceptions.rst: fix grammar (#12091)
Daniel Hahler [Mon, 6 May 2019 15:39:06 +0000 (17:39 +0200)]
Doc/c-api/exceptions.rst: fix grammar (#12091)

* Doc/c-api/exceptions.rst: fix grammar

skip issue
skip news

* Use ", in that case"

Co-Authored-By: blueyed <github@thequod.de>
5 years agobpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109)
Stefan Behnel [Mon, 6 May 2019 15:36:35 +0000 (17:36 +0200)]
bpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109)

5 years agoOnly count number of members once (#12691)
Eddie Elizondo [Mon, 6 May 2019 15:28:50 +0000 (11:28 -0400)]
Only count number of members once (#12691)

5 years agobpo-16024: Doc cleanup regarding path_fd, dir_fd, follow_symlinks (GH-5505)
Cheryl Sabella [Mon, 6 May 2019 12:39:13 +0000 (08:39 -0400)]
bpo-16024: Doc cleanup regarding path_fd, dir_fd, follow_symlinks (GH-5505)

5 years agobpo-36791: Safer detection of integer overflow in sum(). (GH-13080)
Serhiy Storchaka [Sun, 5 May 2019 11:26:23 +0000 (14:26 +0300)]
bpo-36791: Safer detection of integer overflow in sum(). (GH-13080)

5 years agobpo-33530: Implement Happy Eyeballs in asyncio, v2 (GH-7237)
twisteroid ambassador [Sun, 5 May 2019 11:14:35 +0000 (19:14 +0800)]
bpo-33530: Implement Happy Eyeballs in asyncio, v2 (GH-7237)

Added two keyword arguments, `delay` and `interleave`, to
`BaseEventLoop.create_connection`. Happy eyeballs is activated if
`delay` is specified.

We now have documentation for the new arguments. `staggered_race()` is in its own module, but not exported to the main asyncio package.

https://bugs.python.org/issue33530

5 years agosimplify StartupImportTests (GH-13096)
Inada Naoki [Sun, 5 May 2019 09:06:30 +0000 (18:06 +0900)]
simplify StartupImportTests (GH-13096)

_osx_support and copyreg are not imported from site on macOS for now.

5 years agobpo-36189: Fixing typo in tutorial introduction (GH-13090)
Jonatan [Sat, 4 May 2019 21:55:29 +0000 (14:55 -0700)]
bpo-36189: Fixing typo in tutorial introduction (GH-13090)

5 years agobpo-36166: Change to rst datamodel file. (GH-13089)
Catherine Alvarado [Sat, 4 May 2019 21:54:35 +0000 (17:54 -0400)]
bpo-36166: Change to rst datamodel file. (GH-13089)

5 years agobpo-36475: Make PyThread_exit_thread with _Py_NO_RETURN (GH-13068)
Victor Stinner [Sat, 4 May 2019 15:48:05 +0000 (11:48 -0400)]
bpo-36475: Make PyThread_exit_thread with _Py_NO_RETURN (GH-13068)

5 years agobpo-26978: Implement pathlib.Path.link_to (Using os.link) (GH-12990)
Joannah Nanjekye [Sat, 4 May 2019 15:27:10 +0000 (11:27 -0400)]
bpo-26978: Implement pathlib.Path.link_to (Using os.link) (GH-12990)

5 years agoSuppress clang warning (GH-12384)
Rémi Lapeyre [Fri, 3 May 2019 23:30:53 +0000 (01:30 +0200)]
Suppress clang warning (GH-12384)

5 years agobpo-28238: Implement "{*}tag" and "{ns}*" wildcard tag selection support for ElementP...
Stefan Behnel [Fri, 3 May 2019 18:58:16 +0000 (20:58 +0200)]
bpo-28238: Implement "{*}tag" and "{ns}*" wildcard tag selection support for ElementPath, and extend the surrounding tests and docs. (GH-12997)

5 years agobpo-33882: mention breakpoint() in debugger-related FAQ (GH-7759)
Andre Delfino [Fri, 3 May 2019 16:53:22 +0000 (13:53 -0300)]
bpo-33882: mention breakpoint() in debugger-related FAQ (GH-7759)

5 years agobpo-24638: Improve the error message in asyncio.ensure_future() (#12848)
Zackery Spytz [Fri, 3 May 2019 15:35:26 +0000 (09:35 -0600)]
bpo-24638: Improve the error message in asyncio.ensure_future() (#12848)

5 years agoFixed typo (GH-11522)
Alexander Vasin [Fri, 3 May 2019 15:25:36 +0000 (18:25 +0300)]
Fixed typo (GH-11522)

Given example does not run, loop variable is missing.

Secondly, this is bad example how to handle shutdown signal, because it would cause `RuntimeError: Event loop stopped before Future completed.`

Perhaps it would be better to cancel all tasks instead of closing loop directly?

Did not create issue, because question is quite simple.

5 years agobpo-36613: call remove_done_callback if exception (GH-12800)
gescheit [Fri, 3 May 2019 15:18:02 +0000 (18:18 +0300)]
bpo-36613: call remove_done_callback if exception (GH-12800)

Call remove_done_callback() in finally block.

https://bugs.python.org/issue36613

5 years agobpo-36341: Fix tests calling bind() on AF_UNIX sockets (GH-12399)
xdegaye [Fri, 3 May 2019 15:09:17 +0000 (17:09 +0200)]
bpo-36341: Fix tests calling bind() on AF_UNIX sockets (GH-12399)

Those tests may fail with PermissionError.

https://bugs.python.org/issue36341

5 years agoImprove grammar on async context managers and shorten text (GH-12379)
Andre Delfino [Fri, 3 May 2019 15:08:10 +0000 (12:08 -0300)]
Improve grammar on async context managers and shorten text (GH-12379)

5 years agoDon't use the LHS/RHS acronym in Simple statements (GH-12996)
Andre Delfino [Fri, 3 May 2019 14:59:05 +0000 (11:59 -0300)]
Don't use the LHS/RHS acronym in Simple statements (GH-12996)

Prefer the full wording instead, as it is more meaningful for someone not familiar with the terms.

Also, LFS/RHS is not used anywhere else in the documentation, while left/right-hand side mentions are common.

5 years agobpo:34848 : Correct an incorrect docstring for range().index method (GH-9877)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Fri, 3 May 2019 12:22:12 +0000 (17:52 +0530)]
bpo:34848 : Correct an incorrect  docstring for range().index method (GH-9877)

5 years agoAdd correct license for C14N test suite to license docs. (GH-13055)
Stefan Behnel [Thu, 2 May 2019 20:11:04 +0000 (22:11 +0200)]
Add correct license for C14N test suite to license docs. (GH-13055)

5 years agobpo-36763: Remove _PyCoreConfig._init_main (GH-13066)
Victor Stinner [Thu, 2 May 2019 19:30:21 +0000 (15:30 -0400)]
bpo-36763: Remove _PyCoreConfig._init_main (GH-13066)

5 years agobpo-36763: _PyCoreConfig_SetPyArgv() preinitializes Python (GH-13037)
Victor Stinner [Thu, 2 May 2019 19:25:34 +0000 (15:25 -0400)]
bpo-36763: _PyCoreConfig_SetPyArgv() preinitializes Python (GH-13037)

_PyCoreConfig_SetPyArgv() and _PyCoreConfig_SetWideString() now
pre-initialize Python if needed to ensure that the locale encoding is
properly configured.

* Add _Py_PreInitializeFromPyArgv() internal function.
* Add 'args' parameter to _Py_PreInitializeFromCoreConfig()

5 years agobpo-36775: _PyCoreConfig only uses wchar_t* (GH-13062)
Victor Stinner [Thu, 2 May 2019 18:56:30 +0000 (14:56 -0400)]
bpo-36775: _PyCoreConfig only uses wchar_t* (GH-13062)

_PyCoreConfig: Change filesystem_encoding, filesystem_errors,
stdio_encoding and stdio_errors fields type from char* to wchar_t*.

Changes:

* PyInterpreterState: replace fscodec_initialized (int) with fs_codec
  structure.
* Add get_error_handler_wide() and unicode_encode_utf8() helper
  functions.
* Add error_handler parameter to unicode_encode_locale()
  and unicode_decode_locale().
* Remove _PyCoreConfig_SetString().
* Rename _PyCoreConfig_SetWideString() to _PyCoreConfig_SetString().
* Rename _PyCoreConfig_SetWideStringFromString()
  to _PyCoreConfig_DecodeLocale().

5 years agobpo-36776: Add @support.skip_unless_symlink to test_lll.py (GH-13058)
Zackery Spytz [Thu, 2 May 2019 18:55:00 +0000 (12:55 -0600)]
bpo-36776: Add @support.skip_unless_symlink to test_lll.py (GH-13058)

5 years agobpo-36763: Add _PyCoreConfig._config_version (GH-13065)
Victor Stinner [Thu, 2 May 2019 18:46:29 +0000 (14:46 -0400)]
bpo-36763: Add _PyCoreConfig._config_version (GH-13065)

Add private _config_version field to _PyPreConfig and _PyCoreConfig
to prepare future ABI compatibility.

5 years agoFix typo: quaatile to quantile (GH=13001)
Xtreak [Thu, 2 May 2019 18:20:59 +0000 (23:50 +0530)]
Fix typo: quaatile to quantile (GH=13001)

5 years agobpo-36775: Add _PyUnicode_InitEncodings() (GH-13057)
Victor Stinner [Thu, 2 May 2019 15:54:20 +0000 (11:54 -0400)]
bpo-36775: Add _PyUnicode_InitEncodings() (GH-13057)

Move get_codec_name() and initfsencoding() from pylifecycle.c to
unicodeobject.c.

Rename also "init" functions in pylifecycle.c.

5 years agobpo-36775: Add _Py_FORCE_UTF8_FS_ENCODING macro (GH-13056)
Victor Stinner [Thu, 2 May 2019 15:28:57 +0000 (11:28 -0400)]
bpo-36775: Add _Py_FORCE_UTF8_FS_ENCODING macro (GH-13056)

Add _Py_FORCE_UTF8_LOCALE and _Py_FORCE_UTF8_FS_ENCODING macros to
avoid factorize "#if defined(__ANDROID__) || defined(__VXWORKS__)"
and "#if defined(__APPLE__)".

Cleanup also config_init_fs_encoding().

5 years agobpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026)
Zackery Spytz [Thu, 2 May 2019 15:03:43 +0000 (09:03 -0600)]
bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026)

5 years agobpo-13611: Include C14N 2.0 test data in installation (GH-13053)
Stefan Behnel [Thu, 2 May 2019 08:35:02 +0000 (10:35 +0200)]
bpo-13611: Include C14N 2.0 test data in installation (GH-13053)

* Include C14N 2.0 test data in installation.
* Add README file to the C14N test data directory to reference the original source and licensing conditions.

5 years agoFix tiny tiny typo in 3.8 what's new (GH-13049)
Daniel Porteous [Thu, 2 May 2019 08:20:59 +0000 (04:20 -0400)]
Fix tiny tiny typo in 3.8 what's new (GH-13049)

I feel silly even making such a tiny typo fix, but I couldn't help but notice it.

5 years agoregarding to grammar and spell check (#13020)
Hossein Pourbozorg [Thu, 2 May 2019 08:17:55 +0000 (12:47 +0430)]
regarding to grammar and spell check (#13020)

5 years agobpo-36763: Make _PyCoreConfig.check_hash_pycs_mode public (GH-13052)
Victor Stinner [Thu, 2 May 2019 03:51:56 +0000 (23:51 -0400)]
bpo-36763: Make _PyCoreConfig.check_hash_pycs_mode public (GH-13052)

_PyCoreConfig: Rename _check_hash_pycs_mode field to
check_hash_pycs_mode (make it public) and change its type from "const
char*" to "wchar_t*".

5 years agoChange bisect to bisect_cmd in docstring (#13040)
Xtreak [Thu, 2 May 2019 02:49:50 +0000 (08:19 +0530)]
Change bisect to bisect_cmd in docstring (#13040)

5 years agobpo-36018: Update example to show mean and stdev (GH-13047)
Raymond Hettinger [Thu, 2 May 2019 00:49:12 +0000 (17:49 -0700)]
bpo-36018: Update example to show mean and stdev (GH-13047)

5 years agoMove dangling bullet points into named subsections (GH-13046)
Raymond Hettinger [Thu, 2 May 2019 00:48:13 +0000 (17:48 -0700)]
Move dangling bullet points into named subsections (GH-13046)

5 years agoMock 100% coverage (GH-13045)
Chris Withers [Wed, 1 May 2019 22:04:04 +0000 (23:04 +0100)]
Mock 100% coverage (GH-13045)

This was achieved by:
* moving many pass statements in tests onto their own lines, so they pass line coverage and can match an easy ignore pattern if branch coverage is added later.
* removing code that cannot be reached.
* removing long-disabled tests.
* removing unused code.
* adding tests for uncovered code

It turned out that removing `if __name__ == '__main__'` blocks that run unittest.main() at the bottom of test files was surprisingly contentious, so they remain and can be filtered out with an appropriate .coveragerc.

5 years agobpo-30458: Use InvalidURL instead of ValueError. (GH-13044)
Gregory P. Smith [Wed, 1 May 2019 20:39:21 +0000 (16:39 -0400)]
bpo-30458: Use InvalidURL instead of ValueError. (GH-13044)

Use http.client.InvalidURL instead of ValueError as the new error case's exception.

5 years agobpo-13611: C14N 2.0 implementation for ElementTree (GH-12966)
Stefan Behnel [Wed, 1 May 2019 20:34:13 +0000 (22:34 +0200)]
bpo-13611: C14N 2.0 implementation for ElementTree (GH-12966)

* Implement C14N 2.0 as a new canonicalize() function in ElementTree.

Missing features:
- prefix renaming in XPath expressions (tag and attribute text is supported)
- preservation of original prefixes given redundant namespace declarations

5 years agoNamespace packages _bootstrap.ModuleSpec.loader attributes are no longer None (#10376)
Géry Ogam [Wed, 1 May 2019 20:08:17 +0000 (22:08 +0200)]
Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer None (#10376)

Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer `None` _after_ calling the importlib._bootstrap._init_module_attrs function.

See:
* https://stackoverflow.com/questions/52869541/namespace-package-spec-loader-and-loader-attributes-not-set-to-none
* https://bugs.python.org/issue35181

5 years agobpo-36676: Namespace prefix aware parsing support for the ET.XMLParser target (GH...
Stefan Behnel [Wed, 1 May 2019 19:49:58 +0000 (21:49 +0200)]
bpo-36676: Namespace prefix aware parsing support for the ET.XMLParser target (GH-12885)

* bpo-36676: Implement namespace prefix aware parsing support for the XMLParser target in ElementTree.

5 years agobpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree...
Stefan Behnel [Wed, 1 May 2019 19:20:38 +0000 (21:20 +0200)]
bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree. (#12883)

* bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree.

* bpo-36673: Rewrite the comment/PI factory handling for the TreeBuilder in "_elementtree" to make it use the same factories as the ElementTree module, and to make it explicit when the comments/PIs are inserted into the tree and when they are not (which is the default).

5 years agobpo-27682: Handle client connection terminations in wsgiref (GH-9713)
Petter Strandmark [Wed, 1 May 2019 17:32:15 +0000 (19:32 +0200)]
bpo-27682: Handle client connection terminations in wsgiref (GH-9713)

5 years agoMNT: set stacklevel in the getfullargspec deprecation warning to 2 (GH-13029)
Thomas A Caswell [Wed, 1 May 2019 15:12:35 +0000 (11:12 -0400)]
MNT: set stacklevel in the getfullargspec deprecation warning to 2 (GH-13029)

This is consistent with the rest of the `warnings.warn` usage in the
inspect.py module and aids identifying code that needs to be fixed.

This warning came in via d5d2b4546939b98244708e5bb0cfccd55b99d244

5 years agobpo-36763: Add _PyCoreConfig_SetString() (GH-13035)
Victor Stinner [Wed, 1 May 2019 13:22:52 +0000 (15:22 +0200)]
bpo-36763: Add _PyCoreConfig_SetString() (GH-13035)

Add 3 new config methods:

* _PyCoreConfig_SetString()
* _PyCoreConfig_SetWideString()
* _PyCoreConfig_SetWideStringFromString()

Changes:

* _PyCoreConfig_Copy() returns _PyInitError.
* Add CONFIG_GET_ENV_DUP().

5 years agobpo-30458: Disable https related urllib tests on a build without ssl (GH-13032)
Xtreak [Wed, 1 May 2019 11:59:49 +0000 (17:29 +0530)]
bpo-30458: Disable https related urllib tests on a build without ssl (GH-13032)

These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures.

https://bugs.python.org/issue30458

5 years agoremove jython support from unittest.mock (GH#13033)
Chris Withers [Wed, 1 May 2019 07:48:44 +0000 (08:48 +0100)]
remove jython support from unittest.mock (GH#13033)

5 years agobpo-36763: Rework _PyInitError API (GH-13031)
Victor Stinner [Wed, 1 May 2019 03:35:33 +0000 (05:35 +0200)]
bpo-36763: Rework _PyInitError API (GH-13031)

* Remove _PyInitError.user_err field and _Py_INIT_USER_ERR() macro:
  use _Py_INIT_ERR() instead. _Py_ExitInitError() now longer calls
  abort() on error: exit with exit code 1 instead.
* Add _PyInitError._type private field.
* exitcode field type is now unsigned int on Windows.
* Rename prefix field to _func.
* Rename msg field to err_msg.

5 years agobpo-30458: Disallow control chars in http URLs. (GH-12755)
Gregory P. Smith [Wed, 1 May 2019 02:12:21 +0000 (19:12 -0700)]
bpo-30458: Disallow control chars in http URLs. (GH-12755)

Disallow control chars in http URLs in urllib.urlopen.  This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected.

5 years agobpo-36763: Add _PyCoreConfig_SetArgv() (GH-13030)
Victor Stinner [Wed, 1 May 2019 00:30:12 +0000 (02:30 +0200)]
bpo-36763: Add _PyCoreConfig_SetArgv() (GH-13030)

* Add 2 new config methods:

  * _PyCoreConfig_SetArgv()
  * _PyCoreConfig_SetWideArgv()

* Add also an internal _PyCoreConfig_SetPyArgv() method.
* Remove 'args' parameter from _PyCoreConfig_Read().

5 years agobpo-36763: Fix Py_SetStandardStreamEncoding() (GH-13028)
Victor Stinner [Tue, 30 Apr 2019 23:36:13 +0000 (01:36 +0200)]
bpo-36763: Fix Py_SetStandardStreamEncoding() (GH-13028)

Fix memory leak in Py_SetStandardStreamEncoding(): release memory
if the function is called twice.

5 years agoDon't report deleted attributes in __dir__ (GH#10148)
Mario Corchero [Tue, 30 Apr 2019 18:56:36 +0000 (19:56 +0100)]
Don't report deleted attributes in __dir__ (GH#10148)

When an attribute is deleted from a Mock, a sentinel is added rather
than just deleting the attribute. This commit checks for such sentinels
when returning the child mocks in the __dir__ method as users won't
expect deleted attributes to appear when performing dir(mock).

5 years agobpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017)
Steve Dower [Tue, 30 Apr 2019 12:03:02 +0000 (12:03 +0000)]
bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017)

5 years agobpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970)
Victor Stinner [Tue, 30 Apr 2019 10:19:34 +0000 (12:19 +0200)]
bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970)

Initialize "stack_t current_stack" to zero using memset().

5 years agobpo-25430: improve performance of IPNetwork.__contains__ (GH-1785)
gescheit [Tue, 30 Apr 2019 07:54:30 +0000 (10:54 +0300)]
bpo-25430: improve performance of IPNetwork.__contains__ (GH-1785)

make a compare in bit-operation manner.

5 years agobpo-36018: Test idempotence. Test two methods against one-another. (GH-13021)
Raymond Hettinger [Tue, 30 Apr 2019 06:47:33 +0000 (23:47 -0700)]
bpo-36018: Test idempotence. Test two methods against one-another. (GH-13021)

5 years agocloses bpo-35329: Change 'Package' to 'package' in accordance with PEP8. (GH-13008)
Utkarsh Gupta [Tue, 30 Apr 2019 02:20:06 +0000 (02:20 +0000)]
closes bpo-35329: Change 'Package' to 'package' in accordance with PEP8. (GH-13008)

5 years agobpo-36751: Deprecate getfullargspec and report positional-only args as regular args...
Pablo Galindo [Tue, 30 Apr 2019 01:01:14 +0000 (02:01 +0100)]
bpo-36751: Deprecate getfullargspec and report positional-only args as regular args (GH-13016)

* bpo-36751: Deprecate getfullargspec and report positional-only args as regular args

* Use inspect.signature in testhelpers

5 years agobpo-36232: Improve error message on dbm.open() when the db doesn't exist (GH-12060)
Marco Rougeth [Mon, 29 Apr 2019 23:23:28 +0000 (00:23 +0100)]
bpo-36232: Improve error message on dbm.open() when the db doesn't exist (GH-12060)

5 years agoPrevent macOS installer build failure if ABIFLAGS is empty. (GH-13012)
Ned Deily [Mon, 29 Apr 2019 19:11:53 +0000 (15:11 -0400)]
Prevent macOS installer build failure if ABIFLAGS is empty. (GH-13012)

5 years agobpo-34602: Avoid failures setting macOS stack resource limit (GH-13011)
Ned Deily [Mon, 29 Apr 2019 19:07:39 +0000 (15:07 -0400)]
bpo-34602: Avoid failures setting macOS stack resource limit (GH-13011)

Under some conditions the earlier fix for bpo-18075, "Infinite recursion
tests triggering a segfault on Mac OS X", now causes failures on macOS
when attempting to change stack limit with resource.setrlimit
resource.RLIMIT_STACK, like regrtest does when running the test suite.
The reverted change had specified a non-default stack size when linking
the python executable on macOS.  As of macOS 10.14.4, the previous
code causes a hard failure when running tests, although similar
failures had been seen under some conditions under some earlier
systems.  For now, revert the original change and resume using
the default stack size when linking the interpreter.

5 years agobpo-1613500: Don't hardcode output file mode in fileinput.FileInput (GH-12986)
Berker Peksag [Mon, 29 Apr 2019 14:55:39 +0000 (17:55 +0300)]
bpo-1613500: Don't hardcode output file mode in fileinput.FileInput (GH-12986)

5 years agobpo-36004: Add date.fromisocalendar (GH-11888)
Paul Ganssle [Mon, 29 Apr 2019 13:22:03 +0000 (09:22 -0400)]
bpo-36004: Add date.fromisocalendar (GH-11888)

This commit implements the first version of date.fromisocalendar, the
inverse function for date.isocalendar.

5 years agobpo-35952: Fix test.pythoninfo when the compiler is missing (GH-13007)
xdegaye [Mon, 29 Apr 2019 12:53:30 +0000 (14:53 +0200)]
bpo-35952: Fix test.pythoninfo when the compiler is missing (GH-13007)

5 years agoAdd initial 'whatsnew' section for PEP 570 (GH-12942)
Guido van Rossum [Mon, 29 Apr 2019 12:49:30 +0000 (05:49 -0700)]
Add initial 'whatsnew' section for PEP 570 (GH-12942)

5 years agobpo-36540: PEP 570 -- Implementation (GH-12701)
Pablo Galindo [Mon, 29 Apr 2019 12:36:57 +0000 (13:36 +0100)]
bpo-36540: PEP 570 -- Implementation (GH-12701)

This commit contains the implementation of PEP570: Python positional-only parameters.

* Update Grammar/Grammar with new typedarglist and varargslist

* Regenerate grammar files

* Update and regenerate AST related files

* Update code object

* Update marshal.c

* Update compiler and symtable

* Regenerate importlib files

* Update callable objects

* Implement positional-only args logic in ceval.c

* Regenerate frozen data

* Update standard library to account for positional-only args

* Add test file for positional-only args

* Update other test files to account for positional-only args

* Add News entry

* Update inspect module and related tests

5 years agoRevert "bpo-36356: Destroy the GIL at exit (GH-12453)" (GH613006)
Victor Stinner [Mon, 29 Apr 2019 11:04:07 +0000 (13:04 +0200)]
Revert "bpo-36356: Destroy the GIL at exit (GH-12453)" (GH613006)

This reverts commit b36e5d627d4232a01850707eb78a5067f3fd77f4.

5 years agobpo-36356: Destroy the GIL at exit (GH-12453)
Victor Stinner [Mon, 29 Apr 2019 09:15:56 +0000 (11:15 +0200)]
bpo-36356: Destroy the GIL at exit (GH-12453)

* Add _PyEval_FiniThreads2(). _PyEval_FiniThreads() now only clears
  the pending lock, whereas _PyEval_FiniThreads2() destroys the GIL.
* pymain_free() now calls _PyEval_FiniThreads2().
* Py_FinalizeEx() now calls _PyEval_FiniThreads().

5 years agobpo-36747: Remove the stale scriptsinstall Makefile target (GH-13003)
xdegaye [Mon, 29 Apr 2019 09:01:42 +0000 (11:01 +0200)]
bpo-36747: Remove the stale scriptsinstall Makefile target (GH-13003)

5 years agobpo-36475: Finalize PyEval_AcquireLock() and PyEval_AcquireThread() properly (GH...
Joannah Nanjekye [Mon, 29 Apr 2019 08:38:45 +0000 (04:38 -0400)]
bpo-36475: Finalize PyEval_AcquireLock() and PyEval_AcquireThread() properly (GH-12667)

PyEval_AcquireLock() and PyEval_AcquireThread() now
terminate the current thread if called while the interpreter is
finalizing, making them consistent with PyEval_RestoreThread(),
Py_END_ALLOW_THREADS, and PyGILState_Ensure().

5 years ago bpo-21536: On Android, C extensions are linked to libpython (GH-12989)
xdegaye [Mon, 29 Apr 2019 07:27:40 +0000 (09:27 +0200)]
 bpo-21536: On Android, C extensions are linked to libpython (GH-12989)

5 years agoFix typo in 'tandem' word (GH-12998) (GH-12998)
Andrey [Mon, 29 Apr 2019 04:33:26 +0000 (14:33 +1000)]
Fix typo in 'tandem' word (GH-12998) (GH-12998)

5 years agobpo-36546: More tests: type preservation and equal inputs (#13000)
Raymond Hettinger [Mon, 29 Apr 2019 04:31:55 +0000 (21:31 -0700)]
bpo-36546: More tests: type preservation and equal inputs (#13000)

5 years agobpo-36729: Delete unused text variable on tests. (GH-12959)
Emmanuel Arias [Mon, 29 Apr 2019 02:24:24 +0000 (23:24 -0300)]
bpo-36729: Delete unused text variable on tests. (GH-12959)

5 years agobpo-36745: Fix a possible reference leak in PyObject_SetAttr() (GH-12993)
Zackery Spytz [Sun, 28 Apr 2019 12:58:52 +0000 (06:58 -0600)]
bpo-36745: Fix a possible reference leak in PyObject_SetAttr() (GH-12993)

https://bugs.python.org/issue36745

5 years agobpo-36715: Add usage note for dict.fromkeys() (GH-12974)
Raymond Hettinger [Sun, 28 Apr 2019 07:22:36 +0000 (00:22 -0700)]
bpo-36715: Add usage note for dict.fromkeys() (GH-12974)

5 years agobpo-32424: Improve test coverage for xml.etree.ElementTree (GH-12891)
Gordon P. Hemsley [Sun, 28 Apr 2019 04:41:43 +0000 (00:41 -0400)]
bpo-32424: Improve test coverage for xml.etree.ElementTree (GH-12891)

* Fix typo in test_cyclic_gc subtest
* Improve test coverage for xml.etree.ElementTree