]> granicus.if.org Git - python/log
python
5 years agoFix indentation in logging.handlers.setStream (GH-14358)
Andre Delfino [Sat, 29 Jun 2019 21:57:39 +0000 (18:57 -0300)]
Fix indentation in logging.handlers.setStream (GH-14358)

5 years agobpo-37369: Fixes crash when reporting fatal error (GH-14468)
Steve Dower [Sat, 29 Jun 2019 21:28:43 +0000 (14:28 -0700)]
bpo-37369: Fixes crash when reporting fatal error (GH-14468)

5 years agobpo-37369: Fix initialization of sys members when launched via an app container ...
Steve Dower [Sat, 29 Jun 2019 17:34:11 +0000 (10:34 -0700)]
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

5 years agobpo-19696: Moved "test_pkgimport.py" to dir "test_importlib" (GH-14303)
Kyle Stanley [Fri, 28 Jun 2019 19:37:11 +0000 (15:37 -0400)]
bpo-19696: Moved "test_pkgimport.py" to dir "test_importlib" (GH-14303)

Also renamed the file to "test_pkg_import.py" to better follow the naming convention. Component of issue 19696.

https://bugs.python.org/issue19696

5 years agobpo-37403: Touch up venv docs (GH-14458)
Brett Cannon [Fri, 28 Jun 2019 19:14:31 +0000 (12:14 -0700)]
bpo-37403: Touch up venv docs (GH-14458)

Add a versionadded for PS Core and note that `.venv` is a common virtual environment name.

5 years agobpo-31783: Fix a race condition creating workers during shutdown (#13171)
Brian Quinlan [Fri, 28 Jun 2019 18:54:52 +0000 (11:54 -0700)]
bpo-31783: Fix a race condition creating workers during shutdown (#13171)

* bpo-31783: Fix a race condition while creating workers during interpreter shutdown

* ðŸ“œðŸ¤– Added by blurb_it.

5 years agobpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)
Victor Stinner [Fri, 28 Jun 2019 17:39:48 +0000 (19:39 +0200)]
bpo-37412: Fix test_os.test_getcwd_long_path() on macOS (GH-14452)

5 years agobpo-37380: subprocess: don't use _active on win (GH-14360)
Ruslan Kuprieiev [Fri, 28 Jun 2019 16:12:16 +0000 (19:12 +0300)]
bpo-37380: subprocess: don't use _active on win (GH-14360)

As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

> Unlike Unix, a process in Windows doesn't have to be waited on by
> its parent to avoid a zombie. Keeping the handle open will actually
> create a zombie until the next _cleanup() call, which may be never
> if Popen() isn't called again.

This patch simply defines `subprocess._active` as `None`, for which we already
have the proper logic in place in `subprocess.Popen.__del__`, that prevents it
from trying to append the process to the `_active`. This patch also defines
`subprocess._cleanup` as a noop for Windows.

[1] https://bugs.python.org/issue37380#msg346333
[2] https://bugs.python.org/issue36067#msg336262

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
5 years agobpo-37412: pythoninfo: add Windows long paths (GH-14434)
Victor Stinner [Fri, 28 Jun 2019 16:05:05 +0000 (18:05 +0200)]
bpo-37412: pythoninfo: add Windows long paths (GH-14434)

On Windows, test.pythoninfo now checks if support for long paths is
enabled using ntdll.RtlAreLongPathsEnabled() function.

Co-Authored-By: Eryk Sun <eryksun@gmail.com>
5 years agobpo-37412: Fix os.getcwd() for long path on Windows (GH-14424)
Victor Stinner [Fri, 28 Jun 2019 16:01:59 +0000 (18:01 +0200)]
bpo-37412: Fix os.getcwd() for long path on Windows (GH-14424)

* Fix test for integer overflow.
* Add an unit test.

5 years agobpo-20443: Fix calculate_program_full_path() warning (GH-14446)
Victor Stinner [Fri, 28 Jun 2019 14:49:38 +0000 (16:49 +0200)]
bpo-20443: Fix calculate_program_full_path() warning (GH-14446)

Don't call _Py_isabs() with a bytes string (char*), the function
expects as wide string.

5 years agobpo-37337: Add _PyObject_VectorcallMethod() (GH-14228)
Jeroen Demeyer [Fri, 28 Jun 2019 09:49:00 +0000 (11:49 +0200)]
bpo-37337: Add _PyObject_VectorcallMethod() (GH-14228)

5 years agobpo-37432: Doc: Fix signature of PyObject_Del() (GH-14430)
Hai Shi [Fri, 28 Jun 2019 09:02:57 +0000 (04:02 -0500)]
bpo-37432: Doc: Fix signature of PyObject_Del() (GH-14430)

5 years agocloses bpo-37437: Update vendorized expat to 2.2.7. (GH-14436)
Benjamin Peterson [Fri, 28 Jun 2019 03:54:44 +0000 (20:54 -0700)]
closes bpo-37437: Update vendorized expat to 2.2.7. (GH-14436)

5 years agobpo-37390: Add audit event table to documentations (GH-14406)
Steve Dower [Thu, 27 Jun 2019 17:47:59 +0000 (10:47 -0700)]
bpo-37390: Add audit event table to documentations (GH-14406)

Also updates some (unreleased) event names to be consistent with the others.

5 years agobpo-30345: travis: use -Og with --with-pydebug (GH-14423)
Inada Naoki [Thu, 27 Jun 2019 17:05:37 +0000 (02:05 +0900)]
bpo-30345: travis: use -Og with --with-pydebug (GH-14423)

5 years agocloses bpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)
Brandt Bucher [Thu, 27 Jun 2019 16:10:57 +0000 (09:10 -0700)]
closes bpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)

