]> granicus.if.org Git - python/log
python
6 years agobpo-34576 - Fix the formatting for security considerations in http.server.rst (#10005)
Senthil Kumaran [Sat, 20 Oct 2018 18:32:07 +0000 (11:32 -0700)]
bpo-34576 - Fix the formatting for security considerations in http.server.rst (#10005)

* bpo-34576 - Fix the formatting for security considerations in http.server.rst

* Address review comment.

6 years agoEncrypt Zulip webhook address (GH-10010)
Zachary Ware [Sat, 20 Oct 2018 16:35:21 +0000 (11:35 -0500)]
Encrypt Zulip webhook address (GH-10010)

This should reduce false failure reports to the Zulip 'core/test runs'
stream from Travis failures on private forks.

6 years agobpo-35032: Remove inaccessible videos from faq/Windows (GH-10004)
Stéphane Wirtel [Sat, 20 Oct 2018 15:27:03 +0000 (17:27 +0200)]
bpo-35032: Remove inaccessible videos from faq/Windows (GH-10004)

https://bugs.python.org/issue35032

6 years agobpo-34839: Add a 'before 3.6' in the section 'warnings' of doctest (GH-9736)
Stéphane Wirtel [Sat, 20 Oct 2018 08:43:32 +0000 (10:43 +0200)]
bpo-34839: Add a 'before 3.6' in the section 'warnings' of doctest (GH-9736)

6 years agobpo-34574: Prevent OrderedDict iterators from exhaustion during pickling. (GH-9051)
Sergey Fedoseev [Sat, 20 Oct 2018 05:20:39 +0000 (10:20 +0500)]
bpo-34574: Prevent OrderedDict iterators from exhaustion during pickling. (GH-9051)

6 years agobpo-34909: NEWS entry (GH-9995)
Ned Deily [Sat, 20 Oct 2018 04:44:21 +0000 (00:44 -0400)]
bpo-34909: NEWS entry (GH-9995)

6 years agobpo-32256: Make patchcheck.py work for out-of-tree builds (GH-4760)
Alexey Izbyshev [Sat, 20 Oct 2018 00:49:41 +0000 (03:49 +0300)]
bpo-32256: Make patchcheck.py work for out-of-tree builds (GH-4760)

Set SRCDIR as the current directory for git.

6 years agobpo-34983: Expose symtable.Symbol.is_nonlocal() in the symtable module (GH-9872)
Pablo Galindo [Sat, 20 Oct 2018 00:46:00 +0000 (01:46 +0100)]
bpo-34983: Expose symtable.Symbol.is_nonlocal() in the symtable module (GH-9872)

The symbol table was not exposing functionality to query the nonlocal symbols
in a function or to check if a particular symbol is nonlocal.

6 years agobpo-34573: Simplify __reduce__() of set and dict iterators. (GH-9050)
Sergey Fedoseev [Sat, 20 Oct 2018 00:43:33 +0000 (05:43 +0500)]
bpo-34573: Simplify __reduce__() of set and dict iterators. (GH-9050)

Simplify the pickling of set and dictionary objects iterators by consuming
the iterator into a list with PySequence_List.

6 years agobpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (#5621)
Pablo Galindo [Sat, 20 Oct 2018 00:37:55 +0000 (01:37 +0100)]
bpo-32798: Add restriction on the offset parameter for mmap.flush in the docs (#5621)

Add restriction on the offset parameter for mmap.flush.

Explain that ALLOCATIONGRANULARITY is the same as PAGESIZE in Unix.

6 years agobpo-21196: Clarify name mangling rules in tutorial (GH-5667)
Berker Peksag [Sat, 20 Oct 2018 00:33:48 +0000 (03:33 +0300)]
bpo-21196: Clarify name mangling rules in tutorial (GH-5667)

Initial patch by Chandan Kumar.

6 years agobpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH...
Alexey Izbyshev [Sat, 20 Oct 2018 00:28:22 +0000 (03:28 +0300)]
bpo-32890, os: Use errno instead of GetLastError() in execve() and truncate() (GH-5784)

path_error() uses GetLastError() on Windows, but some os functions
are implemented via CRT APIs which report errors via errno.
This may result in raising OSError with invalid error code (such
as zero).

Introduce posix_path_error() function and use it where appropriate.

6 years agobpo-32236: open() emits RuntimeWarning if buffering=1 for binary mode (GH-4842)
Alexey Izbyshev [Sat, 20 Oct 2018 00:22:31 +0000 (03:22 +0300)]
bpo-32236: open() emits RuntimeWarning if buffering=1 for binary mode (GH-4842)

If buffering=1 is specified for open() in binary mode, it is silently
treated as buffering=-1 (i.e., the default buffer size).
Coupled with the fact that line buffering is always supported in Python 2,
such behavior caused several issues (e.g., bpo-10344, bpo-21332).

Warn that line buffering is not supported if open() is called with
binary mode and buffering=1.

6 years agobpo-34536: Cleanup test_enum imports (GH-9979)
Victor Stinner [Fri, 19 Oct 2018 23:57:19 +0000 (01:57 +0200)]
bpo-34536: Cleanup test_enum imports (GH-9979)

sys and threading were imported twice.

6 years agobpo-33594: Add deprecation info in inspect.py module (GH-7036)
Matthias Bussonnier [Fri, 19 Oct 2018 23:40:45 +0000 (16:40 -0700)]
bpo-33594: Add deprecation info in inspect.py module (GH-7036)

6 years agobpo-33726, doc: Add short descriptions to PEP references in seealso (GH-7294)
Andrés Delfino [Fri, 19 Oct 2018 23:31:15 +0000 (20:31 -0300)]
bpo-33726, doc: Add short descriptions to PEP references in seealso (GH-7294)

6 years agobpo-33712: OrderedDict only creates od_fast_nodes cache if needed (GH-7349)
Serhiy Storchaka [Fri, 19 Oct 2018 23:27:45 +0000 (02:27 +0300)]
bpo-33712: OrderedDict only creates od_fast_nodes cache if needed (GH-7349)

6 years agoElaborate datetime.timedelta docstring (GH-7458)
Chris Barker [Fri, 19 Oct 2018 22:43:24 +0000 (15:43 -0700)]
Elaborate datetime.timedelta docstring (GH-7458)

6 years agobpo-34070: open() only checks for isatty if buffering < 0 (GH-8187)
David Herberth [Fri, 19 Oct 2018 22:32:04 +0000 (00:32 +0200)]
bpo-34070: open() only checks for isatty if buffering < 0 (GH-8187)

6 years agoqueue doc: Clarify that the simple FIFO queue is SimpleQueue (GH-8372)
Julien Palard [Fri, 19 Oct 2018 22:27:49 +0000 (00:27 +0200)]
queue doc: Clarify that the simple FIFO queue is SimpleQueue (GH-8372)

6 years agounittest.mock doc: Fix references to recursive seal of Mocks (GH-9028)
Mario Corchero [Fri, 19 Oct 2018 21:57:37 +0000 (22:57 +0100)]
unittest.mock doc: Fix references to recursive seal of Mocks (GH-9028)

The docs in `library/unittest.mock` have been updated to remove
confusing terms about submock and be explicit about the behavior
expected.

6 years agobpo-25750: Add test on bad descriptor __get__() (GH-9084)
jdemeyer [Fri, 19 Oct 2018 21:50:06 +0000 (23:50 +0200)]
bpo-25750: Add test on bad descriptor __get__() (GH-9084)

6 years agobpo-33073: Rework int.as_integer_ratio() implementation (GH-9303)
Serhiy Storchaka [Fri, 19 Oct 2018 21:46:31 +0000 (00:46 +0300)]
bpo-33073: Rework int.as_integer_ratio() implementation (GH-9303)

* Simplify the C code.
* Simplify tests and make them more strict and robust.
* Add references in the documentation.

6 years agoUse dict unpacking in functools.partial() docs (GH-9412)
Sergey Fedoseev [Fri, 19 Oct 2018 21:42:07 +0000 (02:42 +0500)]
Use dict unpacking in functools.partial() docs (GH-9412)

6 years agoFix typos in comments (GH-9905)
Quan Tian [Fri, 19 Oct 2018 21:30:03 +0000 (05:30 +0800)]
Fix typos in comments (GH-9905)

6 years agobpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873)
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) [Fri, 19 Oct 2018 17:42:53 +0000 (23:12 +0530)]
bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873)

6 years agobpo-33947: dataclasses no longer can raise RecursionError in repr (GF9916)
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) [Fri, 19 Oct 2018 16:54:50 +0000 (22:24 +0530)]
bpo-33947:  dataclasses no longer can raise RecursionError in repr (GF9916)

