Commit Graph

102524 Commits

Author SHA1 Message Date
Sergey Fedoseev a5259fb05d bpo-34574: Prevent OrderedDict iterators from exhaustion during pickling. (GH-9051) 2018-10-20 08:20:39 +03:00
Ned Deily 8c9fd9c91b
bpo-34909: NEWS entry (GH-9995) 2018-10-20 00:44:21 -04:00
Alexey Izbyshev aa95bfb5fe bpo-32256: Make patchcheck.py work for out-of-tree builds (GH-4760)
Set SRCDIR as the current directory for git.
2018-10-20 02:49:41 +02:00
Pablo Galindo d5b4f1b5a0
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.
2018-10-20 01:46:00 +01:00
Sergey Fedoseev 6395844e6a 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.
2018-10-20 01:43:33 +01:00
Pablo Galindo 027664a3d5 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.
2018-10-20 02:37:55 +02:00
Berker Peksag 13ae4d4438 bpo-21196: Clarify name mangling rules in tutorial (GH-5667)
Initial patch by Chandan Kumar.
2018-10-20 02:33:48 +02:00
Alexey Izbyshev 834603112e 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.
2018-10-20 02:28:22 +02:00
Alexey Izbyshev a2670565d8 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.
2018-10-20 02:22:31 +02:00
Victor Stinner 4acf6c9d4b bpo-34536: Cleanup test_enum imports (GH-9979)
sys and threading were imported twice.
2018-10-19 16:57:19 -07:00
Matthias Bussonnier ded87d804e bpo-33594: Add deprecation info in inspect.py module (GH-7036) 2018-10-20 01:40:45 +02:00
Andrés Delfino 0f14fc1a7c bpo-33726, doc: Add short descriptions to PEP references in seealso (GH-7294) 2018-10-20 01:31:15 +02:00
Serhiy Storchaka 6f17e51345 bpo-33712: OrderedDict only creates od_fast_nodes cache if needed (GH-7349) 2018-10-20 01:27:45 +02:00
Chris Barker d6a61f2326 Elaborate datetime.timedelta docstring (GH-7458) 2018-10-20 00:43:24 +02:00
David Herberth 8deab96725 bpo-34070: open() only checks for isatty if buffering < 0 (GH-8187) 2018-10-20 00:32:04 +02:00
Julien Palard acef69068f queue doc: Clarify that the simple FIFO queue is SimpleQueue (GH-8372) 2018-10-20 00:27:49 +02:00
Mario Corchero 96200eb2ff 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.
2018-10-19 23:57:37 +02:00
jdemeyer 5a30620e68 bpo-25750: Add test on bad descriptor __get__() (GH-9084) 2018-10-19 23:50:06 +02:00
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