Commit Graph

21568 Commits

Author SHA1 Message Date
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
INADA Naoki d5c875bbf1
bpo-33597: Add What's New for PyGC_Head (GH-8236) 2018-07-11 17:42:49 +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
Lysandros Nikolaou 9cffdbffc3 Fix documentation for input and output tutorial (GH-8231)
The ValueError message ends with a period.
2018-07-10 17:11:34 -07:00
Nick Coghlan 5fe7c98a54
bpo-34009: Expand on platform support changes (GH-8022)
Many users won't realise the implications the OpenSSL 1.0.2
minimum version requirement has when it comes to Ubuntu
14.04 and Debian 8, so expand on that in the platform support
section.

Also explicitly note the non-ASCII-based locale requirement for
full Unicode text handling support on non-Windows systems.
2018-07-10 23:04:29 +10: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
Andrés Delfino 8d41278045 bpo-33888: Use CPython instead of Python in the FAQ (GH-7767)
Make the change where discussing the CPython implementation of lists and dicts.
2018-07-07 19:25:47 -04:00
Marcin Niemira 9c5ba09748 closes bpo-34050: Fix link in SSL docs (GH-8173) 2018-07-07 15:24:20 -07:00
Andrew Kuchling ced350b195
bpo-28626: rearrange discussion of output formatting to encourage f-strings (#6036)
The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings.

This doesn't drop all of the old material, but it does rearrange the topics into a more modern order: f-strings first, discussing formatting specifiers a bit; then calling .format(); finally manual formatting with .ljust().
2018-07-07 17:36:23 -04:00
Andrés Delfino caccca78e4 bpo-33702: Add some missing links in production lists and do a little polish (GH-7259) 2018-07-07 23:24:46 +03: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
Sergey Fedoseev 3a9bb5f269 Removed unused import from tzinfo_examples.py. (GH-7994) 2018-07-04 21:47:37 -07:00
Julien Palard a6e1e41e05 Update Stackless Python wiki URL (GH-8072)
It was moved from bitbucket to GitHub.
2018-07-04 21:31:38 -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
Zachary Ware d824ca7f4d bpo-34006: Revert line length limit for Windows help docs (GH-8051)
The line-length limit is not needed because the pages appear in a separate app rather
 than on a browser tab.  It can also interact badly with the DPI setting.
2018-07-02 16:31:42 -04: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
Elvis Pranskevichus 4d26c8a177 bpo-32996: Enhancements to What's New based on feedback (GH-7988) 2018-06-28 11:57:37 -04:00
INADA Naoki 461a1c4b49
bpo-33842: Remove tarfile.filemode (GH-7661) 2018-06-28 17:10:36 +09:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 62b6cea6b8 bpo-33958: Doc: Remove unused variable in example (GH-7927) 2018-06-28 15:25:20 +09:00
Ned Deily aee5df5e16 Forward port 3.7.0 final changes 2018-06-27 18:45:50 -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
Behzad B. Mokhtari df748c20da use rich markup for PEP reference (GH-7939)
it's better to refer to PEP with `pep` role in reStructuredText. It also links to the PEP page.
2018-06-26 20:57:39 -07:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 866c168a5f bpo-33957: Doc: Use better wording (GH-7912) 2018-06-26 17:27:05 +09: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
Andrés Delfino 38cf49bf69 bpo-33887: Add TOC to Design and History FAQ(GH-7766) 2018-06-23 11:27:16 -07:00
Andrés Delfino c9d43c702a bpo-33877: Remove UNIX qualification for running complete programs (GH-7744)
The statement is true for Windows (and macOS) also.
2018-06-22 17:31:03 -04:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 940ae60856 Clarified the tempfile.tempdir documentation (GH-7829) 2018-06-21 03:52:43 -04:00
Nick Coghlan 16eb3bcdb2
bpo-33499: PYTHONPYCACHEPREFIX What's New entry (GH-7749)
Initial What's New in Python 3.8 entry for `PYTHONPYCACHEPREFIX`.
2018-06-20 21:25:01 +10: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 6868003514 bpo-33571: Improve the glossary description for '...' prompt (GH-6971)
Mention that it can be triggered by triple quotes and after specifying decorators.
2018-06-15 20:46:38 -07:00
Noah Haasis 2707e41a5c bpo-33836: Recommend keyword-only param for memoization in FAQ (GH-7687)
Update the the signature in the code example to make `_cache` a keyword-only parameter.
2018-06-15 20:29:11 -07:00
Andrés Delfino 7469ff5017 Use singular, we are talking about the access (GH-7727) 2018-06-15 19:42:09 -07: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
Andrés Delfino 695118600f bpo-33847: Add '@' operator entry to index (GH-7669) 2018-06-15 15:23:00 -04:00
Andrés Delfino 4fddd4e406 bpo-33852: Remove misplaced parentheses around 'list'. (GH-7672)
'expresson list' refers to the grammar term 'expression_list' in the subscription production.
2018-06-15 14:24:25 -04:00
Serhiy Storchaka ceeef10cdb
bpo-33818: PyExceptionClass_Name() will now return "const char *". (GH-7581) 2018-06-15 11:09:43 +03:00
Eric Snow 9e7c92193c
bpo-17045: Improve C-API doc for PyTypeObject. (gh-7413)
The existing doc had a number of info gaps and was a little hard to use.  This patch provides several quick-reference tables as well as examples.
2018-06-14 15:46:35 -06: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
Ned Deily 5a98209180
Fix nested list in 3.7 What's New (GH-7659) 2018-06-12 04:51:38 -04:00
Ned Deily 04290cb994
bpo-25612: Add minimal What's New in 3.7 entry (GH-7656) 2018-06-11 23:20:34 -04: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
Terry Jan Reedy 8a05f559ce
bpo-33656: Add entry to What's New 3.7. (GH-7638)
This is a separate PR because this does not backport to 3.6.
2018-06-11 14:15:37 -04:00
Terry Jan Reedy 800415e3df
bpo-33656: On Windows, add API call saying that tk scales for DPI (GH-7137)
On Windows 8.1+ or 10, with DPI compatibility properties of the Python binary
unchanged, and a monitor resolution greater than 96 DPI, this should
make text and lines sharper. It should otherwise have no effect.

Using a magnifier, I determined that the improvement comes from horizontal and
lines being better lined up with the monitor pixels. I checked that this call causes
no problem on any Windows buildbot, including the Win7 buildbots. Unlike most
IDLE patches, this one can be easily reverted by users by removing a few lines,
at the top of idlelib/pyshell.py.
2018-06-11 14:14:32 -04:00
Andrés Delfino 0e5f901508 bpo-33831: Make htmlview run again (GH-7628) 2018-06-11 09:58:18 -07: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
Ned Deily 9d6171ded5
bpo-23404: Update/sync What's New files for 3.6/3.5/2.7 (GH-7620) 2018-06-11 04:09:34 -04:00
Ned Deily 12c6cdf4d1
bpo-33745: Add What's New for empty function docstring change. (GH-7611) 2018-06-10 22:41:09 -04:00
Ned Deily ef057bfb06
bpo-33109: Remove now-obsolete What's New entry for bpo-26510. (GH-7609) 2018-06-10 22:17:56 -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
Terry Jan Reedy 820c53ac61
bpo-33820: Fix IDLE What's New typo (#7594) 2018-06-10 14:57:38 -04:00
Terry Jan Reedy 222f7f4033
bpo-33821: Update idlelib subsection of What's New 3.7 (#7590) 2018-06-10 14:15:04 -04:00
Terry Jan Reedy e226eb7157
bpo-33820: Update idlelib subsection of What's New 3.6 (GH-7589) 2018-06-10 14:03:40 -04:00
Andrés Delfino d689f97619 Remove hyphens from phrase "picks up where it left off" (GH-7410) 2018-06-09 18:43:45 -07:00
Andrés Delfino 0e0534c402 Fix typo in object.__getnewargs__() documentation (GH-7554) 2018-06-10 03:41:09 +03:00
Ammar Askar 0aa17ee6a7 bpo-33766: Document that end of file or string is a newline (GH-7383) 2018-06-09 19:49:39 -04: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
Nick Coghlan 1bcb8a6368
bpo-33409: Clarify PEP 538/540 relationship (GH-7534)
While locale coercion and UTF-8 mode turned out to
be complementary ideas rather than competing ones,
it isn't immediately obvious why it's useful to
have both, or how they interact at runtime.

This updates both the Python 3.7 What's New doc
and the PYTHONCOERCECLOCALE and PYTHONUTF8
documentation in an attempt to clarify that
relationship:

- in the respective What's New sections, add a closing paragraph
  explaining which problem each one solves, and pointing to the
  other PEP's section for the specific aspects it relies on the other
  PEP to solve
- use "locale-aware mode" as a more descriptive term for the
  default non-UTF-8 mode
- improve wording conistenccy between the PYTHONCOERCECLOCALE
  and PYTHONUTF8 docs when they cover the same thing (mostly
  related to legacy locale detection and setting the standard
  stream error handler)
- improve the description of the locale coercion trigger conditions
  (including pointing out that setting LC_ALL turns off locale coercion)
- port the full description of the UTF-8 mode behaviour changes
  from PEP 540 into the PYTHONUTF8 documentation
- be explicit that PYTHONIOENCODING still overrides the settings
  for the standard streams
- mention concrete examples of things that do and don't get their
  text encoding assumptions adjusted by the two text encoding
  assumption override techniques
2018-06-09 16:54:08 +10: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
Andrés Delfino 396ecb9c3e bpo-33799: Remove non-ordered dicts comments from FAQ 2018-06-08 15:38:07 +09:00
Dong-hee Na 4aa3006619 bpo-33197: Add description property for _ParameterKind. (GH-7206) 2018-06-07 23:46:31 -04:00
Yury Selivanov 8f4042964d
bpo-33792: Add selector and proactor windows policies (GH-7487) 2018-06-07 20:44:57 -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
Benjamin Peterson 34b734699b
update 3.7 whatsnew entry about Unicode version (GH-7480)
Followup to 4705ea38c9 and bpo-33778.
2018-06-07 07:21:28 -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
Zach Mitchell 00818c8ffd Fix typo in datamodel.rst (GH-6964)
This is a simple grammatical fix correcting "...object whose `__self__` attributes is ..." to "...object whose `__self__` attribute is ...".
2018-06-02 07:29:47 -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
Dmitry Shachnev 495e567a2b 3.6 what's new: fix a reference to PEP 528 (#7113) 2018-05-30 18:52:43 -04:00
Andrés Delfino 05f1c8902c bpo-33696: Install python-docs-theme even if SPHINXBUILD is defined (GH-7242) 2018-05-30 09:08:25 -07: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
Julien Palard a34e424bdb
Fix whatsnew entry about ThreadedHTTPServer. (GH-7220) 2018-05-30 00:44:12 +02: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