The reprlib code was copied here instead of importing reprlib. I'm not sure if we really need to avoid the import, but since I expect dataclasses to be more common that reprlib, it seems wise. Plus, the code is small.

6 years agobpo-34741: Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser. (GH-9422)
Serhiy Storchaka [Fri, 19 Oct 2018 15:00:51 +0000 (18:00 +0300)]
bpo-34741: Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser. (GH-9422)

Use tp_members and tp_getset instead.

6 years agobpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652)
Serhiy Storchaka [Fri, 19 Oct 2018 14:42:06 +0000 (17:42 +0300)]
bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652)

for invalid escape sequences in string and bytes literals.

6 years agobpo-34866: Adding max_num_fields to cgi.FieldStorage (GH-9660)
matthewbelisle-wf [Fri, 19 Oct 2018 10:52:59 +0000 (05:52 -0500)]
bpo-34866: Adding max_num_fields to cgi.FieldStorage (GH-9660)

Adding `max_num_fields` to `cgi.FieldStorage` to make DOS attacks harder by
limiting the number of `MiniFieldStorage` objects created by `FieldStorage`.

6 years agobpo-35013: Add more type checks for children of Element. (GH-9944)
Serhiy Storchaka [Fri, 19 Oct 2018 09:12:57 +0000 (12:12 +0300)]
bpo-35013: Add more type checks for children of Element. (GH-9944)

