Commit Graph

21793 Commits

Author SHA1 Message Date
Andrés Delfino c8bb467f40 Update compound_stmts.rst (#9864) 2018-10-14 11:18:16 +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
Juliette Monsel bf034715db bpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768) 2018-10-12 19:44:10 +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
Gus Goulart 4505f65ae7 bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796) 2018-10-12 12:16:43 +03:00
Stéphane Wirtel 859c068e52 bpo-34962: make doctest in Doc/ now passes, and is enforced in CI (GH-9806) 2018-10-12 09:51:05 +02:00
Felipe Rodrigues 1d26c72e6a 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
2018-10-10 19:43:40 -07:00
Elvis Pranskevichus a6b3ec5b6d 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.
2018-10-10 18:43:14 +02:00
Mayank Asthana 7e18deef65 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.
2018-10-10 16:46:44 +02:00
Stéphane Wirtel 7c817e620b bpo-34913: Document gzip command line interface (GH-9782) 2018-10-10 08:28:26 +02:00
animalize 6261ae9b01 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.
2018-10-08 14:20:54 -07:00
Paul Bailey 4c33997057 bpo-34911: Added support for secure websocket cookies (GH-9734) 2018-10-08 21:49:29 +03:00
Juliette Monsel af5658ae93 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.
2018-10-08 19:29:24 +03:00
Xtreak a8d5e2f255 Use double quote instead of backtick to clarify Ellipsis constant (GH-9754) 2018-10-08 20:44:16 +05:30
Sanyam Khurana ffc5a14d00 bpo-33014: Clarify str.isidentifier docstring (GH-6088)
* bpo-33014: Clarify str.isidentifier docstring

* bpo-33014: Add code example in isidentifier documentation
2018-10-08 12:23:32 +05:30
Danish Prakash 656d52dbfd bpo-34901: add isolated (-I) flag to sys.flags (GH-9708)
https://bugs.python.org/issue34901
2018-10-07 09:12:31 -07:00
Andrés Delfino 7dfbd49671 Correct grammar mistake in re.rst. (GH-9745) 2018-10-06 22:48:30 +03:00
Stéphane Wirtel 683281f536 bpo-34906: Doc: Fix typos (2) (GH-9735)
Fix typos
2018-10-06 16:35:53 +02:00
Christophe Nanteuil 92878829c3 bpo-34158: Documentation UTC offset update (GH-8377)
* Documentation of UTC offset update
Since changes in the UTC offset that allows sub-minute offsets, the documentation needs update:

- "%z" format code documentation update
Karthikeyan Singaravelan commented on bugs.python.org:
Added as part of 018d353c1c and a fix regarding duplicate words for that part was added at bac2d5ba30.
Relevant format string at https://github.com/python/cpython/pull/2896/files#diff-25e2d173c84057d069b7890450714eddR214.
Relevant test case with 6-digit string for microsecond : https://github.com/python/cpython/pull/2896/files#diff-acc40bec51c7de832de3361db3edae52R309.
Table at https://docs.python.org/3.7/library/datetime.html#strftime-and-strptime-behavior could also be updated with microseconds being optional in the second column
%z | UTC offset in the form ±HHMM[SS] (empty string if the object is naive). | (empty), +0000, -0400, +1030

- isoformat documentation update
According to me, needs confirmation:
Relevant format string at https://github.com/python/cpython/pull/4699/files#diff-25e2d173c84057d069b7890450714eddR176
Relevant test case at https://github.com/python/cpython/pull/4699/files#diff-25e2d173c84057d069b7890450714edd

* From Martin Panter: some style improvment;
From @pganssle: using f for fractional part of seconds in all file.
2018-10-05 18:57:02 -04:00
Xtreak 6f9c55d1c0 bpo-34825: Add more entries to os to pathlib reference table (GH-9608)
The added functions are as below :

