Commit Graph

18153 Commits

Author SHA1 Message Date
Larry Hastings c72056a1ae Merge release engineering changes with 3.5 branch head. 2015-05-31 21:43:57 -07:00
Yury Selivanov 4640b300e3 Issue 24180: Mention sys.(get|set)_coroutine_wrapper in whatsnew 2015-05-31 17:21:38 -04:00
Yury Selivanov d4cbbebe2d Issue 24180: Document sys.(set|get)_coroutine_wrapper 2015-05-31 17:13:08 -04:00
Tal Einat f67b0a36c5 minor fix of module order in whatsnew/3.5 2015-05-31 22:18:31 +03:00
Tal Einat d5519ed7f4 Issue #19543: Implementation of isclose as per PEP 485
For details, see:
PEP 0485 -- A Function for testing approximate equality

Functions added: math.isclose() and cmath.isclose().

Original code by Chris Barker. Patch by Tal Einat.
2015-05-31 22:05:00 +03:00
Serhiy Storchaka d4ea03c785 Issue #24284: The startswith and endswith methods of the str class no longer
return True when finding the empty string and the indexes are completely out
of range.
2015-05-31 09:15:51 +03:00
Benjamin Peterson 3d4a457663 improve section title 2015-05-31 00:22:42 -05:00
Larry Hastings e8ff0caa72 Regenerated pydoc topic index in preparation for Python 3.5.0b2. 2015-05-30 16:58:27 -07:00
Yury Selivanov 582b8c7629 Issue 22357: Merge from 3.4 2015-05-30 13:54:36 -04:00
Yury Selivanov 0339568753 Issue 22357: Document __qualname__ in inspect.rst 2015-05-30 13:53:49 -04:00
Yury Selivanov 7aa5341164 Reverting my previous commit.
Something went horribly wrong when I was doing `hg rebase`.
2015-05-30 10:57:56 -04:00
Yury Selivanov 802d45b660 Merge 3.5 2015-05-30 10:49:27 -04:00
Yury Selivanov 5844436adf docs/whatsnew: Mention OrderedDict C implementation 2015-05-30 10:49:09 -04:00
Yury Selivanov a24fcfdf23 Issue 24315: Make collections.abc.Coroutine derived from Awaitable
(Merge 3.5)
2015-05-29 09:01:47 -04:00
Yury Selivanov 56fc614025 Issue 24315: Make collections.abc.Coroutine derived from Awaitable 2015-05-29 09:01:29 -04:00
Yury Selivanov 7a219110e6 docs/whatsnew/3.6: Mention that 'async' and 'await' will be keywords in 3.7 2015-05-28 17:10:29 -04:00
Yury Selivanov 153192be43 Merge 3.5 2015-05-28 17:09:38 -04:00
Yury Selivanov 8fa6d4f753 docs/whatsnew: Mention that 'async' and 'await' will be keywords in 3.7 2015-05-28 17:09:14 -04:00
Benjamin Peterson 0938d98bcc merge 3.5 2015-05-28 14:40:15 -05:00
Benjamin Peterson 264be6f48f remove STORE_MAP, since it's unused 2015-05-28 14:40:08 -05:00
Yury Selivanov ac0bffb962 Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc. 2015-05-28 11:22:41 -04:00
Yury Selivanov 6ef059097c Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc. 2015-05-28 11:21:31 -04:00
Ned Deily ffb40e5ec3 More version bumping to 3.6.
With the creation of the 3.5 branch earlier in the process,
it is necessary to do some of the version bumps now rather than at
final release time (for example, the equivalent of the 3.4->3.5 bumps
in f2bf12fa22c1).  (Some of those changes have already been made, for
example in 30f5e7ec6afe.)
2015-05-27 22:00:46 -07:00
Yury Selivanov d1da507774 Add whatsnew for 3.6 2015-05-27 22:09:10 -04:00
Benjamin Peterson d663cc4848 merge 3.4 2015-05-27 18:32:41 -05:00
Benjamin Peterson 68fe9aa58c update for 3.6 emerging 2015-05-27 18:32:25 -05:00
Ned Deily 6f05a20507 Issue 24304: Fix broken license link in FAQ. 2015-05-27 15:37:32 -07:00
Ned Deily 72c24002b3 Issue 24304: Fix broken license link in FAQ. 2015-05-27 15:37:00 -07:00
Benjamin Peterson e328323cf7 rephrase 2015-05-26 21:40:28 -05:00
Serhiy Storchaka e6efbdc947 Remove UTF-8 BOMs. 2015-05-25 12:29:53 +03:00
Serhiy Storchaka 410d77f230 Remove UTF-8 BOMs. 2015-05-25 12:27:39 +03:00
Larry Hastings 40040dfc4b Update SOURCE_URI to reflect that we're branching 3.5 now. 2015-05-23 17:41:13 -07:00
Larry Hastings 0482af4269 Updated topics (and susp-ignored) for Python 3.5.0b1. 2015-05-23 17:39:42 -07:00
Guido van Rossum 7ca13532f3 Fix bad indent in whatsnew/3.5.rst. 2015-05-23 15:27:51 -07:00
Terry Jan Reedy 44825cf71f Add pointer to IDLE what's new file. 2015-05-23 18:19:42 -04:00
Terry Jan Reedy e9cd1d3c69 Merge with 3.4 2015-05-23 18:15:41 -04:00
Terry Jan Reedy a6f6a68368 whitespace 2015-05-23 18:15:18 -04:00
Terry Jan Reedy ca1ad9423b Merge with 3.4 2015-05-23 18:13:31 -04:00
Terry Jan Reedy 571164f96f Add pointer to IDLE what's new file. 2015-05-23 18:13:14 -04:00
Berker Peksag 1a90b17bce Fix Sphinx warnings. 2015-05-24 00:26:05 +03:00
Terry Jan Reedy c7792160dd Merge with 3.4 2015-05-23 16:16:46 -04:00
Terry Jan Reedy 43cba219d5 Make expression legal python by adding '1'. 2015-05-23 16:16:28 -04:00
Raymond Hettinger 19cfb57f5f Issue #24204: Elaborate of the str.strip() documentation. 2015-05-23 09:11:55 -07:00
Raymond Hettinger 855482e74c Issue #24269: Minor doc fixups. 2015-05-23 08:57:58 -07:00
Nick Coghlan d5cacbb1d9 PEP 489: Multi-phase extension module initialization
Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.
2015-05-23 22:24:10 +10:00
Raymond Hettinger ec219ba1c0 Issue #23086: Add start and stop arguments to the Sequence.index() mixin method. 2015-05-22 19:29:22 -07:00
Raymond Hettinger ab89f9c27f merge 2015-05-22 16:38:16 -07:00
Raymond Hettinger 9ecf9e2944 Issue #24219: Remove duplicate literal in docs. 2015-05-22 16:37:49 -07:00
Gregory P. Smith ad577b938b Issue 24230: The tempfile module now accepts bytes for prefix, suffix and dir
parameters and returns bytes in such situations (matching the os module APIs).
2015-05-22 16:18:14 -07:00
Steve Dower 4a7fe7e397 Issue #23955: Add pyvenv.cfg option to suppress registry/environment lookup for generating sys.path.
Also cleans up and secures getpathp.c
2015-05-22 15:10:10 -07:00
Yury Selivanov 945fff44c4 Issue 20438: Add a note about deprecating old inspect APIs to whatsnew.
Also, deprecate formatargspec, formatargvalues, and getargvalues
functions.  Since we are deprecating 'getfullargspec' function in
3.5 (documentation only, no DeprecationWarning), it makes sense
to also deprecate functions designed to be directly used with it.