It is now guarantied that children of xml.etree.ElementTree.Element
are Elements (at least in C implementation). Previously methods
__setitem__(), __setstate__() and __deepcopy__() could be used for
adding non-Element children.

6 years agoFix several reference counting bugs in pyexpat.c. (GH-9955)
Zackery Spytz [Fri, 19 Oct 2018 06:57:38 +0000 (00:57 -0600)]
Fix several reference counting bugs in pyexpat.c. (GH-9955)

6 years agobpo-31522: mailbox.get_string: pass `from_` parameter to `get_bytes` (#9857)
Cheryl Sabella [Fri, 19 Oct 2018 00:21:47 +0000 (20:21 -0400)]
bpo-31522: mailbox.get_string: pass `from_` parameter to `get_bytes` (#9857)

This allows *from_* to be successfully set to a non-default value when calling mbox.get_string.

6 years agobpo-26441: Remove documentation for deleted to_splittable and from_splittable methods...
Braden Groom [Fri, 19 Oct 2018 00:13:23 +0000 (19:13 -0500)]
bpo-26441: Remove documentation for deleted to_splittable and from_splittable methods (#9865)

6 years agoUpdate opcode.h header comment to mention the source data file (GH-9935)
Shivank98 [Thu, 18 Oct 2018 19:53:18 +0000 (01:23 +0530)]
Update opcode.h header comment to mention the source data file (GH-9935)

This is intended to help code explorers find out more about what's defined there.

6 years agobpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760)
Juliette Monsel [Thu, 18 Oct 2018 19:28:31 +0000 (21:28 +0200)]
bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760)

6 years agoUpdated documentation on logging.debug(). (GH-9946)
Vinay Sajip [Thu, 18 Oct 2018 10:45:58 +0000 (11:45 +0100)]
Updated documentation on logging.debug(). (GH-9946)

6 years agobpo-34765: Update the install-sh file (GH-9592)
stratakis [Thu, 18 Oct 2018 08:51:53 +0000 (10:51 +0200)]
bpo-34765: Update the install-sh file (GH-9592)

Update the outdated install-sh file to the latest
revision from automake v1.16.1

6 years agobpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924)
Serhiy Storchaka [Thu, 18 Oct 2018 06:49:54 +0000 (09:49 +0300)]
bpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924)

