Commit Graph

9346 Commits

Author SHA1 Message Date
Bumsik Kim 5cc583d940 bpo-33649: Clarify protocol_factory as a method parameter (GH-9330) 2018-09-16 16:40:44 -07:00
Yury Selivanov 805e27eff6
bpo-33649: Fix asyncio-dev (GH-9324) 2018-09-14 16:57:11 -07:00
Yury Selivanov 7372c3bbef
bpo-33649: Add high-level APIs cheat-sheet (GH-9319) 2018-09-14 15:11:24 -07:00
Yury Selivanov 6c7316439d
bpo-33649: Refresh asyncio docs landing page (GH-9322) 2018-09-14 14:57:39 -07:00
Grant 5acccfaf68 Grammar fix (GH-9318) 2018-09-14 14:37:48 -07:00
Yury Selivanov 3faaa8857a bpo-33649: Refresh Tasks and Futures pages (#9314)
* bpo-33649: Refresh Tasks and Futures pages

* Fixes

* Fix markup
2018-09-14 13:32:07 -07:00
Andrés Delfino 271818fe27 Fix "Python" casing in a few places (GH-9001) 2018-09-14 10:13:09 -07:00
Carol Willing c9d66f0ed4
bpo-33649 Polish asyncio docs on queues, protocols, and subproccesses (#9306)
* small clarification

* edits to protocols doc

* Edit async queue doc
2018-09-14 10:06:55 -07:00
Raymond Hettinger 902bcd9a1e
Note that distinct argument patterns can be cached separately (GH-9298) 2018-09-14 00:53:20 -07:00
Lisa Roach 5ac704306f bpo-33073: Adding as_integer_ratio to ints. (GH-8750) 2018-09-13 23:56:23 -07:00
Windson yang 1aeba7458d bpo-34552: Clarify built-in types comparisons (GH-9035)
Some updates to ancient text about comparisons; fixes bp-34552.
2018-09-13 21:50:18 -07:00
Carol Willing 4e824e9649 bpo-33649: Polish asyncio subprocess and sync docs (GH-9285)
Second pass for asyncio subprocess and sync docs.


https://bugs.python.org/issue33649
2018-09-13 18:28:19 -07:00
Andrew Svetlov 11194c877c
bpo-34666: Implement stream.awrite() and stream.aclose() (GH-9274) 2018-09-13 16:53:49 -07:00
Carol Willing a3c8ba7235 polish exceptions and platforms (GH-9272) 2018-09-13 16:14:41 -07:00
Carol Willing 1abba455d1 Polish doc as part of asyncio doc improvement (GH-9185) 2018-09-12 22:40:37 -07:00
Carol Willing 6d9767fb26 edit async policy doc - second pass (GH-9235) 2018-09-12 17:09:08 -07:00
Carol Willing 5b7cbd602e bpo-33649: Edit asyncio eventloop doc - second pass (GH-9233) 2018-09-12 17:05:17 -07:00
Tony Flury 2087023fde bpo-32933: Implement __iter__ method on mock_open() (GH-5974) 2018-09-13 01:21:16 +03:00
Benjamin Peterson 5b10d5111d
closes bpo-34004: Skip lock interruption tests on musl. (GH-9224)
Returning EINTR from pthread semaphore or lock acquisition is an optional POSIX
feature. musl does not provide this feature, so some threadsignal tests fail
when Python is built against it.

There's no good way to test for musl, so we skip if we're on Linux and not using
glibc pthreads.

Also, hedge in the threading documentation about when we can provide interrupts
from lock acquisition.
2018-09-12 13:48:03 -07:00
Bumsik Kim aca819fb49 bpo-33649: Fix doc to reflect changes in 47cd10d (or bpo-23347) (GH-9219) 2018-09-12 11:31:56 -07:00
Raymond Hettinger 9dfa0fe587
bpo-34637: Make the *start* argument for *sum()* visible as a keyword argument. (GH-9208) 2018-09-12 10:54:06 -07:00
Ethan Furman f52237400b bpo-33437: add __new__ vs __init__ example (GH-9145)
Improve Enum docs.


https://bugs.python.org/issue33437
2018-09-12 10:00:30 -07:00
Cheryl Sabella 731ff68eee closes bpo-25041: Document AF_PACKET socket address format. (GH-4092) 2018-09-11 17:32:15 -07:00
Yury Selivanov 8be876e44b
bpo-33649: Cleanup asyncio/streams and asyncio/synchronization docs (GH-9192) 2018-09-11 17:10:37 -07:00
Danish Prakash 9c223794c7 bpo-34365: Update date object documentation (GH-8814)
Python 3.x does not fall back to comparing object addresses when comparing two `dt` objects.

<!-- issue-number: [bpo-34365](https://www.bugs.python.org/issue34365) -->
https://bugs.python.org/issue34365
<!-- /issue-number -->
2018-09-11 13:59:23 -07:00
Bram b4ec36200a bpo-34613: document the correct value of limit argument of asyncio.StreamReader (GH-9121)
The default value of asyncio.StreamReader *limit* is `_DEFAULT_LIMIT` instead of `None`.

<!-- issue-number: [bpo-34613](https://www.bugs.python.org/issue34613) -->
https://bugs.python.org/issue34613
<!-- /issue-number -->
2018-09-11 11:45:26 -07:00
wim glenn 08bcf647d8 bpo-28617 Fixed docs inaccuracies about the types that support membership tests (GH-9086)
<!-- issue-number: [bpo-28617](https://www.bugs.python.org/issue28617) -->
https://bugs.python.org/issue28617
<!-- /issue-number -->
2018-09-11 10:44:52 -07:00
Yury Selivanov 7c7605ff11
bpo-33649: First asyncio docs improvement pass (GH-9142)
Rewritten/updated sections:

* Event Loop APIs
* Transports & Protocols
* Streams
* Exceptions
* Policies
* Queues
* Subprocesses
* Platforms
2018-09-11 09:54:40 -07:00
Zackery Spytz 3666b3c1f6 bpo-33032: Mention the implicit cache in struct.Struct() docs (GH-7700)
Mention the implicit cache in struct.Struct() docs.

Consistent with the re.compile documentation note.
2018-09-10 21:37:33 -07:00
Raymond Hettinger 2064bb6d57
Fix missing line from example shell session (GH-9143) 2018-09-10 18:43:08 -07:00
Matthias Bussonnier ffa198c642 bpo-33487: improve BZ2File Deprecation and documentation. (GH-6785)
Emit warning when None passed explicitly, list Python version since
deprecation in warning message and docs.
2018-09-10 18:15:56 -07:00
Ville Skyttä 959625b5a5 Use bytes.hex instead of binascii.hexlify in pbkdf2_hmac example (GH-8420) 2018-09-10 18:07:19 -07:00
Rahul Jha 9430652535 bpo-33217: Raise TypeError for non-Enum lookups in Enums (GH-6651)
* bpo-33217: Raise TypeError for non-Enum lookups in Enums
2018-09-10 11:21:04 -07:00
Matthias Bussonnier 51a4743d19 bpo-33604: Remove deprecated HMAC default value marked for removal in 3.8 (GH-7063)
HMAC's digestmod was deprecated marked for removal, this removes it as planned.
2018-09-10 11:10:01 -07:00
Sebastian Rittau 78deb7f332 closes bpo-34525: Fix smtplib's authobject() documentation (GH-8965) 2018-09-10 10:29:43 -07:00
Serhiy Storchaka d700f97b62
bpo-20104: Change the file_actions parameter of os.posix_spawn(). (GH-6725)
* Make its default value an empty tuple instead of None.
* Make it a keyword-only parameter.
2018-09-08 14:48:18 +03:00
Pablo Aguiar d5fbe9b1a3 bpo-34246: Use no mutable default args in smtplib (GH-8554)
Some methods of the SMTP class use mutable default arguments. Specially
`send_message` is affected as it mutates one of the args by appending items
to it, which has side effects on further calls.
2018-09-07 23:04:48 +01:00
Pablo Galindo 254a4663d8
bpo-20104: Add flag capabilities to posix_spawn (GH-6693)
Implement the "attributes objects" parameter of `os.posix_spawn` to complete the implementation and fully cover the underlying API.
2018-09-07 16:44:24 +01:00
Victor Stinner 5e922658fb
bpo-34605: Avoid master/slave terms (GH-9101)
* Replace "master process" with "parent process"
* Replace "master option mappings" with "main option mappings"
* Replace "master pattern object" with "main pattern object"
* ssl: replace "master" with "server"
* And some other similar changes
2018-09-07 17:30:33 +02:00
Marcel Plch 77b112cd56 bpo-34097: Polish API design (GH-8725)
Move strict_timestamps to constructor.
2018-08-31 16:43:31 +02:00
Carl Meyer d658deac60 bpo-21145: Add cached_property decorator in functools (#6982)
Robust caching of calculated properties is
harder than it looks at first glance, so add
a solid, well-tested implementation to the
standard library.
2018-08-28 17:11:56 +10:00
Louis Sautier 3fe89dac42 bpo-34434: Update doc for bool(), float() and int() arguments (GH-8834) 2018-08-27 18:45:26 +08:00
Alexey Izbyshev 44838be9f7 closes bpo-34502: Remove a note about utf8_mode from sys.exit() docs. (GH-8928) 2018-08-25 11:23:00 -07:00
Andrés Delfino 2e5d2ea208 Fix markup in stdtypes documentation (GH-8905) 2018-08-25 07:08:20 -07:00
Alexander Vasin 416cbce22d Fixed typo with asynccontextmanager code example (GH-8845)
`yield conn`, instead of just `yield`.
2018-08-24 19:38:11 -07:00
Daniel Dương 075b3c3259 Fix typo in the dataclasses's doc (GH-8896) 2018-08-24 05:19:24 -04:00
Anthony Sottile cc18258daf Fix doc for `add_subparsers` arguments (GH-8884)
There was a missing comma.
2018-08-23 20:08:54 -07:00
Jelle Zijlstra b8a181f4ae Fix typo in asyncio.BoundedSemaphore docs (GH-8882)
semapthores -> semaphores
2018-08-23 18:50:00 -07:00
Ville Skyttä c33bb5d401 Make it more clear that setUpClass runs before each class, not "class run" (GH-8844) 2018-08-23 07:49:18 -07:00
Berker Peksag e7d4b2f205
bpo-2122: Make mmap.flush() behave same on all platforms (GH-8692)
Previously, its behavior was platform-dependent and there was no error checking
under Windows.
2018-08-22 21:21:05 +03:00
Berker Peksag 225b055480
bpo-22057: Clarify eval() documentation (GH-8812)
If a globals dictionary without a '__builtins__' key is passed to
eval(), a '__builtins__' key will be inserted to the dictionary:

    >>> eval("print('__builtins__' in globals())", {})
    True

(As a result of this behavior, we can use the builtins
print() and globals() even if we passed a dictionary without a
'__builtins__' key to eval().)
2018-08-19 13:25:33 +03:00
Andrés Delfino 93b5655c04 bpo-34432: doc Mention complex and decimal.Decimal on str.format not about locales (GH-8808) 2018-08-18 13:36:24 -04:00
Alfred Perlstein a2510732da Warn not to set SIGPIPE to SIG_DFL (#6773) 2018-08-17 14:48:05 +01:00
Sebastian Rittau c53aaec793 bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793)
The http_response() and https_response() methods of the HTTPErrorProcessor
class have two required parameters, 'request' and 'response'.
2018-08-17 12:47:32 +03:00
Berker Peksag e0b5b2096e
bpo-34384: Fix os.readlink() on Windows (GH-8740)
os.readlink() now accepts path-like and bytes objects on Windows.
Previously, support for path-like and bytes objects was only
implemented on Unix.

This commit also merges Unix and Windows implementations of
os.readlink() in one function and adds basic unit tests to increase
test coverage of the function.
2018-08-15 13:03:41 +03:00
Ville Skyttä da12063f2f smtplib documentation fixes (GH-8708)
* SMTP.startssl: Fix doc on keyfile and certfile use

* SMTP.startssl: Add missing keyfile and certfile deprecation notice

* SMTP: Doc grammar fixes
2018-08-12 20:39:19 -07:00
Andrés Delfino 65b5ef02ec Fix the versionadded indentation in exec_module doc (GH-8719) 2018-08-11 23:50:46 -07:00
Evan Allrich 9e84084851 bpo-34379: Doc: Move note for json.dump (GH-8730) 2018-08-11 16:34:02 +09:00
Berker Peksag 84a13fbda0
bpo-9372: Deprecate several __getitem__ methods (GH-8609)
The __getitem__ methods of DOMEventStream, FileInput,
and FileWrapper classes ignore their 'index' parameters
and return the next item instead.
2018-08-11 09:05:04 +03:00
Andriy Maletsky 22d131a7f9 Doc: add missing capture_output arg to subprocess.run() signature (#8374) 2018-08-09 13:01:54 -07:00
Alex Grönholm cca4eec3c0 bpo-34270: Make it possible to name asyncio tasks (GH-8547)
Co-authored-by: Antti Haapala <antti.haapala@anttipatterns.com>
2018-08-08 17:06:47 -04:00
Mikhail Terekhov d2ac400267 bpo-34335: Use async/await syntax in documentation examples (GH-8674) 2018-08-07 13:29:06 -07:00
Xtreak 5b2657fb8c bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645)
Patch by Terry Jan Reedy.
2018-08-06 15:55:03 -04:00
Terry Jan Reedy 28c7f8c8ce
bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (#8673)
* bpo-34273: Change 'Fixed point' to 'Fixed-point notation'.
The change in the mini language floating point and decimal table
is consistent with 'Exponential notation' and clarifies that we
are referring to the output notation, not an object type.

* Update string.rst

* Update string.rst

* Update string.rst

* Update string.rst
2018-08-06 08:41:17 -04:00
Ville Skyttä 336c945858 bpo-34336: Don't promote possibility to leave out typing.Optional (#8677) 2018-08-05 17:38:04 +01:00
Berker Peksag 2e5566d9e7
Fix reST markup in unittest documentation (GH-8665) 2018-08-04 00:56:55 +03:00
Stefan Otte 46dc4e34ed bpo-34329: Doc'd how to remove suffix of pathlib.Path() (GH-8655) 2018-08-03 23:49:42 +03:00
Andrés Delfino b6efc2cf97 Improve the grammar in `range` documentation. (GH-8628)
Remove unnecessary "that" in the sentence.
2018-08-02 22:12:51 -07:00
torsava f394ee5eaf bpo-27910: Update documentation of traceback module (GH-6116)
In the documentation for the traceback module, the definitions of functions
extract_tb(), format_list() and classmethod StackSummary.from_list()
mention the old style 4-tuples that these functions used to return or accept.

Since Python 3.5, however, they return or accept a FrameSummary object
instead of a 4-tuple, or a StackSummary object instead of a list of 4-tuples.

Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
2018-08-02 19:08:59 +03:00
Marcel Plch a2fe1e52eb bpo-34097: Add support for zipping files older than 1980-01-01 (GH-8270)
ZipFile can zip files older than 1980-01-01 and newer than 2107-12-31 using
a new strict_timestamps parameter at the cost of setting the timestamp
to the limit.
2018-08-02 15:04:52 +02:00
MartinAltmayer 944451cd8d bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532) 2018-07-31 10:06:12 -04:00
Raymond Hettinger 9c18b1ae52
bpo-33089: Add math.dist() for computing the Euclidean distance between two points (GH-8561) 2018-07-31 00:45:49 -07:00
Serhiy Storchaka f1d36d8efa
bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346)
* help(hashlib) didn't work because of incorrect module name in blake2b and
  blake2s classes.
* Constructors blake2*(), sha3_*(), shake_*() and keccak_*() incorrectly
  accepted keyword argument "string" for binary data, but documented as
  accepting the "data" keyword argument. Now this parameter is positional-only.
* Keyword-only parameters in blake2b() and blake2s() were not documented as
  keyword-only.
* Default value for some parameters of blake2b() and blake2s() was None,
  which is not acceptable value.
* The length argument for shake_*.digest() was wrapped out to 32 bits.
* The argument for shake_128.digest() and shake_128.hexdigest() was not
  positional-only as intended.
* TypeError messages for incorrect arguments in all constructors sha3_*(),
  shake_*() and keccak_*() incorrectly referred to sha3_224.

Also made the following enhancements:

* More accurately specified input and result types for strings, bytes and
  bytes-like objects.
* Unified positional parameter names for update() and constructors.
* Improved formatting.
2018-07-31 09:50:16 +03:00
Elvis Pranskevichus 22d25085db bpo-34075: Deprecate non-ThreadPoolExecutor in loop.set_default_executor() (GH-8533)
Various asyncio internals expect that the default executor is a
`ThreadPoolExecutor`, so deprecate passing anything else to
`loop.set_default_executor()`.
2018-07-30 12:42:43 +02:00
Berker Peksag a71fed0b75 bpo-8145: Improve isolation_level documentation (GH-8499)
Initial patch by R. David Murray.
2018-07-29 10:01:38 +01:00
Raymond Hettinger c6dabe37e3
bpo-33089: Multidimensional math.hypot() (GH-8474) 2018-07-28 07:48:04 -07:00
Elena Oat 5032692746 bpo-24356: Specify which Python binary will be used with venv (GH-6589) 2018-07-28 13:58:05 +01:00
johnthagen 95dfb9c3ae bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877)
Clarify how to bind to all interfaces using socket
2018-07-28 11:03:23 +01:00
Andrés Delfino 937fb55d35 bpo-5978: Document that profiling needs cmd/function to return (GH-7938)
<!-- issue-number: bpo-5978 -->
https://bugs.python.org/issue5978
<!-- /issue-number -->
2018-07-28 11:01:24 +01:00
Sanyam Khurana b4bc5cab82 bpo-29710: Clarify documentation for Bitwise binary operation (GH-1691)
Mathematically, bitwise operations on integers behave as if there were an
infinite number of sign bits. Pragmatically, that gives the same answer as
using one extra sign bit for the bitwise logical operations.
2018-07-28 15:15:50 +10:00
Mariatta 95d34c2a37
Fix site module documentation. (GH-8441)
The script will exit with the number 0 (zero), instead of the letter O.
2018-07-24 09:14:20 -07:00
Serhiy Storchaka 02ec92fa7b
bpo-29209: Remove old-deprecated features in ElementTree. (GH-6769)
Also make getchildren() and getiterator() emitting
a DeprecationWarning instead of PendingDeprecationWarning.
2018-07-24 12:03:34 +03:00
Alexander Marshalov e22072fb11 bpo-34149: Behavior of the min/max with key=None (GH-8328)
Improve consistency with the signature for sorted(), heapq.nsmallest(), heapq.nlargest(), and itertools.groupby().
2018-07-23 20:58:21 -07:00
Matthias Bussonnier bde782bb59 bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) 2018-07-24 00:10:56 +03:00
Berker Peksag 7a3056fa7d
bpo-21446: Update reload fixer to use importlib (GH-8391) 2018-07-23 09:49:08 +03:00
Andrés Delfino cb9c299a55 Fix versionchanged indentation in popitem documentation (GH-8387) 2018-07-21 15:14:56 -07:00
Raymond Hettinger feabae9617
Clarify ValueError's broad applicability (GH-8313) 2018-07-17 08:35:26 -07:00
Raymond Hettinger 01b7d58982
bpo-34123: Fix missed documentation update for dict.popitem(). (GH-8292) 2018-07-16 17:20:15 -07:00
Jon Ribbens c9265c1534 bpo-34124: Fix markup of message_from_binary_file() signature (GH-8297) 2018-07-16 20:19:42 +03:00
Andrés Delfino 379e9d639a bpo-4260: Document that ctypes.xFUNCTYPE are decorators (GH-7924) 2018-07-13 15:50:20 +03:00
Andrés Delfino 33aefad342 Doc: Point to Simple statements section instead of PEP (GH-8238) 2018-07-11 18:44:06 +09:00
Tom Faulkner da5e9476bb Dataclasses: Fix example on 30.6.8, add method should receive a list rather than an integer. (GH-8038)
Change example function to append rather than add lists.
2018-07-10 22:39:57 -04:00
Daniel Porteous c287545d62 bpo-34067: Include a more easily understood example for nullcontext (GH-8158)
Include a more easily understood example for nullcontext
2018-07-09 23:49:29 +10:00
Serhiy Storchaka 2a9b8babf0
bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684) 2018-07-09 11:47:45 +03:00
Andrés Delfino f85af035c5 Fix margin in sentinel and mock_open (GH-8188) 2018-07-08 17:28:51 -07:00
Marcin Niemira bc9aa813a3 bpo-34061: Document sqlite3.NotSupportedError (GH-8172) 2018-07-08 15:02:58 +03:00
Sergey Fedoseev 0830858aee bpo-34041: Allow creating deterministic functions in Connection.create_function() (GH-8086) 2018-07-08 10:09:20 +03:00
Marcin Niemira 9c5ba09748 closes bpo-34050: Fix link in SSL docs (GH-8173) 2018-07-07 15:24:20 -07:00
Andrés Delfino b6bb77c2b8 bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510) 2018-07-07 23:17:16 +03:00
Andrés Delfino 2d748389dc Fix moduleauthor/sectionauthor directives in Enum (GH-8117) 2018-07-07 22:01:25 +03:00
Andrés Delfino 03dd0e794e Add missing closing parentheses (GH-8144) 2018-07-07 22:00:46 +03:00
Dong-hee Na 2800dcf656 bpo-34065: Improve the markup of logging.basicConfig() arguments (GH-8153) 2018-07-07 15:36:40 +03:00
Julien Palard 7943c5e8b5
Doc: Remove superfluous markup. (GH-8112)
The line is speaking of a list of commands, not the list command.
2018-07-06 11:15:13 +02:00
Sergey Fedoseev f12028809b versionadded -> versionchanged for all 'X parameter was added' for uniformity. (GH8114)
Per the recommendation in our Developer's Guide:
  https://devguide.python.org/documenting/#paragraph-level-markup
2018-07-05 17:01:16 -07:00
Windson yang 3ae2e33a61 classify abs() argument type (GH-8103) 2018-07-05 16:09:53 -07:00
Gerrit Holl bd81cbd584 DOC: In `reduce`, refer to `accumulate` (GH-7930) 2018-07-04 15:26:32 -07:00
Farhaan Bukhsh 5b6e49a139 bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348)
This commit fixes the -timedelta overfllow issue not documented properly.