| os module     | Pathlib       |
| ------------- | ------------- |
| os.chmod   | Path.chmod  |
| os.mkdir  | Path.mkdir  | 
| os.rename | Path.rename |
| os.replace | Path.replace |
| os.rmdir  | Path.rmdir |
| os.remove, os.unlink | Path.unlink |
| os.path.samefile | Path.samefile |

Thanks


https://bugs.python.org/issue34825
2018-10-05 08:24:11 -07:00
Stéphane Wirtel 07fbbfde1b bpo-34906: Doc: Fix typos (GH-9712) 2018-10-05 16:17:18 +02:00
Benjamin Peterson e006b39a40
Make it clear that the msg argument to assertWarns/assertWarnsRegex/assertRaisesRegex is keyword-only. (GH-9680)
A follow up to be4e5b8920.
2018-10-02 21:38:39 -07:00
Cheryl Sabella 11c4eaa993 Remove recent from logging cookbook (GH-9636) 2018-10-02 09:35:05 -07:00
Benjamin Peterson be4e5b8920
Make it clear that the msg argument to assertRaises is keyword-only. (GH-9670) 2018-10-01 22:18:44 -07:00
Ezio Melotti 30534cc717
bpo-31865: Fix a couple of typos in the html.unescape() docs. (GH-9662) 2018-10-01 17:34:46 -07:00
Hrvoje Nikšić cd602b8af2 bpo-34476: Document that asyncio.sleep() always suspends. (#9643) 2018-10-01 13:09:38 +03:00
Brendan Jurd 9df100286b Fix name of argument in docs for functools.reduce(). (#9634) 2018-09-30 23:52:10 -07:00
Zackery Spytz e45473e3ca bpo-27351: Fix ConfigParser.read() documentation and docstring (GH-8123)
Switch "list" with "iterable" to match with the implementation.
2018-09-29 10:15:55 -06:00
Zackery Spytz eef059657d bpo-31370: Remove references to threadless builds (#8805)
Support for threadless builds was removed in a6a4dc81.
2018-09-29 10:07:11 -06:00
방성범 (Bang Seongbeom) 508d820512 Fix astuple in dataclasses documentation (GH-9631) 2018-09-29 06:50:31 -04:00
Victor Stinner 37aae9dcf1 bpo-34687: Update asyncio doc for ProactorEventLoop (GH-9623)
Since ProactorEventLoop is now the default in 3.8, remove examples
using it explicitly on Windows.





https://bugs.python.org/issue34687
2018-09-28 08:40:08 -07:00
Yury Selivanov 59ee5b1293
bpo-34802: Fix asyncio.iscoroutine() docs (GH-9611) 2018-09-27 15:48:30 -04:00
Serhiy Storchaka 3f22811fef
bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445) 2018-09-27 17:42:37 +03:00
Tal Einat f55c64c632
bpo-31425: fix versionadded in docs and add attribution in NEWS (GH-9595) 2018-09-27 00:20:38 +03:00
Michael Lee 130717fe58 Clarify that Type[SomeTypeVar] is legal (#9585)
Currently, the docs state that when doing `Type[X]`, X is only allowed to
be a class, a union of classes, and Any. This pull request amends
that sentence to clarify X may also be a typevar (or a union involving
classes, Any, and TypeVars).
2018-09-26 16:13:28 +01:00
Bjorn Andersson bb8165172a bpo-31425: Expose AF_QIPCRTR in socket module (GH-3706)
The AF_QIPCRTR address family was introduced in Linux v4.7.

Co-authored-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-09-26 16:47:52 +03:00
Cheryl Sabella d345bb4d9b bpo-34334: Don't log traceback twice in QueueHandler (GH-9537) 2018-09-26 00:00:08 +01:00
Yury Selivanov fad6af2744
asyncio/docs: Replace Python 4.0 -> 3.10 (GH-9579) 2018-09-25 17:44:52 -04:00
Zackery Spytz 5a5ce064b3 bpo-5950: Support reading zips with comments in zipimport (#9548)
* bpo-5950: Support reading zips with comments in zipimport
2018-09-25 15:15:47 -04:00
Yury Selivanov 996859a90d
bpo-34790: [docs] Passing coroutines to asyncio.wait() can be confusing. (GH-9543) 2018-09-25 14:51:21 -04:00
Terry Jan Reedy fdcb5ae25c
bpo-1529353: IDLE - Squeezer What's New for 3.8 (#9572) 2018-09-25 12:45:27 -04:00
Terry Jan Reedy ea718d377d
bpo-1529353: IDLE - Squeezer What's New for 3.7.1 (#9568) 2018-09-25 12:09:43 -04:00
Terry Jan Reedy dac712d516
bpo-1529353: IDLE: Squeezer What's New for 3.6.7 (#9567) 2018-09-25 12:08:54 -04:00
Victor Stinner 6ea29c5e90 bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538) 2018-09-25 11:27:08 -04:00
Joe Pamer c8c0249c9e bpo-32557: allow shutil.disk_usage to take a file path on Windows also (GH-9372)
https://bugs.python.org/issue32557
2018-09-25 07:57:36 -07:00
Géry Ogam 5b3cbcd4a0 Improved the more elaborate multiprocessing example in the logging cookbook (GH-9326) 2018-09-25 08:24:52 +01:00
Joni Kähärä b60b4683f6 Fix wrong exception reference: BrokenThreadPool -> BrokenProcessPool (GH-9533) 2018-09-25 11:30:25 +08:00
Petr Viktorin 2d3ff2b5ea
bpo-24937: Replace the extension module porting HOWTO by links to external projects (GH-9317) 2018-09-24 12:42:33 +02:00
Lisa Roach 9718b59ee5
bpo-34659: Adds initial kwarg to itertools.accumulate() (GH-9345) 2018-09-23 17:34:59 -07:00
Christian Heimes 17b1d5d4e3 bpo-17239: Disable external entities in SAX parser (GH-9217)
The SAX parser no longer processes general external entities by default
to increase security. Before, the parser created network connections
to fetch remote files or loaded local files from the file system for DTD
and entities.

Signed-off-by: Christian Heimes <christian@python.org>



https://bugs.python.org/issue17239
2018-09-23 00:50:25 -07:00
Christian Heimes 9fb051f032 bpo-34670: Add TLS 1.3 post handshake auth (GH-9460)
Add SSLContext.post_handshake_auth and
SSLSocket.verify_client_post_handshake for TLS 1.3 post-handshake
authentication.

Signed-off-by: Christian Heimes <christian@python.org>q


https://bugs.python.org/issue34670
2018-09-22 23:32:31 -07:00
jChapman 8fabae3b00 bpo-32117: Iterable unpacking in return and yield documentation (GH-9487)
News entry clean up, added to what's new

Requested by @gvanrossum in https://github.com/python/cpython/pull/4509 


https://bugs.python.org/issue32117
2018-09-22 18:13:10 -07:00
Ethan Furman 5bdab641da
bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328)
* bpo-29577: allow multiple mixin classes
2018-09-21 19:03:09 -07:00
Brett Cannon d64ee1a5ba bpo-32718: Make Activate.ps1 for venv cross-platform and available on all platforms (GH-9321)
PowerShell Core 6.1 is the cross-platform port of Windows PowerShell. This change updates Activate.ps1 to not make Windows assumptions as well as installing it into the bin/Scripts directory on all operating systems.

Requires PowerShell Core 6.1 for proper readline support once the shell has been activated for the virtual environment.
2018-09-21 15:27:26 -07:00
Yury Selivanov db1a80e97a
bpo-33649: Fix gather() docs; fix title; few other nits. (GH-9475) 2018-09-21 16:23:15 -04:00
Xiang Zhang 7d161726e4 Make docs of exitcode for subprocess.getstatusoutput more clear. (GH-9477)
Make it more accurate and not limited to UNIX.
2018-09-21 13:18:20 -07:00
Yury Selivanov 2ec872b31e
bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) 2018-09-21 15:33:56 -04:00
Yury Selivanov e247b46cba
bpo-33649: More improvements (GH-9439) 2018-09-20 12:43:59 -04:00
Yury Selivanov ffef50f1f5
bpo-34746: Fix stop -> close (GH-9437) 2018-09-20 01:17:09 -04:00
Victor Stinner 06e7608207
Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" (GH-9430)
* Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)"