C implementation of xml.etree.ElementTree.Element.__setstate__()
leaked references to children when called for already initialized
element.

6 years agobpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939)
Gregory P. Smith [Thu, 18 Oct 2018 01:10:46 +0000 (18:10 -0700)]
bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939)

Restores the use of pyexpatns.h to isolate our embedded copy of the expat C
library so that its symbols do not conflict at link or dynamic loading time
with an embedding application or other extension modules with their own
version of libexpat.

https://github.com/python/cpython/commit/5dc3f23b5fb0b510926012cb3732dae63cddea60#diff-3afaf7274c90ce1b7405f75ad825f545 inadvertently removed it when upgrading expat.

6 years agobpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705)
Stéphane Wirtel [Wed, 17 Oct 2018 23:05:04 +0000 (01:05 +0200)]
bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705)

 On macOS, fix reading from and writing into a file with a size larger than 2 GiB.

6 years agoAdd missing comma to wsgiref doc (GH-9932)
Cheryl Sabella [Wed, 17 Oct 2018 21:55:32 +0000 (17:55 -0400)]
Add missing comma to wsgiref doc (GH-9932)

6 years ago bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925)
Stéphane Wirtel [Wed, 17 Oct 2018 10:03:40 +0000 (12:03 +0200)]
 bpo-23420: Verify the value of '-s' when execute the CLI of cProfile (GH-9925)

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.

Co-authored-by: Robert Kuska <rkuska@gmail.com>
6 years agoDoc: Fix is_prime (GH-9909)
Julien Palard [Wed, 17 Oct 2018 06:45:51 +0000 (08:45 +0200)]
Doc: Fix is_prime (GH-9909)