Signed-off-by: Farhaan Bukhsh <farhaan.bukhsh@gmail.com>
2018-07-04 19:42:05 +01:00
Sergey Fedoseev 831c29721d bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) 2018-07-03 14:59:32 +03:00
INADA Naoki c6cd164cff
bpo-30660: Doc: Optimize PNG files by optipng (GH-8032)
Using OptiPNG 0.7.7.
Used command is: `find . -name '*.png' | xargs optipng -o7`
2018-07-01 16:02:52 +09:00
Tal Einat 6dc57e2a20
bpo-31938: Convert selectmodule.c to Argument Clinic (GH-4265) 2018-06-30 23:02:48 +03:00
INADA Naoki fe524df37c
Doc: Remove unused image file (GH-8027) 2018-07-01 03:04:34 +09:00
Tal Einat 0cdf5f4289
bpo-32568: make select.epoll() and its docs consistent (#7840)
* `flags` is indeed deprecated, but there is a validation on its value for
  backwards compatibility reasons.  This adds mention of this in the docs.
* The docs say that `sizehint` is deprecated and ignored, but it is still
  used when `epoll_create1()` is unavailable. This adds mention of this in
  the docs.
* `sizehint=-1` is acceptable again, and is replaced with `FD_SETSIZE-1`.
  This is needed to have a default value available at the Python level,
  since `FD_SETSIZE` is not exposed to Python. (see: bpo-31938)
* Reject `sizehint=0` since it is invalid to pass on to `epoll_create()`.

The relevant tests have also been updated.
2018-06-30 15:43:23 +03:00
Andrés Delfino bda9c3eae3 Fix the indentation in the documentation of bin() and hash() (GH-7998) 2018-06-29 12:57:10 +03:00
Yury Selivanov 41cb0baea9
bpo-33985: Implement ContextVar.name attribute. (GH-7980) 2018-06-28 13:20:29 -04:00
Zackery Spytz d2cbfffc84 bpo-25007: Add copy protocol support to zlib compressors and decompressors (GH-7940) 2018-06-27 21:04:51 +03:00
Tal Einat fdd6e0bf18
bpo-33573: docs to suggest median() alternatives for non-numeric data (GH-7587) 2018-06-25 14:04:01 +03:00
Andrés Delfino 4a6e746079 bpo-33952: Fix typo in str.upper() documentation (GH-7898) 2018-06-25 13:34:22 +03:00
Andrés Delfino a8ddf85a84 bpo-33943: Add references in the docs for logging.basicConfig (GH-7858)
Adds references to info about file modes, `time.strftime()`, string formatting
syntaxes, and logging levels.
2018-06-25 09:06:10 +03:00
Dong-hee Na cf67d6a934 bpo-33897: Add a 'force' keyword argument to logging.basicConfig(). (GH-7873) 2018-06-25 05:11:09 +01:00
Andrés Delfino 0ba9a0b7d1 [master] bpo-33885: Replace "hook function" with "callable" (GH-7765) (#7886)
(cherry picked from commit c45cb47907)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-06-23 19:23:50 -07:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 940ae60856 Clarified the tempfile.tempdir documentation (GH-7829) 2018-06-21 03:52:43 -04:00
Giampaolo Rodola c7f02a9659
bpo-33671 / shutil.copyfile: use memoryview() with dynamic size on Windows (#7681)
bpo-33671
* use memoryview() with size == file size on Windows, see https://github.com/python/cpython/pull/7160#discussion_r195405230
* release intermediate (sliced) memoryview immediately
* replace "OSX" occurrences with "macOS"
* add some unittests for copyfileobj()
2018-06-19 08:27:29 -07:00
INADA Naoki 698865dcbb
bpo-33843: Remove deprecated stuff in cgi module (GH-7662) 2018-06-19 17:28:50 +09:00
INADA Naoki e57f91a0f0
bpo-33866: enum: Stop using OrderedDict (GH-7698) 2018-06-19 01:14:26 +09:00
Andrés Delfino 5092439c2c bpo-33892: Doc: Use gender neutral words (GH-7770) 2018-06-18 13:34:30 +09:00
Xtreak c151f7846d bpo-33859: Fix spelling mistakes in docs. (GH-7691) 2018-06-16 08:08:31 +03:00
Carl Meyer b193fa996a bpo-33499: Add PYTHONPYCACHEPREFIX env var for alt bytecode cache location. (GH-6834)
In some development setups it is inconvenient or impossible to write bytecode
caches to the code tree, but the bytecode caches are still useful. The
PYTHONPYCACHEPREFIX environment variable allows specifying an alternate
location for cached bytecode files, within which a directory tree mirroring the code
tree will be created. This cache tree is then used (for both reading and writing)
instead of the local `__pycache__` subdirectory within each source directory.

Exposed at runtime as sys.pycache_prefix (defaulting to None), and can
be set from the CLI as "-X pycache_prefix=path".

Patch by Carl Meyer.
2018-06-16 14:40:56 +10:00
Andrés Delfino a9d0b34a5c bpo-33854: Add PEP 461 title to 'See also' note (GH-7688) 2018-06-15 15:42:20 -04:00
Zackery Spytz 71ede00f14 bpo-31378: Document sqlite3.OperationalError exception (GH-7677) 2018-06-13 12:09:31 +03:00
Xiang Zhang b9d8ad5130
bpo-33828: Add missing versionchanged note for string.Formatter. (GH-7668)
string.Formatter auto-numbering feature was added in 3.4 and there
is no versionchanged note in its documentation, making the documentation
ambiguous about which version the feature is available.
2018-06-13 09:42:44 +08:00
Giampaolo Rodola 4a172ccc73
bpo-33671: efficient zero-copy for shutil.copy* functions (Linux, OSX and Win) (#7160)
* have shutil.copyfileobj use sendfile() if possible

* refactoring: use ctx manager

* add test with non-regular file obj

* emulate case where file size can't be determined

* reference _copyfileobj_sendfile directly

* add test for offset() at certain position

* add test for empty file

* add test for non regular file dst

* small refactoring

* leave copyfileobj() alone in order to not introduce any incompatibility

* minor refactoring

* remove old test

* update docstring

* update docstring; rename exception class

* detect platforms which only support file to socket zero copy

* don't run test on platforms where file-to-file zero copy is not supported

* use tempfiles

* reset verbosity

* add test for smaller chunks

* add big file size test

* add comment

* update doc

* update whatsnew doc

* update doc

* catch Exception

* remove unused import

* add test case for error on second sendfile() call

* turn docstring into comment

* add one more test

* update comment

* add Misc/NEWS entry

* get rid of COPY_BUFSIZE; it belongs to another PR

* update doc

* expose posix._fcopyfile() for OSX

* merge from linux branch

* merge from linux branch

* expose fcopyfile

* arg clinic for the win implementation

* convert path type to path_t

* expose CopyFileW

* fix windows tests

* release GIL

* minor refactoring

* update doc

* update comment

* update docstrings

* rename functions

* rename test classes

* update doc

* update doc

* update docstrings and comments

* avoid do import nt|posix modules if unnecessary

* set nt|posix modules to None if not available

* micro speedup

* update description

* add doc note

* use better wording in doc

* rename function using 'fastcopy' prefix instead of 'zerocopy'

* use :ref: in rst doc

* change wording in doc

* add test to make sure sendfile() doesn't get called aymore in case it doesn't support file to file copies

* move CopyFileW in _winapi and actually expose CopyFileExW instead

* fix line endings

* add tests for mode bits

* add docstring

* remove test file mode class; let's keep it for later when Istart addressing OSX fcopyfile() specific copies

* update doc to reflect new changes

* update doc

* adjust tests on win

* fix argument clinic error

* update doc

* OSX: expose copyfile(3) instead of fcopyfile(3); also expose flags arg to python

* osx / copyfile: use path_t instead of char

* do not set dst name in the OSError exception in order to remain consistent with platforms which cannot do that (e.g. linux)

* add same file test

* add test for same file

* have osx copyfile() pre-emptively check if src and dst are the same, otherwise it will return immedialtey and src file content gets deleted

* turn PermissionError into appropriate SameFileError

* expose ERROR_SHARING_VIOLATION in order to raise more appropriate SameFileError

* honour follow_symlinks arg when using CopyFileEx

* update Misc/NEWS

* expose CreateDirectoryEx mock

* change C type

* CreateDirectoryExW actual implementation

* provide specific makedirs() implementation for win

* fix typo

* skeleton for SetNamedSecurityInfo

* get security info for src path

* finally set security attrs

* add unit tests

* mimick os.makedirs() behavior and raise if dst dir exists

* set 2 paths for OSError object

* set 2 paths for OSError object

* expand windows test

* in case of exception on os.sendfile() set filename and filename2 exception attributes

* set 2 filenames (src, dst) for OSError in case copyfile() fails on OSX

* update doc

* do not use CreateDirectoryEx() in copytree() if source dir is a symlink (breaks test_copytree_symlink_dir); instead just create a plain dir and remain consistent with POSIX implementation

* use bytearray() and readinto()

* use memoryview() with bytearray()

* refactoring + introduce a new _fastcopy_binfileobj() fun

* remove CopyFileEx and other C wrappers

* remove code related to CopyFileEx

* Recognize binary files in copyfileobj()
...and use fastest _fastcopy_binfileobj() when possible

* set 1MB copy bufsize on win; also add a global _COPY_BUFSIZE variable

* use ctx manager for memoryview()

* update doc

* remove outdated doc

* remove last CopyFileEx remnants

* OSX - use fcopyfile(3) instead of copyfile(3)

...as an extra safety measure: in case src/dst are "exotic" files (non
regular or living on a network fs etc.) we better fail on open() instead
of copyfile(3) as we're not quite sure what's gonna happen in that
case.

* update doc
2018-06-12 23:04:50 +02:00
Tal Einat c3f55be7dd
bpo-27397: Make email module properly handle invalid-length base64 strings (#7583)
When attempting to base64-decode a payload of invalid length (1 mod 4),
properly recognize and handle it.  The given data will be returned as-is,
i.e. not decoded, along with a new defect, InvalidBase64LengthDefect.
2018-06-12 15:46:22 +03:00
Christian Heimes ef24b6c54d bpo-31432: Clarify ssl CERT_NONE/OPTIONAL/REQUIRED docs. (GH-3530)
The documentation for CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED were
misleading and partly wrong. It fails to explain that OpenSSL behaves
differently in client and server mode. Also OpenSSL does validate the
cert chain everytime. With SSL_VERIFY_NONE a validation error is not
fatal in client mode and does not request a client cert in server mode.
Also discourage people from using CERT_OPTIONAL in client mode.
2018-06-11 18:59:45 -04:00
Zackery Spytz 2c071cebe6 bpo-30820: Remove incorrect docs for email.contentmanager.raw_data_manager (#7631)
The docs claimed that a list of EmailMessage objects could be
passed to set_content(), but this was never implemented.
2018-06-11 10:47:47 -04:00
Alexander Belopolsky 877b23202b
bpo-33812: Corrected astimezone for naive datetimes. (GH-7578)
A datetime object d is aware if d.tzinfo is not None and
d.tzinfo.utcoffset(d) does  not return None. If d.tzinfo is None,
or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns None,
 d is naive.

This commit ensures that instances with non-None d.tzinfo, but
d.tzinfo.utcoffset(d) returning None are treated as naive.

In addition, C acceleration code will raise TypeError if
d.tzinfo.utcoffset(d) returns an object with the type other than
timedelta.

* Updated the documentation.

Assume that the term "naive" is defined elsewhere and remove the
not entirely correct clarification.  Thanks, Tim.
2018-06-10 17:02:58 -04:00
Terry Jan Reedy af4b0130d4
bpo-33610: Update IDLE Code Context doc entry (GH-7597)
Users can now click on context lines.
2018-06-10 15:48:41 -04:00
Andrés Delfino 0e0534c402 Fix typo in object.__getnewargs__() documentation (GH-7554) 2018-06-10 03:41:09 +03:00
MarcoFalke 7e0d882a98 doc: Fix typo in asyncio-eventloop.rst (GH-7345)
This is a fixup to 19a44f63c7
2018-06-09 16:09:13 -07:00
Andrés Delfino 4acc140f8d Fix indendation level of versionchanged directive in configparser.items() doc (GH-7543) 2018-06-08 17:20:05 -07:00
Andrés Delfino 1cbdb2208a bpo-33801: Remove non-ordered dict comment from plistlib doc (GH-7495) 2018-06-08 17:51:20 -04:00
Andrés Delfino 3b0b90c8c3 bpo-33800: Fix default argument for parameter dict_type of ConfigParser/RawConfigParser (GH-7494) 2018-06-08 15:19:21 -04:00
Dong-hee Na 4f54867e29 bpo-33197: Add versionadded tag to the documentation of ParameterKind (GH-7536) 2018-06-08 12:07:52 -04:00
Elvis Pranskevichus c0d062f523 bpo-33736: Improve the documentation of asyncio stream APIs (GH-7326) 2018-06-08 11:36:00 -04:00
Andrés Delfino 6860629d87 bpo-33798: Update csv document about dict order (GH-7490) 2018-06-08 21:51:12 +09:00
Dong-hee Na 4aa3006619 bpo-33197: Add description property for _ParameterKind. (GH-7206) 2018-06-07 23:46:31 -04:00
Neil Schemenauer d3ed67d14e
bpo-33609: small wording fixes to dict ordering docs
A few wording improvements to dict ordering documentation.
2018-06-07 14:46:04 -07:00
Anthony Sottile bb6366bd75 bpo-17909: Document that json.load can accept a binary IO (GH-7366) 2018-06-07 18:58:12 +09:00
Scott Sanderson cebe80b59b bpo-29235: Update document for Profiler's context manager (GH-7331) 2018-06-07 18:46:42 +09:00
Benjamin Peterson 7c69c1c0fb
update to Unicode 11.0.0 (closes bpo-33778) (GH-7439)
Also, standardize indentation of generated tables.
2018-06-06 20:14:28 -07:00
Victor Stinner 3ef769fcd3
bpo-28240: timeit: Update repeat() doc (GH-7419)
Document that the default value of repeat changed from 3 to 5 in
Python 3.7.
2018-06-06 17:55:18 +02:00
John Reese 3a5b0d8988 bpo-33504: Migrate configparser from OrderedDict to dict. (#6819)
With 3.7+, dictionary are ordered by design.  Configparser still uses
collections.OrderedDict, which is unnecessary.  This updates the module
to use the standard dict implementation by default, and changes the
docs and tests to match.
2018-06-05 16:31:33 -07:00
Thomas Kluyver c56b17bd8c bpo-12486: Document tokenize.generate_tokens() as public API (#6957)
* Document tokenize.generate_tokens()

* Add news file

* Add test for generate_tokens

* Document behaviour around ENCODING token

* Add generate_tokens to __all__
2018-06-05 10:26:39 -07:00
Vinay Sajip dde9fdbe45
bpo-33165: Added stacklevel parameter to logging APIs. (GH-7424) 2018-06-05 17:24:18 +01:00
Mayank Singhal 9ef1b0690b bpo-31215: Add version changed notes for OpenSSL 1.1.0 compatibility (GH-7346) 2018-06-06 00:14:37 +10:00
Tobias Kunze af1ec97a6d bpo-32392: Document env keyword argument of subprocess.run() (GH-7289) 2018-06-05 14:41:42 +03:00
INADA Naoki f822549653 bpo-33609: Document dict insertion order guarantee as of 3.7 (GH-7093) 2018-06-04 18:09:22 -04:00
Yury Selivanov 9602643120
bpo-33734: asyncio/ssl: a bunch of bugfixes (#7321)
* Fix AttributeError (not all SSL exceptions have 'errno' attribute)

* Increase default handshake timeout from 10 to 60 seconds
* Make sure start_tls can be cancelled correctly
* Make sure any error in SSLProtocol gets propagated (instead of just being logged)
2018-06-04 11:32:35 -04:00
Tobias Kunze f7745e1dcb bpo-27902: Add compatibility note to Profile docs (GH-7295) 2018-06-04 19:07:16 +09:00
Farhaan Bukhsh b75ec08567 bpo-33640, uuid.UUID doc: document endian of bytes parameter (GH-7263)
The bytes parameter uses big endian.
2018-06-04 09:29:00 +02:00
Zackery Spytz a801cf164b bpo-23495: Correct the documentation for writerows() of csv Writer objects (GH-6316)
`writerows()` takes an iterable.
2018-06-02 08:02:16 -07:00
Scott Sanderson 2e01b75884 bpo-29235: Make cProfile.Profile a context manager (GH-6808) 2018-06-01 13:36:23 -07:00
Vinay Sajip 23cee80cfa
bpo-33400: Removed references to RFC3339 and ISO8601 from the logging documentation. (GH-7297) 2018-06-01 10:09:21 +01:00
Vinay Sajip c0d341d49b
bpo-32519: Removed misleading sentence from EnvBuilder documentation. (GH-7296) 2018-06-01 10:08:33 +01:00
Serhiy Storchaka 0a36ac1a09
bpo-33641: Convert RFC references into links. (GH-7103)
85% of them are already links.
2018-05-31 07:39:00 +03:00
Pablo Galindo 02e2a085dc bpo-31368: Enhance os.preadv() documentation (GH-7254) 2018-05-31 01:00:04 +02:00
jhaydaman 0a28c0d12e bpo-33238: Add InvalidStateError to concurrent.futures. (GH-7056)
Future.set_result and Future.set_exception now raise InvalidStateError
if the futures are not pending or running. This mirrors the behavior
of asyncio.Future, and prevents AssertionErrors in asyncio.wrap_future
when set_result is called multiple times.
2018-05-30 10:15:06 +03:00
Elvis Pranskevichus dec947ca26 Fix typo introduced in GH-7217 (#7230) 2018-05-29 20:14:59 -04:00
Elvis Pranskevichus f9aeca2085 bpo-23859: Document that asyncio.wait() does not cancel its futures (#7217)
Unlike `asyncio.wait_for()`, `asyncio.wait()` does not cancel the passed
futures when a timeout accurs.
2018-05-29 18:21:44 -04:00
Elvis Pranskevichus e2b340ab41 bpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216)
Currently, asyncio.wait_for(fut), upon reaching the timeout deadline,
cancels the future and returns immediately.  This is problematic for
when *fut* is a Task, because it will be left running for an arbitrary
amount of time.  This behavior is iself surprising and may lead to
related bugs such as the one described in bpo-33638:

    condition = asyncio.Condition()
    async with condition:
        await asyncio.wait_for(condition.wait(), timeout=0.5)

Currently, instead of raising a TimeoutError, the above code will fail
with `RuntimeError: cannot wait on un-acquired lock`, because
`__aexit__` is reached _before_ `condition.wait()` finishes its
cancellation and re-acquires the condition lock.

To resolve this, make `wait_for` await for the task cancellation.
The tradeoff here is that the `timeout` promise may be broken if the
task decides to handle its cancellation in a slow way.  This represents
a behavior change and should probably not be back-patched to 3.6 and
earlier.
2018-05-29 17:31:01 -04:00
Yury Selivanov 863b674909
bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7209) 2018-05-29 17:20:02 -04:00
Géry Ogam 1cee216cf3 bpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195) 2018-05-29 22:10:30 +02:00
Mandeep Singh e55de2d77f bpo-30935: update get_event_loop docs (GH-2731) 2018-05-29 14:37:08 -04:00
Serhiy Storchaka 73cbe7a01a
bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197)
Remove the docstring attribute of AST types and restore docstring
expression as a first stmt in their body.

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-05-29 12:04:55 +03:00
Steve Dower 3e51a3d592
bpo-32878: Adds documentation for st_ino on Windows (GH-5764) 2018-05-28 17:24:36 -07:00
Yury Selivanov 416c1ebd98
bpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174) 2018-05-28 17:54:02 -04:00
Yury Selivanov dbf102271f
bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)
In this commit:

* Support BufferedProtocol in set_protocol() and start_tls()
* Fix proactor to cancel readers reliably
* Update tests to be compatible with OpenSSL 1.1.1
* Clarify BufferedProtocol docs
* Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving
* Rewrite test_start_tls_server_1
2018-05-28 14:31:28 -04:00
Ethan Smith c651275afe bpo-32380: Create functools.singledispatchmethod (#6306) 2018-05-26 13:38:33 -07:00
Ivan Levkivskyi 6e413f4327
Document typing.NoReturn (GH-7107) 2018-05-24 21:33:55 -07:00
Ned Deily 8ebf5ceb0f
bpo-33109: argparse subparsers are once again not required by default (GH-6919)
bpo-26510 in 3.7.0a2 changed the behavior of argparse to make
subparsers required by default, returning to the behavior of 2.7
and 3.2. The behavior was changed in 3.3 to be no longer required.
While it might make more sense to have the default to required,
compatibility with 3.3 through 3.6 is probably less disruptive
than trying to reintroduce compatibility with 2.7 at this point.
This change restores the 3.6 behavior.
2018-05-23 21:55:15 -04:00
Victor Stinner 453bd0bc65
bpo-33540: Add block_on_close attr to socketserver (GH-6911)
Add a new block_on_close class attribute to ForkingMixIn and
ThreadingMixIn classes of socketserver to opt-in for pre-3.7 behaviour.
2018-05-24 03:14:44 +02:00
Christian Heimes 529525fb5a
bpo-33618: Enable TLS 1.3 in tests (GH-7079)
TLS 1.3 behaves slightly different than TLS 1.2. Session tickets and TLS
client cert auth are now handled after the initialy handshake. Tests now
either send/recv data to trigger session and client certs. Or tests
ignore ConnectionResetError / BrokenPipeError on the server side to
handle clients that force-close the socket fd.

To test TLS 1.3, OpenSSL 1.1.1-pre7-dev (git master + OpenSSL PR
https://github.com/openssl/openssl/pull/6340) is required.

Signed-off-by: Christian Heimes <christian@python.org>
2018-05-23 22:24:45 +02:00
Yury Selivanov 28b9178023
bpo-32436: Document PEP 567 changes to asyncio. (GH-7073) 2018-05-23 13:35:04 -04:00
sth 825aab95fd bpo-27300: Add the errors parameter to tempfile classes. (GH-6696) 2018-05-23 08:07:01 +03:00
Matthias Bussonnier 8bb0b5b03c bpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062)
bpo-33604: Bump removal notice from 3.6 to 3.8 and change PendingDeprecationWarning to DeprecationWarning as we had intended to do earlier...
2018-05-22 15:55:31 -07:00
Christian Heimes e8eb6cb792
bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976)
Change TLS 1.3 cipher suite settings for compatibility with OpenSSL
1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by
default.

Also update multissltests and Travis config to test with latest OpenSSL.

Signed-off-by: Christian Heimes <christian@python.org>
2018-05-22 22:50:12 +02:00
John Reese 6c4fab0f4b bpo-33516: Add support for __round__ in MagicMock (GH-6880)
unittest.mock.MagicMock now supports the __round__() magic method.
2018-05-22 22:01:10 +02:00
Lisa Roach 900c48dba3 bpo-30940: Updating round() docs. (GH-6342) 2018-05-20 18:00:18 +03:00
Elvis Pranskevichus 63536bd286 bpo-32996: The bulk of What's New in Python 3.7 (GH-6978) 2018-05-19 23:15:06 -04:00
Daniel Chimeno cf8abcbe03 import secrets module in secrets recipes (#6705) 2018-05-20 01:01:49 +10:00
Ivan Levkivskyi f65e31fee3
bpo-28556: Don't simplify unions at runtime (GH-6841) 2018-05-18 16:00:38 -07:00
Yury Selivanov d8d715f514
asyncio/docs: Mark asyncio.run() as provisional in 3.7. (#6946) 2018-05-17 13:44:00 -04:00
Gregory P. Smith dff46758f2
bpo-19950: Clarify unittest TestCase instance use. (GH-6875) 2018-05-17 10:08:45 -05:00
Zvezdan Petkovic c2f082e9d1 bpo-13631: Fix the order of initialization for readline libedit on macOS. (GH-6915)
The editline emulation needs to be initialized *after* the name is
defined. This fixes the long open issue.
2018-05-17 02:45:10 -04:00
Barry Warsaw 713a936736
bpo-32216: Update dataclasses documentation (#6913) 2018-05-16 15:50:07 -04:00
Petr Viktorin 8b94b41ab7
bpo-28167: Remove platform.linux_distribution (GH-6871)
* test_ssl: Remove skip_if_broken_ubuntu_ssl

We no longer support OpenSSL 0.9.8.15.15.

* bpo-28167: Remove platform.linux_distribution
2018-05-16 11:51:18 -04:00
Christopher Beacham 5db5c0669e bpo-21475: Support the Sitemap extension in robotparser (GH-6883) 2018-05-16 10:52:07 -04:00
Eric V. Smith 7a1c027501
Minor tweaks to dataclasses docs. (GH-6903) 2018-05-16 09:29:05 -04:00
Eric V. Smith 98d50cb8f5
bpo-32216: Add documentation for dataclasses (GH-6886)
This is an initial version that likely requires much polishing. I'm adding it lay out the structure and so we have something to start working from.
2018-05-16 04:20:43 -04:00
Christian Heimes 67c4801663 bpo-32257: Add ssl.OP_NO_RENEGOTIATION (GH-5904)
The ssl module now contains OP_NO_RENEGOTIATION constant, available with
OpenSSL 1.1.0h or 1.1.1.

Note, OpenSSL 1.1.0h hasn't been released yet.

Signed-off-by: Christian Heimes <christian@python.org>
2018-05-15 16:25:40 -04:00
Stéphane Wirtel 19177fbd5d bpo-33503: Fix the broken pypi link in the source and the documentation (GH-6814) 2018-05-15 14:58:35 -04:00
Matthias Bussonnier 9eb40bc38d bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6669)
Also bump PendingDeprecationWarning to DeprecationWarning.
2018-05-15 11:17:00 -04:00
Travis DePrato b7b493e2fb Add AsyncContextManager to typing module documentation. (GH-6822) 2018-05-14 18:14:07 -04:00
Amber Brown 545c955be9 bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in FieldStorage use the given errors (GH-6804) 2018-05-14 18:11:55 -04:00
Romuald Brunet 0ded580403 Add versionchanged in create_datagram_endpoint doc (#4697)
Most of the parameters were added in 3.4.4 (b9bf913ab3), but this
change was not documented
2018-05-14 19:22:00 +03:00
Elena Oat 7ffd4c58fa bpo-22069: Update TextIO documentation (GH-6609)
Clarify that flush is implied when the call to write contains a newline character.
2018-05-14 10:48:01 -04:00
Serhiy Storchaka df00f04825 bpo-26701: Tweak the documentation for special methods in int(). (GH-6741) 2018-05-10 23:38:44 +10:00
Julien Palard b3c369861b Fix superfluous if in documentation. (GH-6728) 2018-05-09 10:25:22 +03:00
Ivan Levkivskyi bd5f96581b
bpo-32717: Document PEP 560 (GH-6726) 2018-05-08 19:38:41 +01:00
Vinay Sajip c4994dc00d
bpo-33400: Clarified documentation to indicate no strict adherence to ISO 8601. (GH-6702) 2018-05-04 22:20:54 +01:00
Antoine Pitrou 9d3627e311
bpo-33332: Add signal.valid_signals() (GH-6581) 2018-05-04 13:00:50 +02:00
Serhiy Storchaka ef347535f2
bpo-20104: Improve error handling and fix a reference leak in os.posix_spawn(). (#6332) 2018-05-01 16:45:04 +03:00
Stéphane Wirtel 7508a54c77 bpo-20709: os.utime(path_to_directory): wrong documentation for Windows. (GH-5469)
Remove the paragraph where we explain that os.utime() does not support a
directory as path under Windows. Patch by Jan-Philip Gehrcke

Co-authored-by: Jan-Philip Gehrcke <jgehrcke@gmail.com>
2018-05-01 12:02:26 +02:00
Brett Cannon 3ab9365dca
bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467) 2018-04-30 11:31:45 -07:00
Bo Bayles 9f3535c9cd bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223) 2018-04-29 21:03:05 +03:00
Tom Christie e022bbc169 Change "non-local state" to "content-local state". (GH-6617)
The wording here seems wrong, as per https://bugs.python.org/msg315792
2018-04-27 18:35:13 -04:00
Brian Curtin df826f36e0
Clarify the inspect.getmembers predicate parameter (#6615)
Previously, the predicate parameter was mentioned, but what it was to be
called with was not documented and required either trial-and-error or
looking into the source to find that it is called with the `value`, or
second item, of the full members list. This change addresses what the
predicate will receive, as well as does some light formatting to make
this clear.
2018-04-26 19:48:26 -04:00
Andrés Delfino 67a8f4fed3 bpo-33280: Reorganize external Tcl/Tk references. (GH-6473) 2018-04-25 20:53:58 +03:00
Pablo Galindo d6ef6db9ff Fix rendering issues in the documentation for the os module (#6525) 2018-04-25 20:48:27 +03:00
Chris Bradbury e500839796 bpo-33251: Update documentation to reflect change. (GH-6446) (#6583) 2018-04-23 13:56:39 -07:00
Andrés Delfino b81ca28b37 bpo-33297: Mention Pillow to work with more image formats. (#6505)
Also update PIL doc references to Pillow.
2018-04-21 15:17:26 +03:00
Brett Cannon a8c342465b
bpo-25427: Remove pyvenv (GH-5962) 2018-04-20 14:15:40 -07:00
Ville Skyttä 61f82e0e33 Spelling fixes to docs, docstrings, and comments (GH-6374) 2018-04-20 16:08:45 -04:00
Andrés Delfino 4b685bf719 bpo-33283: Mention PNG as a supported format by Tcl/Tk. (GH-6479) 2018-04-17 08:34:35 +03:00
Łukasz Langa a00d440edb
Revert 725476222a (#6494)
This note in documentation was never true.
2018-04-16 20:00:31 -07:00
Antoine Pitrou 480ab05d5f
bpo-33176: Add a toreadonly() method to memoryviews. (GH-6466) 2018-04-14 19:49:21 +02:00
WeizhongTu ffa2c3e2c4 itemgetter add dict example (GH-1280) 2018-04-12 21:33:08 -04:00
suic86 04e8293465 Fix error messages in argparse examples (GH-6435)
The examples in argparse documentation use `error: too few arguments`
error message which was removed in this commit f97c59a in 2011.
2018-04-11 13:45:04 -05:00
Serhiy Storchaka 46936d5a71
Improve highlighting of some code blocks. (GH-6401) 2018-04-08 19:18:04 +03:00
Raymond Hettinger 9265dd72e5
Add a prepend() recipe to teach a chain() idiom (GH-6415) 2018-04-08 08:44:20 -07:00
Alex Gaynor c87eb09d2e
bpo-29613: Added support for SameSite cookies (GH-6413)
* bpo-29613: Added support for SameSite cookies

Implemented as per draft
https://tools.ietf.org/html/draft-west-first-party-cookies-07

* Documented SameSite

And suggestions by members.

* Missing space :(

* Updated News and contributors

* Added version changed details.

* Fix in documentation

* fix in documentation

* Clubbed test cases for same attribute into single.

* Updates

* Style nits + expand tests

* review feedback
2018-04-07 16:09:42 -04:00
Jay Crotts ef5ce884a4 bpo-8243: Doc patch for curses.window.addstr and curses.window.addch (GH-5179) 2018-04-06 21:27:07 -04:00
Brett Cannon 9e2be60634
bpo-33169: Remove values of `None` from sys.path_importer_cache when invalidating caches (GH-6402)
An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.
2018-04-06 16:10:18 -07:00
Alex Gaynor 1d87c7b80b
fixed capitalization of class name (GH-6396) 2018-04-06 08:26:49 -04:00
Łukasz Langa c51d8c9ba6
bpo-23403: Bump pickle.DEFAULT_PROTOCOL to 4 (#6355)
This makes performance better and produces shorter pickles. This change is backwards compatible up to the oldest currently supported version of Python (3.4).
2018-04-03 23:06:53 -07:00
hui shang dfbbbf16f9 bpo-32337: Update documentats about dict order (GH-4973) 2018-04-04 13:55:05 +09:00
INADA Naoki 629338f140
bpo-32360: Remove object_pairs_hook=OrderedDict examples (GH-5001) 2018-04-03 12:39:47 +09:00
Andrés Delfino badb894bbb closes bpo-33202: fix os.walk mentioning os.listdir instead of os.scandir (GH-6335) 2018-04-02 19:48:54 -07:00
Gregory P. Smith 79760ed256
bpo-20104: Add os.posix_spawn documentation. (#6334) 2018-04-01 12:01:48 -07:00
Mike DePalatis 233de021d9 Fix socket type in DatagramHandler documentation: TCP -> UDP (GH-6272) 2018-03-30 15:36:06 +08:00
Julien Palard 79c3bab35c
FIX documentation and NEWS of ThreadedHTTPServer. (GH-6207) 2018-03-28 23:24:58 +02:00
Julien Palard 78553138be
Fix typos '.::' should typically just be '::'. (GH-6165) 2018-03-28 23:14:15 +02:00
Serhiy Storchaka bac2d5ba30
Fix duplicating words words. (GH-6296)
Most of them have been added in 3.7.
2018-03-28 22:14:26 +03:00
Sam Dunster 65a34709f6 Fix senfile typo (#6265)
* Also in docs
2018-03-27 17:47:38 -07:00
Cheryl Sabella da1734c58d bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195) 2018-03-26 18:29:33 -07:00
Michael Seifert e105294708 Corrected link targets in collections.rst (GH-1052) 2018-03-26 14:40:35 +03:00
Gregory P. Smith dfb6e54dd8
Clarify fd inheritance when close_fds=False. (GH-6240)
Clarify the subprocess documentation.
2018-03-25 10:27:59 -07:00
Nick Coghlan d5d9e02dd3
bpo-33053: -m now adds *starting* directory to sys.path (GH-6231)
Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.

This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.
2018-03-25 23:03:10 +10:00
Himanshu Lakhara 5cbb84106e bpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061) 2018-03-23 14:26:35 -07:00
Julien Palard 8bcfa02e4b
bpo-31639: Use threads in http.server module. (GH-5018) 2018-03-23 17:40:33 +01:00
Berker Peksag a0a42d22d8
Fix a reference to the MRE book in re docs (GH-1113)
Reported by Maksym Nikulyak on docs.p.o.
2018-03-23 16:46:52 +03:00