5 years agoReplace deprecation warning with RuntimeError (GH-14397)
Andrew Svetlov [Thu, 27 Jun 2019 11:38:47 +0000 (14:38 +0300)]
Replace deprecation warning with RuntimeError (GH-14397)

5 years agobpo-33926: enable GDB tests on Travis CI (GH-14395)
Jeroen Demeyer [Thu, 27 Jun 2019 11:17:44 +0000 (13:17 +0200)]
bpo-33926: enable GDB tests on Travis CI (GH-14395)

5 years agobpo-35389: platform.platform() calls libc_ver() without executable (GH-14418)
Victor Stinner [Thu, 27 Jun 2019 07:04:28 +0000 (09:04 +0200)]
bpo-35389: platform.platform() calls libc_ver() without executable (GH-14418)

When libc_ver() is called with an executable, the
os.confstr('CS_GNU_LIBC_VERSION') fast-path cannot be taken. Modify
platform.platform() to call libc_ver() without executable, instead of
calling libc_ver(sys.executable), since sys.executable is already the
default value.

5 years agobpo-37421: Fix test_shutil: don't leak temporary files (GH-14416)
Victor Stinner [Wed, 26 Jun 2019 23:39:53 +0000 (01:39 +0200)]
bpo-37421: Fix test_shutil: don't leak temporary files (GH-14416)

* Fix typo in supports_file2file_sendfile(); ensure that dst is
  removed
* Fix test_copytree_custom_copy_function(): remove dst tree.
  Use support.rmtree() rather than shutil.rmtree() to remove
  temporary directories: support tries harder.

5 years agobpo-37376: pprint support for SimpleNamespace (GH-14318)
Carl Bordum Hansen [Wed, 26 Jun 2019 23:13:18 +0000 (01:13 +0200)]
bpo-37376: pprint support for SimpleNamespace (GH-14318)

https://bugs.python.org/issue37376

5 years agobpo-37419: Fix possible segfaults when passing large sequences to os.posix_spawn...
Zackery Spytz [Wed, 26 Jun 2019 20:54:20 +0000 (14:54 -0600)]
bpo-37419: Fix possible segfaults when passing large sequences to os.posix_spawn() (GH-14409)

Use Py_ssize_t instead of int for i.

5 years agobpo-29412: Fix indexError when parsing a header value ending unexpectedly (GH-14387)
Abhilash Raj [Wed, 26 Jun 2019 20:13:02 +0000 (13:13 -0700)]
bpo-29412: Fix indexError when parsing a header value ending unexpectedly (GH-14387)

* patched string index out of range error in get_word function of _header_value_parser.py and created tests in test__header_value_parser.py for CFWS.
* Raise HeaderParseError instead of continuing when parsing a word.

5 years agobpo-37417: Fix error handling in bytearray.extend. (GH-14407)
Brandt Bucher [Wed, 26 Jun 2019 19:06:18 +0000 (12:06 -0700)]
bpo-37417: Fix error handling in bytearray.extend. (GH-14407)

