Commit Graph

102506 Commits

Author SHA1 Message Date
Serhiy Storchaka b2e2025941 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.
2018-10-19 23:46:31 +02:00
Sergey Fedoseev b981fec8d6 Use dict unpacking in functools.partial() docs (GH-9412) 2018-10-19 23:42:07 +02:00
Quan Tian 3bd0d620d6 Fix typos in comments (GH-9905) 2018-10-19 23:30:03 +02:00
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) f192aeb95a bpo-20216: Correct docstrings of digest() methods in hashlib. (GH-9873) 2018-10-19 20:42:53 +03:00
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) dd13c88b53 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.
2018-10-19 12:54:50 -04:00
Serhiy Storchaka 55f8249d65
bpo-34741: Get rid of tp_getattro and tp_setattro in pyexpat.xmlparser. (GH-9422)
Use tp_members and tp_getset instead.
2018-10-19 18:00:51 +03:00
Serhiy Storchaka 6543912c90
bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652)
for invalid escape sequences in string and bytes literals.
2018-10-19 17:42:06 +03:00
matthewbelisle-wf 209144831b 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`.
2018-10-19 03:52:59 -07:00
Serhiy Storchaka f081fd8303
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.
2018-10-19 12:12:57 +03:00
Zackery Spytz 68def052dc Fix several reference counting bugs in pyexpat.c. (GH-9955) 2018-10-19 09:57:38 +03:00
Cheryl Sabella d16f012f84 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.
2018-10-18 20:21:47 -04:00
Braden Groom 5be00247ae bpo-26441: Remove documentation for deleted to_splittable and from_splittable methods (#9865) 2018-10-18 20:13:23 -04:00
Shivank98 e3d1455fe4 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.
2018-10-18 14:53:18 -05:00
Juliette Monsel 1deea5e539 bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760) 2018-10-18 22:28:31 +03:00
Vinay Sajip bbd90e4f62
Updated documentation on logging.debug(). (GH-9946) 2018-10-18 11:45:58 +01:00
stratakis b7ad31c892 bpo-34765: Update the install-sh file (GH-9592)
Update the outdated install-sh file to the latest
revision from automake v1.16.1
2018-10-18 10:51:53 +02:00
Serhiy Storchaka 6f906b3d72
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.
2018-10-18 09:49:54 +03:00
Gregory P. Smith 9d4712bc8f
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.

5dc3f23b5f (diff-3afaf7274c90ce1b7405f75ad825f545) inadvertently removed it when upgrading expat.
2018-10-17 18:10:46 -07:00
Stéphane Wirtel 74a8b6ea7e 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.
2018-10-18 01:05:04 +02:00
Cheryl Sabella 0f11a88622 Add missing comma to wsgiref doc (GH-9932) 2018-10-17 22:55:32 +01:00
Stéphane Wirtel fcd5e84a51 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>
2018-10-17 12:03:40 +02:00
Julien Palard 8e73ad38ab
Doc: Fix is_prime (GH-9909) 2018-10-17 08:45:51 +02:00
Cheryl Sabella c984d20ec8 In email docs, correct spelling of foregoing (#9856) 2018-10-16 15:28:34 -04:00
Cheryl Sabella a5ca98537b 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.
2018-10-16 15:26:17 -04:00
Pablo Galindo 137b0632dc
bpo-34997: Fix test_logging.ConfigDictTest.test_out_of_order (GH-9913)
When runnint test_logging with --huntrleaks after commit
18fb1fb943, 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.
2018-10-16 15:17:57 +01:00
Vinay Sajip 1a4a10d9f1
Added CLI starter example to logging cookbook. (GH-9910) 2018-10-16 12:36:52 +01:00
Victor Stinner ea75187c68
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).
2018-10-15 23:50:55 +02:00
Braden Groom 43a5bd7b45 bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (GH-9859) 2018-10-15 17:39:16 -04:00
Victor Stinner 2e438cc255
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.
2018-10-15 23:19:57 +02:00
Pablo Galindo ee171a26c1
Stop using deprecated logging API in Sphinx suspicious checker (GH-9875) 2018-10-15 20:07:23 +01:00
Wolfgang Maier 6bdb6f7675 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()
2018-10-15 13:06:53 -06:00
BNMetrics 18fb1fb943 bpo-34844: logging.Formatter enhancement - Ensure style and format string matches in logging.Formatter (GH-9703) 2018-10-15 19:41:36 +01:00
Serhiy Storchaka e890421e33
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.
2018-10-15 00:02:57 +03:00
Pablo Galindo de2aea0ff0
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.
2018-10-14 18:01:03 +01:00
Pablo Galindo bd036d3d15
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.
2018-10-14 17:41:11 +01:00
Andrés Delfino c8bb467f40 Update compound_stmts.rst (#9864) 2018-10-14 11:18:16 +03:00
Serhiy Storchaka b11c5667f9
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.
2018-10-14 10:32:19 +03:00
Terry Jan Reedy d274afb5e5
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.
2018-10-13 20:00:31 -04:00
Andrew Svetlov 97cf082872 bpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837)
https://bugs.python.org/issue34970
2018-10-13 11:12:40 -07:00
Serhiy Storchaka 1a997eb291
Add new tests for bytes and bytearray constructors. (GH-9843)
Covered all special cases: bytes, tuple, list, differend
kinds of iterables and iterators.
2018-10-13 20:39:45 +03:00
Steve Dower a486a4712c Fixes issues in Windows release upload script (GH-9845) 2018-10-13 10:10:42 -07:00
Zackery Spytz d4d60134b2 bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569) 2018-10-13 12:27:30 +03:00
Zackery Spytz 0461704060 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.
2018-10-13 12:26:09 +03:00
Stéphane Wirtel e385d0661e bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827) 2018-10-13 08:14:08 +02:00
Ned Deily f6c29a65e2
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.
2018-10-12 23:54:20 -04:00
Julien Palard 17775ae463
Pin again sphinx version as stated in the comment. (GH-9824) 2018-10-12 19:23:37 +02:00
Juliette Monsel bf034715db bpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768) 2018-10-12 19:44:10 +03:00
Serhiy Storchaka dc0d571b64
bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822) 2018-10-12 19:01:00 +03:00
Cheryl Sabella 2d6097d027 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>
2018-10-12 16:55:20 +02:00
Bruno Oliveira da2bf9f66d bpo-34900: Make TestCase.debug() work with subtests (GH-9707) 2018-10-12 13:35:55 +03:00