6 years agoIn email docs, correct spelling of foregoing (#9856)
Cheryl Sabella [Tue, 16 Oct 2018 19:28:34 +0000 (15:28 -0400)]
In email docs, correct spelling of foregoing (#9856)

6 years agoIn email.parser in message_from_bytes, update `strict` to `policy` (#9854)
Cheryl Sabella [Tue, 16 Oct 2018 19:26:17 +0000 (15:26 -0400)]
In email.parser in message_from_bytes, update `strict` to `policy` (#9854)

According to the versionchanged note, the `strict` argument was removed in 3.3 and `policy` was added, but the name of the argument in the paragraph wasn't updated.

6 years agobpo-34997: Fix test_logging.ConfigDictTest.test_out_of_order (GH-9913)
Pablo Galindo [Tue, 16 Oct 2018 14:17:57 +0000 (15:17 +0100)]
bpo-34997: Fix test_logging.ConfigDictTest.test_out_of_order (GH-9913)

When runnint test_logging with --huntrleaks after commit
18fb1fb943b7dbd7f8a76017ee2a67ef13effb85, test_out_of_order fails
to raise ValueError due to the fact that the new test
test_out_of_order_with_dollar_style mutates the out_of_order
dictionary. Even if the test copies the dictionary first, the mutation
is done in a very deep level so the original one is also affected.

6 years agoAdded CLI starter example to logging cookbook. (GH-9910)
Vinay Sajip [Tue, 16 Oct 2018 11:36:52 +0000 (12:36 +0100)]
Added CLI starter example to logging cookbook. (GH-9910)

6 years agobpo-34783: Fix test_nonexisting_script() (GH-9896)
Victor Stinner [Mon, 15 Oct 2018 21:50:55 +0000 (23:50 +0200)]
bpo-34783: Fix test_nonexisting_script() (GH-9896)

Fix test_cmd_line_script.test_nonexisting_script(): the test must not
rely on sys.executable, since main.c uses config->program which can
be different than sys.executable in many cases (for example, on macOS
when using the framework).

6 years agobpo-23554: Change echo server example class name from EchoServerClientProtocol to...
Braden Groom [Mon, 15 Oct 2018 21:39:16 +0000 (14:39 -0700)]
bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (GH-9859)

6 years agobpo-34989: python-gdb.py: fix current_line_num() (GH-9889)
Victor Stinner [Mon, 15 Oct 2018 21:19:57 +0000 (23:19 +0200)]
bpo-34989: python-gdb.py: fix current_line_num() (GH-9889)

python-gdb.py now handles errors on computing the line number
of a Python frame.

Changes:

* PyFrameObjectPtr.current_line_num() now catchs any Exception on
  calling addr2line(), instead of failing with a surprising "<class
  'TypeError'> 'FakeRepr' object is not subscriptable" error.
* All callers of current_line_num() now handle current_line_num()
  returning None.
* PyFrameObjectPtr.current_line() now also catchs IndexError on
  getting a line from the Python source file.

6 years agoStop using deprecated logging API in Sphinx suspicious checker (GH-9875)
Pablo Galindo [Mon, 15 Oct 2018 19:07:23 +0000 (20:07 +0100)]
Stop using deprecated logging API in Sphinx suspicious checker (GH-9875)

6 years agofix dangling keyfunc examples in documentation of heapq and sorted (#1432)
Wolfgang Maier [Mon, 15 Oct 2018 19:06:53 +0000 (21:06 +0200)]
fix dangling keyfunc examples in documentation of heapq and sorted (#1432)

* fix dangling mention of key=str.lower in heapq doc

* Fix dangling mention of keyfunc example for sorted()

6 years agobpo-34844: logging.Formatter enhancement - Ensure style and format string matches...
BNMetrics [Mon, 15 Oct 2018 18:41:36 +0000 (19:41 +0100)]
bpo-34844: logging.Formatter enhancement - Ensure style and format string matches in logging.Formatter  (GH-9703)

6 years agobpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852)
Serhiy Storchaka [Sun, 14 Oct 2018 21:02:57 +0000 (00:02 +0300)]
bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852)

bytes and bytearray constructors converted unexpected exceptions
(e.g. MemoryError and KeyboardInterrupt) to TypeError.

6 years agobpo-34939: Allow annotated global names in module namespace (GH-9844)
Pablo Galindo [Sun, 14 Oct 2018 17:01:03 +0000 (18:01 +0100)]
bpo-34939: Allow annotated global names in module namespace (GH-9844)

Allow annotated global names in the module namespace after the symbol is
declared as global. Previously, only symbols annotated before they are declared
as global (i.e. inside a function) were allowed. This change allows symbols to be
declared as global before the annotation happens in the global scope.

6 years agobpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850)
Pablo Galindo [Sun, 14 Oct 2018 16:41:11 +0000 (17:41 +0100)]
bpo-34521: Add NEWS entry for changes in GH-9613 (GH-9850)

* Add News entry for the change in multiprocessing.reduction.recvfds
made in GH-9613.

6 years agoUpdate compound_stmts.rst (#9864)
Andrés Delfino [Sun, 14 Oct 2018 08:18:16 +0000 (05:18 -0300)]
Update compound_stmts.rst (#9864)

6 years agobpo-34941: Fix searching Element subclasses. (GH-9766)
Serhiy Storchaka [Sun, 14 Oct 2018 07:32:19 +0000 (10:32 +0300)]
bpo-34941: Fix searching Element subclasses. (GH-9766)

Methods find(), findtext() and findall() of xml.etree.ElementTree.Element
were not able to find chldren which are instances of Element subclasses.

6 years agobpo-33656: Move pyshell ctypes import inside try block. (GH-9858)
Terry Jan Reedy [Sun, 14 Oct 2018 00:00:31 +0000 (20:00 -0400)]
bpo-33656: Move pyshell ctypes import inside try block. (GH-9858)

A Windows build with _tkinter, tkinter, and idlelib
but without ctypes is unlikely but apparently possible.

6 years agobpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837)
Andrew Svetlov [Sat, 13 Oct 2018 18:12:40 +0000 (21:12 +0300)]
bpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837)

https://bugs.python.org/issue34970

6 years agoAdd new tests for bytes and bytearray constructors. (GH-9843)
Serhiy Storchaka [Sat, 13 Oct 2018 17:39:45 +0000 (20:39 +0300)]
Add new tests for bytes and bytearray constructors. (GH-9843)

Covered all special cases: bytes, tuple, list, differend
kinds of iterables and iterators.

6 years agoFixes issues in Windows release upload script (GH-9845)
Steve Dower [Sat, 13 Oct 2018 17:10:42 +0000 (10:10 -0700)]
Fixes issues in Windows release upload script (GH-9845)

6 years agobpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569)
Zackery Spytz [Sat, 13 Oct 2018 09:27:30 +0000 (03:27 -0600)]
bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569)

6 years agobpo-22872: multiprocessing.Queue's put() and get() now raise ValueError if the queue...
Zackery Spytz [Sat, 13 Oct 2018 09:26:09 +0000 (03:26 -0600)]
bpo-22872: multiprocessing.Queue's put() and get() now raise ValueError if the queue is closed. (GH-9010)

Previously, put() and get() would raise AssertionError and OSError,
respectively.

6 years agobpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827)
Stéphane Wirtel [Sat, 13 Oct 2018 06:14:08 +0000 (08:14 +0200)]
bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827)