5 years agobpo-37411: Rewrite test_wsgiref.testEnviron() (GH-14394)
Victor Stinner [Wed, 26 Jun 2019 16:16:35 +0000 (18:16 +0200)]
bpo-37411: Rewrite test_wsgiref.testEnviron() (GH-14394)

Fix test_wsgiref.testEnviron() to no longer depend on the environment
variables (don't fail if "X" variable is set).

testEnviron() now overrides os.environ to get a deterministic
environment. Test full TestHandler.environ content: not only a few
selected variables.

5 years agobpo-37163: Make the obj argument of dataclasses.replace() a positional-only. (GH...
Serhiy Storchaka [Wed, 26 Jun 2019 16:07:44 +0000 (19:07 +0300)]
bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. (GH-14390)

5 years agobpo-37414: Remove sys.callstats() (GH-14398)
Victor Stinner [Wed, 26 Jun 2019 16:01:10 +0000 (18:01 +0200)]
bpo-37414: Remove sys.callstats() (GH-14398)

Remove the undocumented sys.callstats() function. Since Python 3.7,
it was deprecated and always returned None. It required a special
build option CALL_PROFILE which was already removed in Python 3.7.

5 years agoImprove Windows commands in tutorial (GH-14379)
Steve Dower [Wed, 26 Jun 2019 15:55:57 +0000 (08:55 -0700)]
Improve Windows commands in tutorial (GH-14379)

5 years agobpo-37412: os.getcwdb() now uses UTF-8 on Windows (GH-14396)
Victor Stinner [Wed, 26 Jun 2019 15:31:12 +0000 (17:31 +0200)]
bpo-37412: os.getcwdb() now uses UTF-8 on Windows (GH-14396)

The os.getcwdb() function now uses the UTF-8 encoding on Windows,
rather than the ANSI code page: see PEP 529 for the rationale. The
function is no longer deprecated on Windows.

os.getcwd() and os.getcwdb() now detect integer overflow on memory
allocations. On Unix, these functions properly report MemoryError on
memory allocation failure.

5 years agobpo-37406: sqlite3 raises TypeError for wrong operation type (GH-14386)
Victor Stinner [Wed, 26 Jun 2019 01:16:24 +0000 (03:16 +0200)]
bpo-37406: sqlite3 raises TypeError for wrong operation type (GH-14386)

The sqlite3 module now raises TypeError, rather than ValueError, if
operation argument type is not str: execute(), executemany() and
calling a connection.

5 years agobpo-37388: Add PyUnicode_Decode(str, 0) fast-path (GH-14385)
Victor Stinner [Tue, 25 Jun 2019 23:49:32 +0000 (01:49 +0200)]
bpo-37388: Add PyUnicode_Decode(str, 0) fast-path (GH-14385)

Add a fast-path to PyUnicode_Decode() for size equals to 0.

5 years agobpo-37388: Development mode check encoding and errors (GH-14341)
Victor Stinner [Tue, 25 Jun 2019 22:51:05 +0000 (00:51 +0200)]
bpo-37388: Development mode check encoding and errors (GH-14341)

In development mode and in debug build, encoding and errors arguments
are now checked on string encoding and decoding operations. Examples:
open(), str.encode() and bytes.decode().

By default, for best performances, the errors argument is only
checked at the first encoding/decoding error, and the encoding
argument is sometimes ignored for empty strings.

5 years agobpo-37244: Fix test_multiprocessing.test_resource_tracker() (GH-14288)
Pierre Glaser [Tue, 25 Jun 2019 22:30:17 +0000 (00:30 +0200)]
bpo-37244: Fix test_multiprocessing.test_resource_tracker() (GH-14288)

Increase robustness of test_resource_tracker(): retry for 60 seconds.

5 years agobpo-36888, test_multiprocessing: Increase test_parent_process timeout (GH-14286)
Pierre Glaser [Tue, 25 Jun 2019 20:44:11 +0000 (22:44 +0200)]
bpo-36888, test_multiprocessing: Increase test_parent_process timeout (GH-14286)

5 years agobpo-33972: Fix EmailMessage.iter_attachments raising AttributeError. (GH-14119)
Abhilash Raj [Tue, 25 Jun 2019 17:03:19 +0000 (10:03 -0700)]
bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError. (GH-14119)

* bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError.

When certain malformed messages have content-type set to 'mulitpart/*' but
still have a single part body, iter_attachments can raise AttributeError. This
patch fixes it by returning a None value instead when the body is single part.

5 years agobpo-37400: Fix test_os.test_chown() (GH-14374)
Victor Stinner [Tue, 25 Jun 2019 15:06:24 +0000 (17:06 +0200)]
bpo-37400: Fix test_os.test_chown() (GH-14374)

Use os.getgroups() rather than grp.getgrall() to get groups.
Rename also the test to test_chown_gid().

5 years agobpo-20443: _PyConfig_Read() gets the absolute path of run_filename (GH-14053)
Victor Stinner [Tue, 25 Jun 2019 13:02:43 +0000 (15:02 +0200)]
bpo-20443: _PyConfig_Read() gets the absolute path of run_filename (GH-14053)

Python now gets the absolute path of the script filename specified on
the command line (ex: "python3 script.py"): the __file__ attribute of
the __main__ module, sys.argv[0] and sys.path[0] become an absolute
path, rather than a relative path.

* Add _Py_isabs() and _Py_abspath() functions.
* _PyConfig_Read() now tries to get the absolute path of
  run_filename, but keeps the relative path if _Py_abspath() fails.
* Reimplement os._getfullpathname() using _Py_abspath().
* Use _Py_isabs() in getpath.c.

5 years agobpo-37392: Update the dir(sys) in module tutorial (GH-14365)
Xtreak [Tue, 25 Jun 2019 12:16:55 +0000 (17:46 +0530)]
bpo-37392: Update the dir(sys) in module tutorial (GH-14365)

5 years agobpo-37400: pythoninfo logs getpwuid and getgrouplist (GH-14373)
Victor Stinner [Tue, 25 Jun 2019 11:37:27 +0000 (13:37 +0200)]
bpo-37400: pythoninfo logs getpwuid and getgrouplist (GH-14373)

test.pythoninfo now also logs pwd.getpwuid(os.getuid()) and
os.getgrouplist(). Extract also os.getrandom() test to run it first.

5 years agoFix minor spelling error in What's new for Python 3.8 (GH-14371)
Pablo Galindo [Tue, 25 Jun 2019 10:55:23 +0000 (11:55 +0100)]
Fix minor spelling error in What's new for Python 3.8 (GH-14371)

5 years agobpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304)
Serhiy Storchaka [Tue, 25 Jun 2019 08:54:18 +0000 (11:54 +0300)]
bpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304)

