Commit Graph

20822 Commits

Author SHA1 Message Date
kms70847 8d59aca4a9 Fix typo in Simple Statements documentation (GH-3809)
Replace "restriction" with "restrictions".
2017-09-28 12:54:48 -07:00
Benjamin Peterson 236329ed9f point to the module-level get_ident function rather than the one in _thread (#3782) 2017-09-26 23:13:15 -07:00
Guilherme Caminha 4a2d00cb45 bpo-31571: Remove duplicated info in Lexical Analysis documentation (GH-3691)
- Remove the second mention about the `u` prefix
- Remove the second mention about numeric literals do not include a sign
2017-09-25 16:16:54 -07:00
Stefan Grönke f1502d097c bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711) 2017-09-25 17:58:10 +01:00
Raymond Hettinger 49392c63a2 bpo-27385: Clarify docstring for groupby() (#3738) 2017-09-25 01:21:06 -07:00
Raymond Hettinger 0d4497b9ca bpo-23702: Update Descriptor-HOWTO to reflect the removal of unbound methods (#3739) 2017-09-25 01:05:49 -07:00
Raymond Hettinger 0bf287b6e0 bpo-18558: Clarify glossary entry for "Iterable" (#3732) 2017-09-25 00:52:06 -07:00
Sanket Dasgupta 5b9299d8c7 bpo-30085: Improve documentation for operator (#1171)
The dunderless functions are preferred; dunder are retained for back compatilibity.
Patch by Sanket Dasgupta.
2017-09-24 14:29:22 -04:00
Henk-Jaap Wagenaar 8337239d79 Update Email library documentation example (GH-3720)
A `"` was missing from an `<a href>` tag.
2017-09-24 09:12:53 -07:00
Serhiy Storchaka 2fad102354 bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (#3667)
Defer removing old behavior to 3.8.
Document new feature of selection_set() and friends.
2017-09-24 14:34:09 +03:00
Serhiy Storchaka c247caf33f bpo-30346: An iterator produced by the itertools.groupby() iterator (#1569)
now becames exhausted after advancing the groupby iterator.
2017-09-24 13:36:11 +03:00
topper-123 039b25d8fd bpo-31564: Update typing documentation (GH-3696)
Mention that ``NewType`` can derive from another ``NewType``.
2017-09-23 19:37:48 -07:00
Dmitry Chestnykh aecc08ac3a Docs: correct hashlib.blake2 keyed hashing example (bpo-31560) 2017-09-23 10:18:40 -07:00
François Magimel da9b4cfb48 bpo-31423: Fix building the PDF documentation (GH-3693)
Use prefixed macro names for the `authoraddress` function, add T2A to the font encoding in LaTeX sources to support Cyrillic characters in the PDF documentation, and replace the deprecated `font_size` config option with `pointsize`.
2017-09-22 12:16:57 -05:00
Barry Warsaw 35425d638c bpo-31389 Add an optional `header` argument to pdb.set_trace() (#3438)
* Give pdb.set_trace() an optional `header` argument

* What's new.

* Give pdb.set_trace() an optional `header` argument

* What's new.
2017-09-22 12:29:42 -04:00
Stefan Krah b1558a0368 bpo-31443: Update included code. (#3697) 2017-09-22 18:14:13 +02:00
Stefan Krah ca72589bfa bpo-31443: Formulate the type slot initialization rules in terms of C99. (#3688) 2017-09-22 17:44:58 +02:00
Igor Filatov 9adda0cdf8 bpo-31351: Set return code in ensurepip when pip fails (GH-3626)
Previously ensurepip would always report success, even if the
pip installation failed.
2017-09-21 20:07:45 +10:00
Anthony Sottile aaf6fc0982 bpo-26510: make argparse subparsers required by default (#3027)
This fixes a regression from Python 2.  To get optional subparsers,
use the new parameter ``add_subparsers(required=False)``.

Patch by Anthony Sottile.
2017-09-20 17:35:27 -04:00
Felipe 19e4d9346d bpo-31533: fix broken link to OpenSSL docs (#3674) 2017-09-20 20:20:18 +02:00
Steve Dower a4bb58fda4 Fix build issues in Doc/make.bat (#3658) 2017-09-19 12:31:28 -07:00
Antoine Pitrou b43c4caf81 Restore dummy_threading and _dummy_thread, but deprecate them (bpo-31370) (#3648) 2017-09-18 22:04:20 +02:00
svelankar 9b47af6537 bpo-31501: Operator precedence description for arithmetic operators (#3633) 2017-09-17 17:56:16 -07:00
Mariatta 63c591c0b0 bpo-31487: Update F-strings doc example (GH-3627)
Shorten the comment to: "using integer format specifier"
2017-09-17 07:43:31 -07:00
Mariatta f361897069 Improve f-strings documentation (GH-3604)
Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
2017-09-16 11:46:43 -07:00
Mariatta 0ec8c4bd10 bpo-31458: Clarify that Changelog is built from Misc/NEWS.d directory (GH-3617) 2017-09-16 10:43:30 -07:00
Eric Snow 3f9eee6eb4 bpo-28411: Support other mappings in PyInterpreterState.modules. (#3593)
The concrete PyDict_* API is used to interact with PyInterpreterState.modules in a number of places. This isn't compatible with all dict subclasses, nor with other Mapping implementations. This patch switches the concrete API usage to the corresponding abstract API calls.

We also add a PyImport_GetModule() function (and some other helpers) to reduce a bunch of code duplication.
2017-09-15 16:35:20 -06:00
Christian Heimes e82c034496 bpo-31431: SSLContext.check_hostname auto-sets CERT_REQUIRED (#3531)
Signed-off-by: Christian Heimes <christian@python.org>
2017-09-15 20:29:57 +02:00
Christian Heimes 4df60f18c6 bpo-31386: Custom wrap_bio and wrap_socket type (#3426)
SSLSocket.wrap_bio() and SSLSocket.wrap_socket() hard-code SSLObject and
SSLSocket as return types. In the light of future deprecation of
ssl.wrap_socket() module function and direct instantiation of SSLSocket,
it is desirable to make the return type of SSLSocket.wrap_bio() and
SSLSocket.wrap_socket() customizable.

Signed-off-by: Christian Heimes <christian@python.org>
2017-09-15 20:26:05 +02:00
Terry Jan Reedy ff70289002 bpo-314777: IDLE - improve rstrip entry in doc (#3602)
'Strip trailing whitespace' is not limited to spaces.  Wording caters to beginners who
do know know the meaning of 'whitespace'.  Multiline string literals are not skipped.

* News blurb.
2017-09-15 13:05:28 -04:00
Paul Romano 992f613fe6 Fix description in Python 3.7 What's New (#3603) 2017-09-15 20:00:57 +03:00
Michael Seifert da67e0d644 bpo-29916: Include PyGetSetDef in C API extension documentation. (#831) 2017-09-15 19:25:27 +03:00
Barry Warsaw b2e5794870 bpo-31338 (#3374)
* Add Py_UNREACHABLE() as an alias to abort().
* Use Py_UNREACHABLE() instead of assert(0)
* Convert more unreachable code to use Py_UNREACHABLE()
* Document Py_UNREACHABLE() and a few other macros.
2017-09-14 18:13:16 -07:00
Feanil Patel 6a396c9807 bpo-31128: Allow pydoc to bind to arbitrary hostnames (#3011)
New -n flag allow overriding localhost with custom value,
for example to run from containers.
2017-09-14 17:54:09 -04:00
Eric Snow 93c92f7d1d bpo-31404: Revert "remove modules from Py_InterpreterState (#1638)" (#3565)
PR #1638, for bpo-28411, causes problems in some (very) edge cases. Until that gets sorted out, we're reverting the merge. PR #3506, a fix on top of #1638, is also getting reverted.
2017-09-13 23:46:04 -07:00
sww 312ffead1e Improve code examples in hashlib cookie signing (GH-3562)
The `blake2b` function does not take the `data` keyword argument.
The hex digest returned by sign was a string, whereas compare_digest expects bytes-like objects.
Typo fix: compare_digesty -> compare_digest
2017-09-13 23:24:36 -07:00
Mariatta 1b8f612e18 bpo-31458: Update Misc/NEWS link in What's New page (GH-3555)
Update the link from Misc/NEWS to Misc/NEWS.d
2017-09-13 16:47:33 -07:00
Louie Lu b8d1b9d7c6 Mention enum as an ex (#2982) 2017-09-12 21:44:14 -07:00
Mariatta ea0f7c26ce bpo-31394: Make tokenize.rst PEP 8-compliant (GH-3526)
The last commit contained lines longer than 80 characters.
2017-09-12 21:00:00 -07:00
Aivar Annamaa 5f8fbf917e bpo-31394: Clarify documentation about token type attribute (GH-3469)
Make it clear that Ellipsis tokens also have type attribute set to token.OP.
2017-09-12 20:24:03 -07:00
Terry Jan Reedy 98758bc67f bpo-31421: Document how IDLE runs tkinter programs. (#3513)
IDLE calls tcl/tk update in the background in order to make live
interaction and experimentatin with tkinter applications much easier.
2017-09-12 09:05:16 -04:00
Terry Jan Reedy adb4cd2a2a bpo-27099: Finish updating IDLE doc and help text. (#3510)
As needed for the conversion of extensions to features.
2017-09-12 07:45:15 -04:00
wohlganger 58fc71c447 bpo-27099: IDLE - Convert built-in extensions to regular features (#2494)
About 10 IDLE features were implemented as supposedly optional
extensions.  Their different behavior could be confusing or worse for
users and not good for maintenance.  Hence the conversion.

The main difference for users is that user configurable key bindings
for builtin features are now handled uniformly.  Now, editing a binding
in a keyset only affects its value in the keyset.  All bindings are
defined together in the system-specific default keysets in config-
extensions.def.  All custom keysets are saved as a whole in config-
extension.cfg.  All take effect as soon as one clicks Apply or Ok.

The affected events are '<<force-open-completions>>', '<<expand-word>>',
'<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>',
'<<run-module>>', '<<check-module>>', and '<<zoom-height>>'.  Any
(global) customizations made before 3.6.3 will not affect their keyset-
specific customization after 3.6.3. and vice versa.

Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
2017-09-10 17:19:47 -04:00
Raymond Hettinger 8b57d73639 bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() (#3454)
* Working draft without _source

* Re-use itemgetter() instances

* Speed-up calls to __new__() with a pre-bound tuple.__new__()

* Add note regarding string interning

* Remove unnecessary create function wrappers

* Minor sync-ups with PR-2736.  Mostly formatting and f-strings

* Bring-in qualname/__module fix-ups from PR-2736

* Formally remove the verbose flag and _source attribute

* Restore a test of potentially problematic field names

* Restore kwonly_args test but without the verbose option

* Adopt Inada's idea to reuse the docstrings for the itemgetters

* Neaten-up a bit

* Add news blurb

* Serhiy pointed-out the need for interning

* Jelle noticed as missing f on an f-string

* Add whatsnew entry for feature removal

* Accede to request for dict literals instead keyword arguments

* Leave the method.__module__ attribute pointing the actual location of the code

* Improve variable names and add a micro-optimization for an non-public helper function

* Simplify by in-lining reuse_itemgetter()

* Arrange steps in more logical order

* Save docstring in local cache instead of interning
2017-09-10 10:23:36 -07:00
Zhiming Wang 30644dee0c Improve IncrementalEncoder documentation (GH-2746)
getstate and setstate are instance methods, same as encode and reset.
2017-09-09 23:09:55 -07:00
Sergey Fedoseev a7fbad96c8 Make `json.dumps()` example to be PEP-8 compliant. (GH-3472) 2017-09-09 09:39:36 -07:00
Christian Heimes b3ad0e5127 bpo-28182: Expose OpenSSL verification results (#3412)
The SSL module now raises SSLCertVerificationError when OpenSSL fails to
verify the peer's certificate. The exception contains more information about
the error.

Original patch by Chi Hsuan Yen

Signed-off-by: Christian Heimes <christian@python.org>
2017-09-08 12:00:19 -07:00
Raymond Hettinger 70c2dd306f Show example of itemgetter() applied to a dictionary (#3431) 2017-09-07 23:53:07 -07:00
Christian Heimes cb5b68abde bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3 (#1363)
* bpo-29136: Add TLS 1.3 support

TLS 1.3 introduces a new, distinct set of cipher suites. The TLS 1.3
cipher suites don't overlap with cipher suites from TLS 1.2 and earlier.
Since Python sets its own set of permitted ciphers, TLS 1.3 handshake
will fail as soon as OpenSSL 1.1.1 is released. Let's enable the common
AES-GCM and ChaCha20 suites.

Additionally the flag OP_NO_TLSv1_3 is added. It defaults to 0 (no op) with
OpenSSL prior to 1.1.1. This allows applications to opt-out from TLS 1.3
now.

Signed-off-by: Christian Heimes <christian@python.org>
2017-09-07 18:07:00 -07:00
Ned Deily 590665c399 bpo-31036: Allow sphinx and blurb to be found automatically (#3440)
Rather than requiring the path to blurb and/or sphinx-build to be specified to the make rule, enhance the Doc/Makefile to look for each first in a virtual environment created by make venv and, if not found, look on the normal process PATH. This allows the Doc/Makefile to take advantage of an installed spinx-build or blurb and, thus, do the right thing most of the time. Also, make the directory for the venv be configurable and document the `make venv` target.
2017-09-07 17:17:53 -07:00