6 years agobpo-34783: Disable test_nonexisting_script for macOS framework builds (GH-9831)
Ned Deily [Sat, 13 Oct 2018 03:54:20 +0000 (23:54 -0400)]
bpo-34783:  Disable test_nonexisting_script for macOS framework builds (GH-9831)

With macOS framework builds, test case test_nonexisting_script in
test_nonexisting_script fails because the test case assumes that
the file name in sys.executable will appear in the error message.
For macOS framework builds, sys.executable is the file name of the
stub launcher and its file name bears no relationship to the file
name of the actual python executable.  For now, skip the test in
this case.

6 years agoPin again sphinx version as stated in the comment. (GH-9824)
Julien Palard [Fri, 12 Oct 2018 17:23:37 +0000 (19:23 +0200)]
Pin again sphinx version as stated in the comment. (GH-9824)

6 years agobpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768)
Juliette Monsel [Fri, 12 Oct 2018 16:44:10 +0000 (18:44 +0200)]
bpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768)

6 years agobpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822)
Serhiy Storchaka [Fri, 12 Oct 2018 16:01:00 +0000 (19:01 +0300)]
bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822)

6 years agobpo-11233: Create availability directive for documentation (GH-9692)
Cheryl Sabella [Fri, 12 Oct 2018 14:55:20 +0000 (10:55 -0400)]
bpo-11233: Create availability directive for documentation (GH-9692)

Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.

Co-Authored-By: Georg Brandl <georg@python.org>
6 years agobpo-34900: Make TestCase.debug() work with subtests (GH-9707)
Bruno Oliveira [Fri, 12 Oct 2018 10:35:55 +0000 (07:35 -0300)]
bpo-34900: Make TestCase.debug() work with subtests (GH-9707)

6 years agobpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)
Gus Goulart [Fri, 12 Oct 2018 09:16:43 +0000 (06:16 -0300)]
bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)