This reverts commit dbdee0073c.

* Revert "bpo-34589: C locale coercion off by default (GH-9073)"

This reverts commit 7a0791b699.

* Revert "bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)"

This reverts commit 188ebfa475.
2018-09-19 14:56:36 -07:00
Ben Hoyt 3705b98620 bpo-34712: Fix style in examples in "Input and Output" (GH-9361)
A couple of fixes here to make this more PEP-8:

* Avoid multiple statements on one line with `;` statement separator -- this is very rare in Python and is "generally discouraged" in PEP 8 (and if used, per PEP 8 there shouldn't be a space before the `;`)
* Add output for the first "Formatted String Literals" example. (Side note: are the doctests for this being run? If so, why didn't it fail?)
* Avoid space before `!r`. I have generally not seen spaces before the `!`, and this also matches the style used in the docs here: https://docs.python.org/3/library/string.html#format-string-syntax



https://bugs.python.org/issue34712
2018-09-19 03:28:28 -07:00
Yury Selivanov 471503954a
bpo-33649: Add a high-level section about Futures; few quick fixes (GH-9403)
Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2018-09-18 17:55:44 -04:00
Nathaniel J. Smith a3c88ef12c Clarify that AsyncExitStack works with coroutine functions (GH-9405)
The docs were ambiguous about whether you pass in a coroutine function
or a coroutine object, e.g. is it:

  aestack.push_async_exit(some_async_func)

or

  aestack.push_async_exit(some_async_func())

(It's the first one.)
2018-09-18 14:27:59 -07:00
Serhiy Storchaka 0185f34ddc
bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant to invalid paths. (#7695)
Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(),
os.path.isfile(), os.path.islink(), and os.path.ismount() now return False
instead of raising ValueError or its subclasses UnicodeEncodeError
and UnicodeDecodeError for paths that contain characters or bytes
unrepresentative at the OS level.
2018-09-18 11:28:51 +03:00
Serhiy Storchaka 7bdf28265a
bpo-32455: Add jump parameter to dis.stack_effect(). (GH-6610)
Add C API function PyCompile_OpcodeStackEffectWithJump().
2018-09-18 09:54:26 +03:00
Yury Selivanov b042cf10c6
bpo-33649: Fix markup; add another note that asyncio.run is 3.7+ (GH-9389) 2018-09-18 02:47:54 -04:00
Miguel Ángel García 9c53fa6ad9 Fix syntax error on Asyncio example in doc (GH-9387)
The `gather` method requires to close the parenthesis, but it is being closed twice.
2018-09-18 02:01:26 -04:00
Danny Hermes 7bfbda46f4 Change "set_after" reference to `say_after`. (GH-9384) 2018-09-18 00:49:21 -04:00
Yury Selivanov ac94e38d07
bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380) 2018-09-17 23:58:00 -04:00
Victor Stinner dbdee0073c
bpo-34589: Add -X coerce_c_locale command line option (GH-9378)
Add a new -X coerce_c_locale command line option to control C locale
coercion (PEP 538).
2018-09-17 17:19:26 -07:00
Elvis Pranskevichus 1fa2ec49be bpo-33649: A copy-editing pass on asyncio documentation (GH-9376) 2018-09-17 19:16:44 -04:00
Yury Selivanov 3085534c39
bpo-33649: Add a hello world example to asyncio.rst (GH-9374) 2018-09-17 18:41:59 -04:00
Yury Selivanov c62ab2862d
bpo-34717: Stop numbering stdlib titles/sections in the docs (GH-9370) 2018-09-17 18:12:21 -04:00
Yury Selivanov 394374e30c
bpo-33649: Add low-level APIs index. (GH-9364) 2018-09-17 15:35:24 -04:00
Serhiy Storchaka 5e99b56d6b
bpo-33216: Improve the documentation for CALL_FUNCTION_* (GH-8338) (GH-8784) 2018-09-17 15:15:03 +03:00
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
Tony Flury ad8a000420 closes bpo-28955: Clarified comparisons between NaN and number in reference documentation (GH-5982)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-14 10:48:50 -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
Ned Deily 66755cbb1e
bpo-34247: add porting note to 3.7 What's New (GH-9223) 2018-09-13 11:49:47 -07:00
Carol Willing 1abba455d1 Polish doc as part of asyncio doc improvement (GH-9185) 2018-09-12 22:40:37 -07:00
Benjamin Peterson c9a71dd223
closes bpo-34641: Further restrict the LHS of keyword argument function call syntax. (GH-9212) 2018-09-12 17:14:39 -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
Victor Stinner 998b806366
Revert "bpo-34595: Add %T format to PyUnicode_FromFormatV() (GH-9080)" (GH-9187)
This reverts commit 886483e2b9.
2018-09-12 00:23:25 +02: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
Andrés Delfino a378254186 closes bpo-33883: Mention type checkers in the FAQ. (GH-7760) 2018-09-10 22:12:41 -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
Lew Kurtz f019579828 bpo-33460: remove ellipsis that look like continuation prompts (GH-7851)
Remove ellipsis that look like continuation prompts,
has a side benefit of putting rest of error message in proper text color.
2018-09-10 18:13:08 -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
NotAFile 28ea4c2847 switch descriptor howto to return value annotation (GH-7796) 2018-09-10 14:35:38 -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
Tal Einat 54752533b2
bpo-30977: rework code changes according to post-merge code review (GH-9106)
also mention the change and its consequences in What's New
2018-09-10 16:11:04 +03:00
Rémy HUBSCHER 290a60bd8a Revert "Fix misindented yaml in logging how to example (GH-8604)" (GH-9081)
This reverts commit 10b59f1b01.
2018-09-10 17:07:15 +08: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 Galindo fa221d804f
bpo-33083: Update "What's new" with math.factorial changes (GH-9109)
* Add elimination of non-int-like parameters in math.factorial to "What's new".
2018-09-08 00:16:17 +01: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
Victor Stinner 886483e2b9
bpo-34595: Add %T format to PyUnicode_FromFormatV() (GH-9080)
* Add %T format to PyUnicode_FromFormatV(), and so to
  PyUnicode_FromFormat() and PyErr_Format(), to format an object type
  name: equivalent to "%s" with Py_TYPE(obj)->tp_name.
* Replace Py_TYPE(obj)->tp_name with %T format in unicodeobject.c.
* Add unit test on %T format.
* Rename unicode_fromformat_write_cstr() to
  unicode_fromformat_write_utf8(), to make the intent more explicit.
2018-09-07 18:00:58 +02: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
Julien Palard 25fa141487 Doc: Missing 'f' in an f-string. (GH-9074) 2018-09-07 11:31:47 +02:00
Zachary Ware 98b976a2f8
Fix struct sequence glossary entry grammar (GH-9030)
... by removing a superfluous "either".

Reported by Никита Люшненко on docs@.
2018-09-01 20:59:27 -05:00
Marcel Plch 77b112cd56 bpo-34097: Polish API design (GH-8725)
Move strict_timestamps to constructor.
2018-08-31 16:43:31 +02:00
Victor Stinner c5989cd876
bpo-34523: Py_DecodeLocale() use UTF-8 on Windows (GH-8998)
Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding on
Windows if Py_LegacyWindowsFSEncodingFlag is zero.

pymain_read_conf() now sets Py_LegacyWindowsFSEncodingFlag in its
loop, but restore its value at exit.
2018-08-29 19:32:47 +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 ef8861c112
Fix Doc/whatsnew/3.8.rst (GH-8848)
The entry about deprecation of __getitem__ methods of
several classes was placed in the wrong section.
2018-08-21 17:58:49 +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
Rémy HUBSCHER 10b59f1b01 Fix misindented yaml in logging how to example (GH-8604) 2018-08-12 16:58:26 -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
Andrés Delfino cf2c5e8e28 Improve grammar of asynchronous iterator glossary entry (GH-8657) 2018-08-09 08:45:41 -07:00
Stéphane Wirtel 599bfa18f8 bpo-34324: Doc README wrong directory name for venv (GH-8650)
In the documentation, the `env` directory is specified when we execute
the `make venv` command. But in the code, `make venv` will create the
virtualenv inside the `venv` directory (defined by `VENVDIR`)
2018-08-09 08:05:31 -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
Sergey Fedoseev db8707c8ab Make code examples in Functional Programming HOWTO to be PEP 8 compliant. (GH-8646) 2018-08-07 14:38:00 -07:00
Mikhail Terekhov d2ac400267 bpo-34335: Use async/await syntax in documentation examples (GH-8674) 2018-08-07 13:29:06 -07:00
Berker Peksag 3c1b590472
Fix HTML formatting in datamodel.rst (GH-8693) 2018-08-06 23:52:49 +03: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
Lysandros Nikolaou bcd1d971b6 Update list.remove(x) documentation (GH-8636)
Rephrase it to "It raises a `ValueError`"
2018-08-02 19:45:48 -07:00
HiyashiChuka 46ebe61c7f bpo-34317: Fix a dead url to Windows documentation (GH-8622) 2018-08-02 19:44:06 -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
INADA Naoki c48e26dcad
bpo-27671: Update FAQ about why len is function (GH-8432) 2018-07-31 14:49:22 +09:00
Andrés Delfino 6921ef7bef Use 'for example' instead of 'in other words' in compound statement doc (GH-8401) 2018-07-30 11:44:35 -07:00
Segev Finer 8e7e8bd898 Fix typos & formatting in Using Python on Windows doc (GH-8559) 2018-07-30 10:11:30 -07: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
INADA Naoki 1d2dafa249 bpo-33666: Add what's new entry for os.errno removal (GH-#8497)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2018-07-28 13:47:31 +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
Berker Peksag defcffdf86
bpo-12743: Delete comment from marshal.rst (GH-8457)
Also, update the list of exceptions that may raised by PyMarshal_*
functions. We usually don't document exceptions raised by a
function, but in this case most of them were already documented
in C API and standard library documentation.
2018-07-27 07:35:11 +03:00
Andrés Delfino e42b705188 Fix typo: variables(s) (GH-8482)
Remove extra `(s)` in the documentation of `compound_stmts`.
2018-07-26 16:35:23 +01:00
Serhiy Storchaka 7cb7bcff20
bpo-20260: Implement non-bitwise unsigned int converters for Argument Clinic. (GH-8434) 2018-07-26 13:22:16 +03:00
Aaron Ang c0f0a7669c bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208) 2018-07-25 17:21:32 +03: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
Aaqa Ishtyaq cb5f3fdb9d Remove extra parentheses in output formatting tutorial (GH-8350)
The parentheses were incorrect.
2018-07-20 09:06:44 -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
Antoine Pitrou 961d54c5c1
bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229)
bpo-32430: Rename Modules/Setup.dist to Modules/Setup

Remove the necessity to copy the former manually to the latter when updating the local source tree.
2018-07-16 19:03:03 +02:00
Andrés Delfino 379e9d639a bpo-4260: Document that ctypes.xFUNCTYPE are decorators (GH-7924) 2018-07-13 15:50:20 +03:00
Stig Johan Berggren 5e5bbbec46 bpo-34083: Update dict order in Functional HOWTO (GH-8230) 2018-07-11 18:53:07 +09:00
Andrés Delfino 33aefad342 Doc: Point to Simple statements section instead of PEP (GH-8238) 2018-07-11 18:44:06 +09:00