* The UTF-8 incremental decoders fails now fast if encounter
  a sequence that can't be handled by the error handler.
* The UTF-16 incremental decoders with the surrogatepass error
  handler decodes now a lone low surrogate with final=False.

5 years agobpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)
Zackery Spytz [Tue, 25 Jun 2019 06:49:46 +0000 (00:49 -0600)]
bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)

eval() was being called an extra time without a filter for
deprecation warnings.

5 years ago bpo-36546: Mark first argument as position only (GH-14363)
Raymond Hettinger [Tue, 25 Jun 2019 02:39:22 +0000 (04:39 +0200)]
 bpo-36546: Mark first argument as position only (GH-14363)

5 years agobpo-37394: Fix pure Python implementation of the queue module (GH-14351)
Pablo Galindo [Tue, 25 Jun 2019 01:53:30 +0000 (02:53 +0100)]
bpo-37394: Fix pure Python implementation of the queue module (GH-14351)

5 years agobpo-35224: Add What's new entry for evaluation order in dict comprehensions (GH-14319)
Pablo Galindo [Tue, 25 Jun 2019 01:41:58 +0000 (02:41 +0100)]
bpo-35224: Add What's new entry for evaluation order in dict comprehensions (GH-14319)

5 years agobpo-37392: Remove sys.setcheckinterval() (GH-14355)
Victor Stinner [Tue, 25 Jun 2019 01:01:08 +0000 (03:01 +0200)]
bpo-37392: Remove sys.setcheckinterval() (GH-14355)

Remove sys.getcheckinterval() and sys.setcheckinterval() functions.
They were deprecated since Python 3.2. Use sys.getswitchinterval()
and sys.setswitchinterval() instead.

Remove also check_interval field of the PyInterpreterState structure.

5 years agobpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes...
David K. Hess [Mon, 24 Jun 2019 23:46:59 +0000 (18:46 -0500)]
bpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes (GH-3062)

5 years agobpo-25361: Enable SSE2 instructions for Windows 32-bit build (GH-12438)
animalize [Mon, 24 Jun 2019 23:43:26 +0000 (07:43 +0800)]
bpo-25361: Enable SSE2 instructions for Windows 32-bit build (GH-12438)