In 3.6 we will remove 'getargsspec' function (was deprecated since
Python 3.0), and start raising DeprecationWarnings in other
'getarg*' family of functions.  We can remove them in 3.7 or later.

Also, it is worth noting, that Signature API does not provide 100%
of functionality that deprecated APIs have.  It is important to do
a soft deprecation of outdated APIs in 3.5 to gather users feedback,
and improve Signature object.
2015-05-22 16:28:05 -04:00
Guido van Rossum 46dbb7d103 Preliminary typing.py, anticipating provisional acceptance of PEP 484.
There area bunch of TODOs here, but the biggest (not mentioned in the
file) is that I'm going to take out __instancecheck__ and
__subclasscheck__.  However my personal schedule is such that I
probably won't have time for these before Larry tags beta 1.  But I
will try -- this commit is mostly to make sure that typing.py doesn't
completely miss the train.

PS. I'm tracking issues at https://github.com/ambv/typehinting/issues.
2015-05-22 10:14:11 -07:00
Zachary Ware 569db2c9f6 Fix extraneous BOM in whatsnew.
That's what I get for using Notepad to make a quick edit...
2015-05-22 11:42:20 -05:00
Zachary Ware 7dc9dea778 Issue #20035: Reimplement tkinter._fix module as a C function.
The new private C function makes no permanent changes to the environment
and is #ifdef'd out on non-Windows platforms.
2015-05-22 11:36:53 -05:00
Yury Selivanov 3cfec2e2fc Issue 20438: Deprecate inspect.getargspec() and friends. 2015-05-22 11:38:38 -04:00
Yury Selivanov 8d006e75e0 docs: Mention PEP 479 in whatsnew.
Issue 22906.
2015-05-22 11:30:45 -04:00
Yury Selivanov a18cad543f Issue 24180: Fixes by Berker Peksag. 2015-05-21 17:02:31 -04:00
Yury Selivanov f3e40fac10 Issue 24180: Documentation for PEP 492 changes. 2015-05-21 11:50:30 -04:00
Benjamin Peterson b1cc37cfb5 improve wording 2015-05-20 22:09:43 -05:00
Yury Selivanov 57c74fca02 Issue 24248: Deprecate inspect.Signature.from_function and .from_builtin 2015-05-20 23:07:02 -04:00
Yury Selivanov bcd4fc161a Issue 20691: Add follow_wrapped arg to inspect.signature/from_callable. 2015-05-20 14:30:08 -04:00
R David Murray e09b42c914 #19662: fix typo 2015-05-19 07:18:39 -04:00
Berker Peksag fee05daef8 Issue #24232: Fix typos. Patch by Ville Skyttä. 2015-05-19 01:38:05 +03:00
Berker Peksag 315e104d11 Issue #24232: Fix typos. Patch by Ville Skyttä. 2015-05-19 01:36:55 +03:00
Berker Peksag 5f120fcecb Issue #24233: Add a proper link to socket.getfqdn() documentation.
Patch by Ville Skyttä.
2015-05-19 01:31:24 +03:00
Berker Peksag 2a8baed833 Issue #24233: Add a proper link to socket.getfqdn() documentation.
Patch by Ville Skyttä.
2015-05-19 01:31:00 +03:00
R David Murray c17686f071 Issue #13866: add *quote_via* argument to urlencode.
Patch by samwyse, completed by Arnon Yaari, and reviewed by
Martin Panter.
2015-05-17 20:44:50 -04:00
R David Murray 1dbee9460e #24211: Add missing docs for SMTPUTF8 policy instance. 2015-05-17 19:36:16 -04:00
R David Murray 8308444eef #24218: Add SMTPUTF8 support to send_message.
Reviewed by Maciej Szulik.
2015-05-17 19:27:22 -04:00
Terry Jan Reedy 6883faf49b Merge with 3.4 2015-05-17 14:50:06 -04:00
Terry Jan Reedy d986563a06 Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
doc.  Remove obsolete example from FAQ.  Patch by Martin Panter.
2015-05-17 14:49:26 -04:00
R David Murray fdb23c2fe5 #20098: add mangle_from_ policy option.
This defaults to True in the compat32 policy for backward compatibility,
but to False for all new policies.