6 years agobpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. (GH...
Zackery Spytz [Fri, 12 Oct 2018 08:31:21 +0000 (02:31 -0600)]
bpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. (GH-8052)

6 years agobpo-34940: Fix the error handling in _check_for_legacy_statements(). (GH-9764)
Zackery Spytz [Fri, 12 Oct 2018 08:20:59 +0000 (02:20 -0600)]
bpo-34940: Fix the error handling in _check_for_legacy_statements(). (GH-9764)

6 years agobpo-34962: make doctest in Doc/ now passes, and is enforced in CI (GH-9806)
Stéphane Wirtel [Fri, 12 Oct 2018 07:51:05 +0000 (09:51 +0200)]
bpo-34962: make doctest in Doc/ now passes, and is enforced in CI (GH-9806)

6 years agoFix an incorrect check in compiler_try_except(). (GH-9810)
Zackery Spytz [Fri, 12 Oct 2018 05:54:03 +0000 (23:54 -0600)]
Fix an incorrect check in compiler_try_except(). (GH-9810)

6 years agoFix a possible decref of a borrowed reference in symtable.c. (GH-9786)
Zackery Spytz [Thu, 11 Oct 2018 05:05:35 +0000 (23:05 -0600)]
Fix a possible decref of a borrowed reference in symtable.c. (GH-9786)

6 years agobpo-34922: Fix integer overflow in the digest() and hexdigest() methods (GH-9751)
Serhiy Storchaka [Thu, 11 Oct 2018 04:41:00 +0000 (07:41 +0300)]
bpo-34922: Fix integer overflow in the digest() and hexdigest() methods (GH-9751)

for the SHAKE algorithm in the hashlib module.

6 years agoMicro-optimize list index range checks (GH-9784)
Raymond Hettinger [Thu, 11 Oct 2018 03:37:28 +0000 (20:37 -0700)]
Micro-optimize list index range checks (GH-9784)

6 years agobpo-34576 warn users on security for http.server (#9720)
Felipe Rodrigues [Thu, 11 Oct 2018 02:43:40 +0000 (23:43 -0300)]
bpo-34576 warn users on security for http.server (#9720)

It was proposed to add an warning for http.server regarding security
issues. The wording was provided at bpo-26005 by @orsenthil

6 years agobpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607)
Elvis Pranskevichus [Wed, 10 Oct 2018 16:43:14 +0000 (12:43 -0400)]
bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607)

Unconditional forcing of ``CHECKED_HASH`` invalidation was introduced in
3.7.0 in bpo-29708.  The change is bad, as it unconditionally overrides
*invalidation_mode*, even if it was passed as an explicit argument to
``py_compile.compile()`` or ``compileall``.  An environment variable
should *never* override an explicit argument to a library function.
That change leads to multiple test failures if the ``SOURCE_DATE_EPOCH``
environment variable is set.

This changes ``py_compile.compile()`` to only look at
``SOURCE_DATE_EPOCH`` if no explicit *invalidation_mode* was specified.
I also made various relevant tests run with explicit control over the
value of ``SOURCE_DATE_EPOCH``.

While looking at this, I noticed that ``zipimport`` does not work
with hash-based .pycs _at all_, though I left the fixes for
subsequent commits.

6 years agobpo-34926: Make mimetypes.guess_type accept os.PathLike objects (GH-9777)
Mayank Asthana [Wed, 10 Oct 2018 14:46:44 +0000 (20:16 +0530)]
bpo-34926: Make mimetypes.guess_type accept os.PathLike objects (GH-9777)

:meth:`mimetypes.MimeTypes.guess_type` now accepts :term:`path-like object` in addition to url strings.

6 years agobpo-33613: Fix test_semaphore_tracker signal tests when using -Werror (GH-9778)
Pablo Galindo [Wed, 10 Oct 2018 07:40:14 +0000 (08:40 +0100)]
bpo-33613: Fix test_semaphore_tracker signal tests when using -Werror (GH-9778)

Tests involving sending signals to the semaphore_tracker will not fail anymore due to
the fact that running the test suite with -Werror propagates warnings as errors.

Fix a missing assertion when the semaphore_tracker is expected to die.

6 years agoConvert code of conduct to markdown for Github (GH-9776)
Ammar Askar [Wed, 10 Oct 2018 06:43:08 +0000 (02:43 -0400)]
Convert code of conduct to markdown for Github (GH-9776)

6 years agobpo-34913: Document gzip command line interface (GH-9782)
Stéphane Wirtel [Wed, 10 Oct 2018 06:28:26 +0000 (08:28 +0200)]
bpo-34913: Document gzip command line interface (GH-9782)

6 years agobpo-23596: Use argparse for the command line of gzip (GH-9781)
Stéphane Wirtel [Tue, 9 Oct 2018 22:41:33 +0000 (00:41 +0200)]
bpo-23596: Use argparse for the command line of gzip (GH-9781)

Co-authored-by: Antony Lee <anntzer.lee@gmail.com>
6 years agobpo-23596: Add unit tests for the command line for the gzip module (GH-9775)
Stéphane Wirtel [Tue, 9 Oct 2018 21:16:43 +0000 (23:16 +0200)]
bpo-23596: Add unit tests for the command line for the gzip module (GH-9775)

Add unit tests for the command line for the gzip module

6 years agobpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716)
twisteroid ambassador [Tue, 9 Oct 2018 15:30:21 +0000 (23:30 +0800)]
bpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716)