5 years agobpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14179)
animalize [Mon, 24 Jun 2019 23:22:14 +0000 (07:22 +0800)]
bpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14179)

5 years agobpo-36889: Document asyncio Stream and StreamServer (GH-14203)
Xtreak [Mon, 24 Jun 2019 18:16:58 +0000 (23:46 +0530)]
bpo-36889: Document asyncio Stream and StreamServer (GH-14203)

5 years agobpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751)
ziheng [Mon, 24 Jun 2019 17:59:51 +0000 (01:59 +0800)]
bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751)

5 years agoGet rid of exception traceback printing in asyncio tests (GH-14343)
Andrew Svetlov [Mon, 24 Jun 2019 16:47:28 +0000 (19:47 +0300)]
Get rid of exception traceback printing in asyncio tests (GH-14343)

5 years agobpo-37363: Add audit events for a range of modules (GH-14301)
Steve Dower [Mon, 24 Jun 2019 15:42:54 +0000 (08:42 -0700)]
bpo-37363: Add audit events for a range of modules (GH-14301)

5 years agobpo-37359: Fix regrtest --cleanup (GH-14336)
Victor Stinner [Mon, 24 Jun 2019 11:19:48 +0000 (13:19 +0200)]
bpo-37359: Fix regrtest --cleanup (GH-14336)

5 years agobpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858)
Jeroen Demeyer [Mon, 24 Jun 2019 10:41:05 +0000 (12:41 +0200)]
bpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858)

5 years agobpo-37359: Add --cleanup option to python3 -m test (GH-14332)
Victor Stinner [Mon, 24 Jun 2019 10:03:00 +0000 (12:03 +0200)]
bpo-37359: Add --cleanup option to python3 -m test (GH-14332)

* regrtest: Add --cleanup option to remove "test_python_*" directories
  of previous failed test jobs.
* Add "make cleantest" to run "python3 -m test --cleanup".

5 years agobpo-37345: Add formal UDPLITE support (GH-14258)
Gabe Appleton [Mon, 24 Jun 2019 09:58:56 +0000 (02:58 -0700)]
bpo-37345: Add formal UDPLITE support (GH-14258)

At the moment you can definitely use UDPLITE sockets on Linux systems, but it would be good if this support were formalized such that you can detect support at runtime easily.

At the moment, to make and use a UDPLITE socket requires something like the following code:

```
>>> import socket
>>> a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 136)
>>> b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 136)
>>> a.bind(('localhost', 44444))
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.setsockopt(136, 10, 16)
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.setsockopt(136, 10, 32)
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.setsockopt(136, 10, 64)
>>> b.sendto(b'test'*256, ('localhost', 44444))
```

If you look at this through Wireshark, you can see that the packets are different in that the checksums and checksum coverages change.

With the pull request that I am submitting momentarily, you could do the following code instead:

```
>>> import socket
>>> a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
>>> b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
>>> a.bind(('localhost', 44444))
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.set_send_checksum_coverage(16)
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.set_send_checksum_coverage(32)
>>> b.sendto(b'test'*256, ('localhost', 44444))
>>> b.set_send_checksum_coverage(64)
>>> b.sendto(b'test'*256, ('localhost', 44444))
```

One can also detect support for UDPLITE just by checking

```
>>> hasattr(socket, 'IPPROTO_UDPLITE')
```

https://bugs.python.org/issue37345

5 years agobpo-37348: optimize decoding ASCII string (GH-14283)
Inada Naoki [Mon, 24 Jun 2019 03:30:24 +0000 (12:30 +0900)]
bpo-37348: optimize decoding ASCII string (GH-14283)

`_PyUnicode_Writer` is a relatively complex structure.  Initializing it is significant overhead when decoding short ASCII string.

5 years agobpo-35224: Bump the pyc magic number by 1 instead of by 10 in last modification ...
Pablo Galindo [Sun, 23 Jun 2019 16:00:08 +0000 (17:00 +0100)]
bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last modification (GH-14320)

5 years agobpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)
Pablo Galindo [Sat, 22 Jun 2019 22:47:34 +0000 (23:47 +0100)]
bpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)

5 years agoasyncio: Fix docs for default event loop (#14308)
Ben Darnell [Sat, 22 Jun 2019 17:38:21 +0000 (13:38 -0400)]
asyncio: Fix docs for default event loop (#14308)

When the Windows default event loop changed, `asyncio-policy.rst` was updated but `asyncio-eventloop.rst` was missed.

5 years agobpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)
Jörn Heissler [Sat, 22 Jun 2019 14:40:55 +0000 (16:40 +0200)]
bpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)