Patch by Milan Oberkirch, with a few tweaks.
2015-05-17 14:24:33 -04:00
R David Murray 224ef3ec3b #24211: Add RFC6532 support to the email library.
This could use more edge case tests, but the basic functionality is tested.
(Note that this changeset does not add tailored support for the RFC 6532
message/global MIME type, but the email package generic facilities will handle
it.)

Reviewed by Maciej Szulik.
2015-05-17 11:29:21 -04:00
R David Murray c1ecef78a3 Merge: #24216: fix typo 2015-05-17 10:17:35 -04:00
R David Murray 0e8168c9e5 #24216: fix typo 2015-05-17 10:16:37 -04:00
Berker Peksag 5b3df5b600 Add versionadded directive for BoundArguments.apply_defaults(). 2015-05-16 23:29:31 +03:00
R David Murray b744f3a45e #21083: add get_content_disposition method to email.message.
Patch by Abhilash Raj.
2015-05-16 15:41:07 -04:00
Serhiy Storchaka b9cec6a30f Issue #16314: Added support for the LZMA compression in distutils. 2015-05-16 22:13:27 +03:00
R David Murray b8cd3e4e30 #21804: Add RFC 6856 (UTF8) support to poplib.
Patch by Milan Oberkirch.
2015-05-16 15:05:53 -04:00
R David Murray 3113765883 #19662: Make requirement to support arbitrary keywords explicit.
When not using decode_data=True, smtpd may provide keyword arguments to the
process_message user-implemented method.  This doc update is intended to make
it clear that arbitrary keywords must be supported, so that we can add
additional features in the future by just adding keywords to the
process_message call.
2015-05-16 14:16:33 -04:00
R David Murray cee7cf6026 #22027: Add RFC6531 support to smtplib.
Initial patch by Milan Oberkirch.
2015-05-16 13:58:14 -04:00
Yury Selivanov b907a513c8 Issue 24190: Add inspect.BoundArguments.apply_defaults() method. 2015-05-16 13:45:09 -04:00
Tal Einat c7027b7904 Issue #20182: converted the signal module to use Argument Clinic 2015-05-16 14:14:49 +03:00
Tal Einat 97fceee3b9 Argument Clinic: added missing bit of info in howto 2015-05-16 14:12:15 +03:00
Raymond Hettinger 29655df11d Issue #24064: Docuement that oroperty docstrings are now writeable. 2015-05-15 16:17:05 -07:00
Victor Stinner 51b58325f9 Closes #24013: Improve os.scandir() and DirEntry documentation
Patch written by Ben Hoyt.
2015-05-15 09:12:58 +02:00
Victor Stinner 56f6526085 os module doc: remove availability when useless
Remove "Availability: Unix, Windows." from os module documentation for
functions available on all platforms.
2015-05-15 09:11:59 +02:00
Yury Selivanov dee32bd256 Issue 24191: Document BoundArguments.signature 2015-05-14 14:14:18 -04:00
Yury Selivanov 82796193f9 Issue 24191: Document BoundArguments.signature 2015-05-14 14:14:02 -04:00
R David Murray 7d0d6ee525 Merge: Make sentence correct English. 2015-05-14 08:51:09 -04:00
R David Murray 2249d9f7d6 Make sentence correct English. 2015-05-14 08:50:38 -04:00
R David Murray 812bc1b86b Merge: #23088: Clarify null termination of bytes and strings in C API. 2015-05-13 20:32:19 -04:00
R David Murray 0a560a11af #23088: Clarify null termination of bytes and strings in C API.
Patch by Martin Panter, reviewed by Serhiy Storchaka and R. David Murray.
2015-05-13 20:31:53 -04:00
Raymond Hettinger b01a1fdb94 merge 2015-05-13 14:39:35 -07:00
Raymond Hettinger 3afdb2870f Fix mangled wording 2015-05-13 14:39:04 -07:00
Benjamin Peterson 14ef1a12c7 remove extra space 2015-05-13 11:19:27 -04:00
Benjamin Peterson 5562c90377 remove % from title, since it makes latex barf 2015-05-13 11:19:06 -04:00
Raymond Hettinger 46cf02d25a merge 2015-05-13 02:48:21 -07:00
Raymond Hettinger a3780259e4 Issue #19934: Document *None* as an acceptable input to Counter.most_common([n]) 2015-05-13 02:47:57 -07:00
Raymond Hettinger 0907a45eb1 Issue #23695: Explain the zip() example for clustering a data series into n-length groups. 2015-05-13 02:34:38 -07:00
Berker Peksag 2f3742b0d8 Issue #1322: platform.dist() and platform.linux_distribution() functions are now deprecated.
Initial patch by Vajrasky Kok.
2015-05-13 12:32:20 +03:00
Berker Peksag de7cafaa63 Issue #24064: Add __doc__ to the example in collections.rst. 2015-05-13 12:16:27 +03:00
Raymond Hettinger eac503aeac Issue #24064: Property() docstrings are now writeable.
(Patch by Berker Peksag.)
2015-05-13 01:09:59 -07:00
Benjamin Peterson 276e9c841d merge 3.4 2015-05-12 19:16:20 -04:00
Benjamin Peterson 19a3f17cb3 use imperative 2015-05-12 19:15:53 -04:00
Benjamin Peterson e960d18bb2 versionadded 2015-05-12 17:24:17 -04:00
Serhiy Storchaka 48e47aaa28 Issue #22486: Added the math.gcd() function. The fractions.gcd() function now is
deprecated.  Based on patch by Mark Dickinson.
2015-05-13 00:19:51 +03:00
Serhiy Storchaka f0eeedf0d8 Issue #22681: Added support for the koi8_t encoding. 2015-05-12 23:24:19 +03:00
Serhiy Storchaka ad8a1c3fb2 Issue #22682: Added support for the kz1048 encoding. 2015-05-12 23:16:55 +03:00
Serhiy Storchaka 0d4df752ac Issue #15027: The UTF-32 encoder is now 3x to 7x faster. 2015-05-12 23:12:45 +03:00
Berker Peksag 688cd4e6cb Issue #23983: Update the pty module example.
Changes:

* Fixed a ResourceWarning warning
* Used argparse instead of getopt
2015-05-12 17:25:41 +03:00
Berker Peksag c2dd680115 Issue #23983: Update the pty module example.
Changes:

* Fixed a ResourceWarning warning
* Used argparse instead of getopt
2015-05-12 17:25:06 +03:00
Yury Selivanov 5096088c07 doc: Briefly mention C API changes in whatsnew. 2015-05-12 00:15:05 -04:00
Yury Selivanov b5d6a9d470 Mention PEP 492 in whatsnew. 2015-05-12 00:09:05 -04:00
Yury Selivanov 7544508f02 PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
Yury Selivanov 21ee10bf04 Merge 3.4 (asyncio docs) 2015-05-11 16:34:13 -04:00
Yury Selivanov d7e19bb566 docs/asyncio: Document new ensure_future() and deprecated async() 2015-05-11 16:33:41 -04:00
Yury Selivanov 7185461897 docs/asyncio: Document set_task_factory/get_task_factory 2015-05-11 16:28:27 -04:00
R David Murray a33df31629 #21795: advertise 8BITMIME if decode_data is False.
Patch by Milan Oberkirch, with a few updates.  This changeset also
tweaks the smtpd and whatsnew docs for smtpd into what should be
the final form for the 3.5 release.
2015-05-11 12:11:40 -04:00
R David Murray a6429db4b8 #21800: Add RFC 6855 support to imaplib.
Original patch by Milan Oberkirch, updated by myself and
Maciej Szulik.
2015-05-10 19:17:23 -04:00
Yury Selivanov 8170e8c0d1 PEP 479: Change StopIteration handling inside generators.
Closes issue #22906.
2015-05-09 11:44:30 -04:00
Raymond Hettinger bd60e8dece Issue #24018: Add a collections.Generator abstract base class. 2015-05-09 01:07:23 -04:00
Andrew Svetlov 0048835e49 Merge 3.4 2015-05-08 14:15:11 +03:00
Andrew Svetlov b79e01248d Fix doc: asyncio.Semaphore.release() actually is a regular function, not coroutine 2015-05-08 14:13:41 +03:00
Larry Hastings 38337d1e15 Issue #24000: Improved Argument Clinic's mapping of converters to legacy
"format units".  Updated the documentation to match.
2015-05-07 23:30:09 -07:00
Benjamin Peterson ec9b7728fe merge 3.4 2015-05-06 21:31:07 -04:00
Benjamin Peterson ad643b59ce remove word we don't need 2015-05-06 21:29:14 -04:00
Zachary Ware 828946e561 Fix copy/paste errors.
Basically, s/thread/coroutine/.
2015-05-06 20:19:06 -05:00
Guido van Rossum 19dac071ef Issue 24088: Clarify semantics of yield expression (merge from 3.4). 2015-05-05 12:04:35 -07:00
Guido van Rossum d0150ad59e Issue 24088: Clarify semantics of yield expression. 2015-05-05 12:02:01 -07:00
Steve Dower 1d4880db3d Enables shortcuts to be deselected when installing on Windows. 2015-05-03 14:54:32 -07:00
Benjamin Peterson b174b85c1a merge 3.4 (#24118) 2015-05-03 13:00:37 -04:00
Benjamin Peterson ac87ed7e9f update example, since python.org is HTTPS-only now (closes #24118) 2015-05-03 12:59:09 -04:00
Serhiy Storchaka 24559e4834 Issue #22619: Added negative limit support in the traceback module.
Based on patch by Dmitry Kazakov.
2015-05-03 13:19:46 +03:00
Steve Dower 9a578d9ee6 Updates documentation for installing Python on Windows. 2015-05-02 22:28:58 -07:00
R David Murray 3b85377ab5 Merge: #24108: Update fnmatch.translate example to show correct output. 2015-05-02 15:08:50 -04:00
R David Murray 4590c3d944 #24108: Update fnmatch.translate example to show correct output.
Patch by Merlijn van Deen.
2015-05-02 15:08:22 -04:00
R David Murray deed215313 Merge: #24081: Remove obsolete caveat from import docs. 2015-05-02 14:58:32 -04:00
R David Murray 6d877ef026 #24081: Remove obsolete caveat from import docs.
Per Eric Snow's research, this changed in Python 2.4 in changeset 331e60d8ce,
but these docs were not updated.

Patch by Peter Viktorin.
2015-05-02 14:57:54 -04:00
Serhiy Storchaka d894027ec1 Fixed a typo. 2015-05-02 19:25:02 +03:00
Serhiy Storchaka a7db0576ac Fixed a typo. 2015-05-02 19:24:41 +03:00
Vinay Sajip 3b4d30a27b Closes #24060: Merged documentation update from 3.4. 2015-05-02 09:47:28 +01:00
Vinay Sajip bbd95a9361 Issue #24060: Made logging.Formatter documentation a little clearer. 2015-05-02 09:46:05 +01:00
Benjamin Peterson a567e564ec remove deleted method 2015-04-28 00:04:53 -04:00
Berker Peksag 0f51d04b47 Issue #24062: Fix os.stat links. Patch by July Tikhonov. 2015-04-27 13:53:54 +03:00
Berker Peksag 2034caa0c4 Issue #24062: Fix os.stat links. Patch by July Tikhonov. 2015-04-27 13:53:28 +03:00
Berker Peksag a7edf1e57c Issue #23356: Simplify convert_arg_line_to_args example.
Patch by py.user.
2015-04-26 12:10:27 +03:00
Berker Peksag 8c99a6d604 Issue #23356: Simplify convert_arg_line_to_args example.
Patch by py.user.
2015-04-26 12:09:54 +03:00
Gregory P. Smith 8cb6569fe1 Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview.
Also updates a few internal implementations of the same thing to use the
new built-in code.

Contributed by Arnon Yaari.
2015-04-25 23:22:26 +00:00
Benjamin Peterson 644adc6ada merge 3.4 (#24057) 2015-04-25 14:16:25 -04:00
Benjamin Peterson d87dd434c0 fix relative link (closes #24057) 2015-04-25 14:15:16 -04:00
Benjamin Peterson 51f58059f6 merge 3.4 (#24049) 2015-04-24 12:02:53 -04:00
Benjamin Peterson 9bdd61338d remove dead *-import checking code (closes #24049) 2015-04-24 12:02:29 -04:00
Barry Warsaw b5a3d9bebb Issue #24029: Document the name binding behavior for submodule imports. 2015-04-22 18:38:26 -04:00
Barry Warsaw 2097f53ec3 Issue #24029: Document the name binding behavior for submodule imports. 2015-04-22 18:29:16 -04:00
Berker Peksag d86ef05a02 Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor doesn't exist.
Patch by Claudiu Popa.
2015-04-22 09:39:19 +03:00
Andrew Kuchling c3a7f18100 Merge from 3.4 2015-04-21 19:44:54 -04:00
Andrew Kuchling 333518e01d #15183: clarify timeit documentation to say that setup statement isn't timed 2015-04-21 19:43:33 -04:00
Greg Ward 4d9d2563f5 #17445: difflib: add diff_bytes(), to compare bytes rather than str
Some applications (e.g. traditional Unix diff, version control
systems) neither know nor care about the encodings of the files they
are comparing. They are textual, but to the diff utility they are just
bytes. This worked fine under Python 2, because all of the hardcoded
strings in difflib.py are ASCII, so could safely be combined with
old-style u'' strings. But it stopped working in 3.x.

The solution is to use surrogate escapes for a lossless
bytes->str->bytes roundtrip. That means {unified,context}_diff() can
continue to just handle strings without worrying about bytes. Callers
who have to deal with bytes will need to change to using diff_bytes().

Use case: Mercurial's test runner uses difflib to compare current hg
output with known good output. But Mercurial's output is just bytes,
since it can contain:
  * file contents (arbitrary unknown encoding)
  * filenames (arbitrary unknown encoding)
  * usernames and commit messages (usually UTF-8, but not guaranteed
    because old versions of Mercurial did not enforce it)
  * user messages (locale encoding)

Since the output of any given hg command can include text in multiple
encodings, it is hopeless to try to treat it as decodable Unicode
text. It's just bytes, all the way down.

This is an elaboration of a patch by Terry Reedy.
2015-04-20 20:21:21 -04:00
Benjamin Peterson d19458ac51 merge 3.4 (#23989) 2015-04-20 18:22:21 -04:00
Benjamin Peterson 6de708fd46 recommend requests library (closes #23989)
Patch from Van Lindberg
2015-04-20 18:18:14 -04:00
Benjamin Peterson cdbe29902e fix grammar 2015-04-19 23:14:37 -04:00
Larry Hastings 770ce204ee Regenerated pydoc-topics and fixed bad/suspicious doc markup for Python 3.5.0a4. 2015-04-19 13:50:12 -07:00
Berker Peksag 662738980a Mark TarInfo.frombuf() and TarInfo.fromtarfile() as classmethods. 2015-04-19 04:38:01 +03:00
Berker Peksag 37de910b52 Mark TarInfo.frombuf() and TarInfo.fromtarfile() as classmethods. 2015-04-19 04:37:35 +03:00
Berker Peksag 0002d3ccf6 Issue #15566: Document encoding and errors parameters of TarInfo.frombuf().
Patch by Andy Holst.
2015-04-19 04:32:52 +03:00
Berker Peksag e4dde50c78 Issue #15566: Document encoding and errors parameters of TarInfo.frombuf().
Patch by Andy Holst.
2015-04-19 04:32:23 +03:00
Vinay Sajip 1a16a8340a Closes #23536: Clarified scope of fileConfig()'s API. 2015-04-18 13:15:10 +01:00
Vinay Sajip 2d965c2555 Issue #23536: Clarified scope of fileConfig()'s API. 2015-04-18 13:14:10 +01:00
Berker Peksag 6d7dced188 Fix two typos in AbstractBasicAuthHandler documentation. 2015-04-17 04:58:45 +03:00
R David Murray 2e6ad4267c #16914: reflow paragraph and add missing versionchanged. 2015-04-16 17:24:52 -04:00
R David Murray 0c49b896e6 #16914: add timestamps to smtplib debugging output via new debuglevel 2.
Patch by Gavin Chappell and Maciej Szulik.
2015-04-16 17:14:42 -04:00
R David Murray 4c7f995e80 #7159: generalize urllib prior auth support.
This fix is a superset of the functionality introduced by the issue #19494
enhancement, and supersedes that fix.  Instead of a new handler, we have a new
password manager that tracks whether we should send the auth for a given uri.
This allows us to say "always send", satisfying #19494, or track that we've
succeeded in auth and send the creds right away on every *subsequent* request.
The support for using the password manager is added to AbstractBasicAuth,
which means the proxy handler also now can handle prior auth if passed
the new password manager.

Patch by Akshit Khurana, docs mostly by me.
2015-04-16 16:36:18 -04:00
R David Murray 2b78129b3a #18128: use standard +NNNN timezone format in POT-Creation-Date header.
Patch by Michael McFadden, with a few small style tweaks.
2015-04-16 12:15:09 -04:00
Steve Dower d2bc389e55 Issue #4254: Adds _curses.update_lines_cols() Patch by Arnon Yaari 2015-04-15 18:06:05 -04:00
Steve Dower cb39d1f466 Issue 19933: Provide default argument for ndigits in round. Patch by Vajrasky Kok. 2015-04-15 16:10:59 -04:00
Eric V. Smith 7a80389ce5 Issue 23193: Add numeric_owner to tarfile.TarFile.extract() and tarfile.TarFile.extractall(). 2015-04-15 10:27:58 -04:00
Benjamin Peterson ef9ffcbcd4 properly wrap 2015-04-14 22:12:14 -04:00
Gregory P. Smith 6e73000723 Add a subprocess.run() function than returns a CalledProcess instance for a
more consistent API than the existing call* functions.
(enhancement from issue 23342)
2015-04-14 16:14:25 -07:00
Gregory P. Smith 7c63fd3df5 issue9859: add the missing versionadded tag to the documentation. 2015-04-14 15:25:01 -07:00
R David Murray f3cae79883 Merge: #23957: fix typo. 2015-04-14 16:42:49 -04:00
R David Murray 5be7f1513d #23957: fix typo. 2015-04-14 16:42:08 -04:00
Gregory P. Smith 4e72cceb62 issue9859: Document test.support.detect_api_mismatch() and simplify its test. 2015-04-14 13:26:06 -07:00
Gregory P. Smith a8b120641b issue9014: Include more formatting on :c:type:`PyObject` etc. 2015-04-14 11:21:26 -07:00
Gregory P. Smith 0f2f3bc9db issue9014: Include more formatting on :c:type:`PyObject` etc. 2015-04-14 11:21:05 -07:00
Gregory P. Smith b8dde4f5c3 issue9014: Properly document PyObject_HEAD and friends post-PEP-3123. 2015-04-14 11:13:14 -07:00
Gregory P. Smith 1b24465c93 issue9014: Properly document PyObject_HEAD and friends post-PEP-3123. 2015-04-14 11:12:53 -07:00
Gregory P. Smith 2f86a03405 remove trailing space 2015-04-14 10:05:02 -07:00
Gregory P. Smith 23a6a0daa1 remove trailing space :) 2015-04-14 10:04:30 -07:00
Gregory P. Smith 6eda1be83c issue22046: mention that zipfile can raise NotImplementedError on unsupported
compression algorithms.
2015-04-14 10:02:49 -07:00
Gregory P. Smith f2a448a66b issue22046: mention that zipfile can raise NotImplementedError on unsupported
compression algorithms.
2015-04-14 10:02:20 -07:00
Andrew Kuchling f887a6180a #21146: give a more efficient recipe in gzip docs 2015-04-14 11:44:40 -04:00
Berker Peksag dfa4e045a3 Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2015-04-14 09:35:51 +03:00
Berker Peksag 4882cacab6 Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2015-04-14 09:30:01 +03:00
Larry Hastings a6cc551502 Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES.
Patch courtesy of Joe Jevnik.
2015-04-13 17:48:40 -04:00
Zachary Ware d827be8ff1 Closes #23730: merge with 3.4 2015-04-13 16:44:05 -05:00
Zachary Ware ae9f0fede3 Issue #23730: Document the return value of ZipFile.extract
Patch by Stéphane Wirtel.
2015-04-13 16:40:49 -05:00
Zachary Ware 38019d1c34 Closes #23938: List Windows XP as an unsupported platform.
Patch by Alex Walters.
2015-04-13 15:51:59 -05:00
Brett Cannon 8396b8ef08 Fix a grammar error in the porting HOWTO as found by Eric Smith. 2015-04-13 16:32:16 -04:00
Brett Cannon fd53f98459 Issue #23733: Mention bytes.__mod__ in the porting HOWTO. 2015-04-13 16:21:07 -04:00
Antoine Pitrou 3764fc2951 Fix doc build error 2015-04-13 21:07:57 +02:00
Antoine Pitrou b9f2ab9eae Fix duplicate doc entry for SSLContext.get_ca_certs()
(closes #18147)
2015-04-13 21:06:51 +02:00
Antoine Pitrou 97aa953550 Fix duplicate doc entry for SSLContext.get_ca_certs()
(closes #18147)
2015-04-13 21:06:15 +02:00
Brett Cannon 4269d6db93 Issue #23732: Mention the new -b semantics in the porting HOWTO. 2015-04-13 14:37:50 -04:00
Brett Cannon f299abdafa Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Zachary Ware 774ac377da Closes #17202: Merge with 3.4 2015-04-13 12:11:40 -05:00
Zachary Ware 4c9c848159 Issue #17202: Add .bat to .hgeol to force them to CRLF.
Using LF can a script to fail if it tries to use a label that is
split across 512 byte blocks.  Who knows why.
2015-04-13 11:59:54 -05:00
Zachary Ware 3f103462fb Closes #23932: Merge with 3.4 2015-04-13 11:32:01 -05:00
Zachary Ware f3b990e48c Issue #23932: Update the tutorial section on function annotations.
Patch by Juti Noppornpitak.
2015-04-13 11:30:47 -05:00
Larry Hastings ab792ac704 Doc clarification / edification on the semantics of the 'w*' format unit. 2015-04-13 11:30:56 -04:00
R David Murray e6d3abd452 Merge: #17380: Document tp_init return value in extending docs. 2015-04-12 21:52:12 -04:00
R David Murray 354c7403c5 #17380: Document tp_init return value in extending docs.
Patch by James Powell.
2015-04-12 21:51:36 -04:00
R David Murray e81a773352 #23464: remove JoinableQueue that was deprecated in 3.4.4.
Patch by A. Jesse Jiryu Davis.
2015-04-12 18:47:56 -04:00
Berker Peksag 556e08e9b2 Issue #12955: Change the urlopen() examples to use context managers where appropriate.
Patch by Martin Panter.
2015-04-12 13:53:33 +03:00
Berker Peksag 9575e1891f Issue #12955: Change the urlopen() examples to use context managers where appropriate.
Patch by Martin Panter.
2015-04-12 13:52:49 +03:00
Antoine Pitrou 8ad751e024 Close #23904: fix pathlib documentation misleadingly mentioning that bytes objects are accepted in the PurePath constructor 2015-04-12 00:08:02 +02:00
Berker Peksag 770319d6bd Issue #23912: Fix code formatting in datamodel.rst.
Patch by James Edwards.
2015-04-11 14:59:30 +03:00
Benjamin Peterson 1c69c3e3d8 use imperative 2015-04-11 07:42:42 -04:00
Berker Peksag eb7a97c48e Issue #23025: Add a mention of os.urandom to RAND_bytes and RAND_pseudo_bytes docs.
Patch by Alex Gaynor.
2015-04-10 16:19:13 +03:00
Andrew Kuchling d71b170a4d #23891: describe a few more modules in the tutorial 2015-04-09 22:20:01 -04:00
Steve Dower fe0a41aae4 Issue #23668: Adds support for os.truncate and os.ftruncate on Windows 2015-03-20 19:50:46 -07:00
Antoine Pitrou 8d0c478601 Close #23904: fix pathlib documentation misleadingly mentioning that bytes objects are accepted in the PurePath constructor 2015-04-12 00:08:35 +02:00
Berker Peksag 2995cc6855 Issue #23912: Fix code formatting in datamodel.rst.
Patch by James Edwards.
2015-04-11 14:59:50 +03:00
Benjamin Peterson 339e3f33b6 merge 3.4 2015-04-11 07:44:45 -04:00
Antoine Pitrou 2dbc6e6bce Issue #23529: Limit the size of decompressed data when reading from
GzipFile, BZ2File or LZMAFile.  This defeats denial of service attacks
using compressed bombs (i.e. compressed payloads which decompress to a huge
size).

Patch by Martin Panter and Nikolaus Rath.
2015-04-11 00:31:01 +02:00
Serhiy Storchaka 2ce11d296c Null merge 2015-04-10 16:22:14 +03:00
Berker Peksag a7b9a1f4df Issue #23025: Add a mention of os.urandom to RAND_bytes and RAND_pseudo_bytes docs.
Patch by Alex Gaynor.
2015-04-10 16:19:44 +03:00
Tim Golden da5cbe65ae Merge from 3.4 2015-04-08 16:53:21 +01:00
Tim Golden fe5ac52c2b Fix typo in telnet docs (reported by Keith Briggs) 2015-04-08 16:52:27 +01:00
Benjamin Peterson f1c5dea3c2 merge 3.4 2015-04-08 11:11:45 -04:00
Benjamin Peterson 6f362fa6c8 actually ssl3 is just completely broken 2015-04-08 11:11:00 -04:00
Berker Peksag 291d7b0284 Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
2015-04-08 17:57:44 +03:00
Berker Peksag 7ecfc82edb Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
2015-04-08 17:56:30 +03:00
Victor Stinner 146907081c Issue #23853: Methods of SSL socket don't reset the socket timeout anymore each
time bytes are received or sent. The socket timeout is now the maximum total
duration of the method.

This change fixes a denial of service if the application is regulary
interrupted by a signal and the signal handler does not raise an exception.
2015-04-06 22:46:13 +02:00
Victor Stinner 8912d1418e Issue #23853: socket.socket.sendall() does no more reset the socket timeout
each time data is sent successfuly. The socket timeout is now the maximum total
duration to send all data.
2015-04-06 23:16:34 +02:00
Tim Golden 3fbcafa476 Merge doc change from 3.4 2015-04-06 11:06:18 +01:00
Tim Golden 42c235e833 Added missing right bracket (reported by Daryl Klakouski) 2015-04-06 11:04:49 +01:00
R David Murray cae7bdb424 #3566: Clean up handling of remote server disconnects.
This changeset does two things: introduces a new RemoteDisconnected exception
(that subclasses ConnectionResetError and BadStatusLine) so that a remote
server disconnection can be detected by client code (and provides a better
error message for debugging purposes), and ensures that the client socket is
closed if a ConnectionError happens, so that the automatic re-connection code
can work if the application handles the error and continues on.

Tests are added that confirm that a connection is re-used or not re-used
as appropriate to the various combinations of protocol version and headers.

Patch by Martin Panter, reviewed by Demian Brecht.  (Tweaked only slightly by
me.)
2015-04-05 19:26:29 -04:00
Serhiy Storchaka fcfcf853cf Updated pprint examples in according to issue #19105. 2015-04-05 08:22:41 +03:00
Serhiy Storchaka 778db289b5 Issue #10590: xml.sax.parseString() now supports string argument. 2015-04-04 10:12:26 +03:00
Serhiy Storchaka 5cf2b7253d Issue #15582: inspect.getdoc() now follows inheritance chains. 2015-04-03 22:38:53 +03:00
Victor Stinner 32ed750952 Merge 3.4 (asyncio doc) 2015-04-03 17:10:17 +02:00
Victor Stinner 72dcb0a765 Issue #23219: Update asyncio.wait_for() documentation
the wait is cancelled, the future *fut* is now also cancelled.
2015-04-03 17:08:19 +02:00
Serhiy Storchaka 61de087f0f Issue #2175: SAX parsers now support a character stream of InputSource object. 2015-04-02 21:00:13 +03:00
Victor Stinner acd8e7c1f5 Issue #23648: Complete the list of modified functions for the PEP 475 2015-04-02 13:56:29 +02:00
Victor Stinner 81c41dbfcc Issue #23618: socket.socket.connect() now waits until the connection completes
instead of raising InterruptedError if the connection is interrupted by
signals, signal handlers don't raise an exception and the socket is blocking or
has a timeout.

socket.socket.connect() still raise InterruptedError for non-blocking sockets.
2015-04-02 11:50:57 +02:00
Victor Stinner 708d9ba5a2 Issue #23618: Document EINTR changes in socket documentation 2015-04-02 11:49:42 +02:00
Victor Stinner bbe3803fb5 What's New in Python 3.5: mention signal.set_wakeup_fd() enhancement on Windows 2015-04-01 16:32:32 +02:00
R David Murray ef2a397a65 It wasn't a typo, it is the mnemonic (AT=@). 2015-04-01 09:15:02 -04:00
Benjamin Peterson f8521d55ad merge 3.4 (#12855) 2015-03-31 21:21:09 -04:00