6 years agobpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH...
Victor Stinner [Tue, 9 Oct 2018 14:54:04 +0000 (16:54 +0200)]
bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection -O0 (GH-9656)

When Python is built with the intel control-flow protection flags,
-mcet -fcf-protection, gdb is not able to read the stack without
actually jumping inside the function. This means an extra
'next' command is required to make the $pc (program counter)
enter the function and make the stack of the function exposed to gdb.

Co-Authored-By: Marcel Plch <gmarcel.plch@gmail.com>
(cherry picked from commit 9b7c74ca32d1bec7128d550a9ab1b2ddc7046287)

6 years agobpo-32680 add default "sock" on SMTP objects (#5345)
Romuald Brunet [Tue, 9 Oct 2018 14:31:55 +0000 (16:31 +0200)]
bpo-32680 add default "sock" on SMTP objects (#5345)

By default the smtplib.SMTP objects did not have a sock attribute, it
was only created during connect()

6 years agoExtract sendfile tests into a separate test file (#9757)
Andrew Svetlov [Tue, 9 Oct 2018 04:52:57 +0000 (07:52 +0300)]
Extract sendfile tests into a separate test file (#9757)

6 years agobpo-34758: add .wasm to recognized file extensions in mimetypes module (GH-9464)
travisoneill [Tue, 9 Oct 2018 04:43:58 +0000 (21:43 -0700)]
bpo-34758: add .wasm to recognized file extensions in mimetypes module (GH-9464)

6 years agobpo-32174: Let .chm document display non-ASCII characters properly (GH-9758)
animalize [Mon, 8 Oct 2018 21:20:54 +0000 (16:20 -0500)]
bpo-32174: Let .chm document display non-ASCII characters properly (GH-9758)

Let .chm document display non-ASCII characters properly

Escape the `body` part of .chm source file to 7-bit ASCII, to fix visual effect on some MBCS Windows systems.

6 years agoExtract tests for sock_*() functions into a separate file (GH-9761)
Andrew Svetlov [Mon, 8 Oct 2018 20:06:18 +0000 (23:06 +0300)]
Extract tests for sock_*() functions into a separate file (GH-9761)

6 years agobpo-31715 Add mimetype for extension .mjs (#3908)
Bradley Meck [Mon, 8 Oct 2018 20:04:55 +0000 (15:04 -0500)]
bpo-31715 Add mimetype for extension .mjs (#3908)

6 years agobpo-34921: Allow escaped NoReturn in get_type_hints (GH-9750)
Noah Wood [Mon, 8 Oct 2018 18:50:16 +0000 (14:50 -0400)]
bpo-34921: Allow escaped NoReturn in get_type_hints (GH-9750)

6 years agobpo-34911: Added support for secure websocket cookies (GH-9734)
Paul Bailey [Mon, 8 Oct 2018 18:49:29 +0000 (13:49 -0500)]
bpo-34911: Added support for secure websocket cookies (GH-9734)

6 years agobpo-34829: Add missing selection_ methods to the Tkinter Spinbox. (GH-9617)
Juliette Monsel [Mon, 8 Oct 2018 16:29:24 +0000 (18:29 +0200)]
bpo-34829: Add missing selection_ methods to the Tkinter Spinbox. (GH-9617)

Implement the methods selection_from(), selection_range(), selection_present()
and selection_to() for Tkinter Spinbox.

6 years agoUse double quote instead of backtick to clarify Ellipsis constant (GH-9754)
Xtreak [Mon, 8 Oct 2018 15:14:16 +0000 (20:44 +0530)]
Use double quote instead of backtick to clarify Ellipsis constant (GH-9754)