… as proposed in PEP 572; key is now evaluated before value.

https://bugs.python.org/issue35224

5 years agoImprove threading.daemon docstring (GH-14278)
mbarkhau [Sat, 22 Jun 2019 12:51:06 +0000 (14:51 +0200)]
Improve threading.daemon docstring (GH-14278)

Rephrase and clarify that "the entire Python program exits when only daemon threads are left". This matches the documentation at https://docs.python.org/3/library/threading.html#thread-objects.

5 years agobpo-37323: Suppress DeprecationWarning raised by @asyncio.coroutine (GH-14293)
Xtreak [Sat, 22 Jun 2019 10:25:26 +0000 (15:55 +0530)]
bpo-37323: Suppress DeprecationWarning raised by @asyncio.coroutine (GH-14293)

When the test is ran with `PYTHONWARNINGS=error` the environment variable is passed to the python interpreter used in `assert_python_ok` where `DeprecationWarning` from  `@asyncio.coroutine` is converted into an error. Ignore the `DeprecationWarning` in `assert_python_ok`.

https://bugs.python.org/issue37323

5 years agobpo-37364: Use io.open_code() to read .pth files (GH-14299)
Steve Dower [Fri, 21 Jun 2019 22:16:46 +0000 (15:16 -0700)]
bpo-37364: Use io.open_code() to read .pth files (GH-14299)

https://bugs.python.org/issue37364

5 years agobpo-37351: Removes libpython38.a from standard Windows distribution (#14276)
Steve Dower [Fri, 21 Jun 2019 21:28:46 +0000 (14:28 -0700)]
bpo-37351: Removes libpython38.a from standard Windows distribution (#14276)

5 years agobpo-37362: test_gdb now ignores stderr (GH-14287)
Victor Stinner [Fri, 21 Jun 2019 21:17:30 +0000 (23:17 +0200)]
bpo-37362: test_gdb now ignores stderr (GH-14287)

test_gdb no longer fails if it gets an "unexpected" message on
stderr: it now ignores stderr. The purpose of test_gdb is to test
that python-gdb.py commands work as expected, not to test gdb.

5 years agoUse `python -m pip install` in porting guide and venv docs (GH-13257)
Brad [Fri, 21 Jun 2019 18:20:21 +0000 (14:20 -0400)]
Use `python -m pip install` in porting guide and venv docs (GH-13257)

This is to help prevent people from accidentally installing into the wrong Python interpreter if they are not aware of which Python interpreter `pip` points to.

5 years agobpo-30202 : Update test.test_importlib.test_abc to test find_spec() (GH-12847)
Joannah Nanjekye [Fri, 21 Jun 2019 18:17:00 +0000 (15:17 -0300)]
bpo-30202 : Update test.test_importlib.test_abc to test find_spec() (GH-12847)

5 years agobpo-36511: Fix -u parameters for ARM32 tests (GH-14280)
Paul Monson [Fri, 21 Jun 2019 16:40:05 +0000 (09:40 -0700)]
bpo-36511: Fix -u parameters for ARM32 tests (GH-14280)

5 years agobpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
Zackery Spytz [Fri, 21 Jun 2019 15:31:59 +0000 (09:31 -0600)]
bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)

Also, add a missing call to va_end() in PySys_Audit().

5 years agobpo-36210: update optional extension handling for AIX (GH-12202)
Michael Felt [Fri, 21 Jun 2019 13:58:00 +0000 (15:58 +0200)]
bpo-36210: update optional extension handling for AIX (GH-12202)

* Switch to officially supported curses from 3rd-party ASIS supported ncurses
* stop saying optional modules osaudiodev and spwd are missing on AIX

Patch by M.Felt

5 years agoDocs: Improved phrasing (GH-14069)
Aeros [Fri, 21 Jun 2019 04:43:07 +0000 (00:43 -0400)]
Docs: Improved phrasing (GH-14069)

* Docs: Improved phrasing

Removed usage of second person pronouns in the section and made the assumption of "uneasiness" in code style transition more neutral.

* Removed trailing whitespace on line 34

5 years agoRemove redundant if check from optional argument function in argparse. (GH-8766)
Shashank Parekh [Fri, 21 Jun 2019 03:02:22 +0000 (08:32 +0530)]
Remove redundant if check from optional argument function in argparse. (GH-8766)

5 years agobpo-37289: Add a test for if with ifexpr in the peephole optimiser to detect regressi...
Pablo Galindo [Thu, 20 Jun 2019 21:17:03 +0000 (22:17 +0100)]
bpo-37289: Add a test for if with ifexpr in the peephole optimiser to detect regressions (GH-14127)

5 years agoUpdate What's New in Python 3.9 (GH-14253)
Victor Stinner [Thu, 20 Jun 2019 20:41:25 +0000 (22:41 +0200)]
Update What's New in Python 3.9 (GH-14253)

* Mention bpo of PyImport_Cleanup removal
* Fix bpo number of PyByteArray_Init removal

5 years agobpo-36511: Improve ARM32 buildbot scripts (GH-14251)
Paul Monson [Thu, 20 Jun 2019 16:33:32 +0000 (09:33 -0700)]
bpo-36511: Improve ARM32 buildbot scripts (GH-14251)

5 years agobpo-37151: remove _PyCFunction_FastCallDict (GH-14269)
Jeroen Demeyer [Thu, 20 Jun 2019 15:38:46 +0000 (17:38 +0200)]
bpo-37151: remove _PyCFunction_FastCallDict (GH-14269)

5 years agoFix typo, 'widger' -> 'widget', in idlelib/tree.py (GH-14263)
İsmail Arılık [Thu, 20 Jun 2019 14:30:55 +0000 (17:30 +0300)]
Fix typo, 'widger' -> 'widget', in idlelib/tree.py (GH-14263)

5 years agoFix bpo number in News file. (GH-14260)
Eric V. Smith [Thu, 20 Jun 2019 08:22:28 +0000 (04:22 -0400)]
Fix bpo number in News file. (GH-14260)

5 years agobpo-37342: Fix the incorrect nb_index's type in typeobj documentation (GH-14241)
Hai Shi [Thu, 20 Jun 2019 03:32:24 +0000 (22:32 -0500)]
bpo-37342: Fix the incorrect nb_index's type in typeobj documentation (GH-14241)

It was listed as `binaryfunc`. It should be `unaryfunc`.

5 years agoUpdate What's New in Python 3.8 (GH-14239)
Victor Stinner [Wed, 19 Jun 2019 23:44:58 +0000 (01:44 +0200)]
Update What's New in Python 3.8 (GH-14239)

* Mention issue in which ByByteArray_Init() has been removed.
* Fix typo

5 years agobpo-36710: Use tstate in pylifecycle.c (GH-14249)
Victor Stinner [Wed, 19 Jun 2019 22:05:23 +0000 (00:05 +0200)]
bpo-36710: Use tstate in pylifecycle.c (GH-14249)

In pylifecycle.c: pass tstate argument, rather than interp argument,
to functions.

5 years agoAdd missing single quote in io.TextIOWrapper.reconfigure documentation (GH-14246)
Harmon [Wed, 19 Jun 2019 21:01:27 +0000 (16:01 -0500)]
Add missing single quote in io.TextIOWrapper.reconfigure documentation (GH-14246)

Add a missing single quote character in the documentation for `io.TextIOWrapper.reconfigure`.

5 years agobpo-36511: Add buildbot scripts and fix tests for Windows ARM32 buildbot (GH-13454)
Paul Monson [Wed, 19 Jun 2019 20:09:54 +0000 (13:09 -0700)]
bpo-36511: Add buildbot scripts and fix tests for Windows ARM32 buildbot (GH-13454)

5 years agobpo-37333: Ensure IncludeTkinter has a value (GH-14240)
Steve Dower [Wed, 19 Jun 2019 20:07:23 +0000 (13:07 -0700)]
bpo-37333: Ensure IncludeTkinter has a value (GH-14240)

5 years agobpo-37331: Clarify format of socket handler messages in the documentation. (GH-14234)
Vinay Sajip [Wed, 19 Jun 2019 14:29:57 +0000 (15:29 +0100)]
bpo-37331: Clarify format of socket handler messages in the documentation. (GH-14234)

5 years agobpo-37258: Not a bug, but added a unit test and updated documentation. (GH-14229)
Vinay Sajip [Wed, 19 Jun 2019 10:46:53 +0000 (11:46 +0100)]
bpo-37258: Not a bug, but added a unit test and updated documentation. (GH-14229)

5 years agobpo-36710: Remove PyImport_Cleanup() function (GH-14221)
Victor Stinner [Wed, 19 Jun 2019 08:36:10 +0000 (10:36 +0200)]
bpo-36710: Remove PyImport_Cleanup() function (GH-14221)

* Rename PyImport_Cleanup() to _PyImport_Cleanup() and move it to the
  internal C API. Add 'tstate' parameters.
* Remove documentation of _PyImport_Init(), PyImport_Cleanup(),
  _PyImport_Fini(). All three were documented as "For internal use
  only.".

5 years agoFix name of '\0'. (GH-14222)
Benjamin Peterson [Wed, 19 Jun 2019 04:37:58 +0000 (21:37 -0700)]
Fix name of '\0'. (GH-14222)

'\0' is the NUL byte not NULL.

5 years agobpo-36710: Add tstate parameter in import.c (GH-14218)
Victor Stinner [Wed, 19 Jun 2019 00:54:39 +0000 (02:54 +0200)]
bpo-36710: Add tstate parameter in import.c (GH-14218)

* Add 'tstate' parameter to many internal import.c functions.
* _PyImportZip_Init() now gets 'tstate' parameter rather than
  'interp'.
* Add 'interp' parameter to _PyState_ClearModules() and rename it
  to _PyInterpreterState_ClearModules().
* Move private _PyImport_FindBuiltin() to the internal C API; add
  'tstate' parameter to it.
* Remove private _PyImport_AddModuleObject() from the C API:
  use public PyImport_AddModuleObject() instead.
* Remove private _PyImport_FindExtensionObjectEx() from the C API:
  use private _PyImport_FindExtensionObject() instead.

5 years agoDocument typing.ForwardRef (GH-14216)
Ivan Levkivskyi [Wed, 19 Jun 2019 00:31:51 +0000 (01:31 +0100)]
Document typing.ForwardRef (GH-14216)

5 years agoDocument changes in PyNode_AddChild and PyParser_AddToken (GH-14214)
Ivan Levkivskyi [Wed, 19 Jun 2019 00:17:47 +0000 (01:17 +0100)]
Document changes in PyNode_AddChild and PyParser_AddToken (GH-14214)

I didn't find any entries in the docs about these functions, so I just mentioned them, in "What's New".

5 years agobpo-35134: Add Include/cpython/import.h header file (GH-14213)
Victor Stinner [Tue, 18 Jun 2019 22:48:09 +0000 (00:48 +0200)]
bpo-35134: Add Include/cpython/import.h header file (GH-14213)

* Add Include/cpython/import.h and Include/internal/pycore_import.h
  header files.
* Move _PyImport_ReInitLock() to the internal C API. Don't export the
  symbol anymore.

5 years agobpo-37325: Fix focus traversal for 2 IDLE dialogs (#14209)
Terry Jan Reedy [Tue, 18 Jun 2019 21:08:24 +0000 (17:08 -0400)]
bpo-37325: Fix focus traversal for 2 IDLE dialogs (#14209)

Tab now moves focus across and down for Help Source and Custom Run.

5 years agoAdd pganssle to CODEOWNERS and ACKS (GH-14138)
Paul Ganssle [Tue, 18 Jun 2019 18:57:45 +0000 (19:57 +0100)]
Add pganssle to CODEOWNERS and ACKS (GH-14138)

Also adds abalkin to CODEOWNERS for date and time related files.

5 years agobpo-34903: Document that some strptime formats only require 1 digit (GH-14149)
Mike Gleen [Tue, 18 Jun 2019 18:14:57 +0000 (19:14 +0100)]
bpo-34903: Document that some strptime formats only require 1 digit (GH-14149)

For datetime.datetime.strptime(), the leading zero for some two-digit formats is optional.

This adds a footnote to the strftime/strptime documentation to reflect this fact, and adds some tests to ensure that it is true.

bpo-34903

5 years agobpo-37151: remove _PyFunction_FastCallDict (GH-13864)
Jeroen Demeyer [Tue, 18 Jun 2019 11:05:41 +0000 (13:05 +0200)]
bpo-37151: remove _PyFunction_FastCallDict (GH-13864)

5 years agobpo-35360: Update macOS installer to use SQLite 3.28.0 (GH-14180)
animalize [Tue, 18 Jun 2019 09:25:19 +0000 (17:25 +0800)]
bpo-35360: Update macOS installer to use SQLite 3.28.0 (GH-14180)