Commit Graph

1920 Commits

Author SHA1 Message Date
Serhiy Storchaka df4518ca4b Issue #22453: Removed non-documented macro PyObject_REPR(). 2014-11-18 23:34:33 +02:00
Nick Coghlan c216c48699 Close #19494: add urrlib.request.HTTPBasicPriorAuthHandler
This auth handler adds the Authorization header to the first
HTTP request rather than waiting for a HTTP 401 Unauthorized
response from the server as the default HTTPBasicAuthHandler
does.

This allows working with websites like https://api.github.com which do
not follow the strict interpretation of RFC, but more the dicta in the
end of section 2 of RFC 2617:

    > A client MAY preemptively send the corresponding Authorization
    > header with requests for resources in that space without receipt
    > of another challenge from the server.  Similarly, when a client
    > sends a request to a proxy, it may reuse a userid and password in
    > the Proxy-Authorization header field without receiving another
    > challenge from the proxy server. See section 4 for security
    > considerations associated with Basic authentication.

Patch by Matej Cepl.
2014-11-12 23:33:50 +10:00
Berker Peksag 39e4c4d873 Issue #21650: Add an `--sort-keys` option to json.tool CLI. 2014-11-10 09:56:54 +02:00
Benjamin Peterson 1cca273669 merge 3.4 (#22417) 2014-11-03 14:36:48 -05:00
Benjamin Peterson 4ffb075271 PEP 476: enable HTTPS certificate verification by default (#22417)
Patch by Alex Gaynor with some modifications by me.
2014-11-03 14:29:33 -05:00
Serhiy Storchaka c1ded29f8e Issue #22388: Unified the style of "Contributed by" sentences in What's New. 2014-11-02 19:22:02 +02:00
Serhiy Storchaka e5cf4868d3 Issue #22388: Unified the style of "Contributed by" sentences in What's New. 2014-11-02 19:18:52 +02:00
Berker Peksag 8f791d358b Issue #6623: Remove deprecated Netrc class in the ftplib module.
Patch by Matt Chaput.
2014-11-01 10:45:57 +02:00
Georg Brandl 6b4c847c4f Doc: fix default role usage (except in unittest mock docs) 2014-10-30 22:26:26 +01:00
Georg Brandl 93a56cdc37 Doc: fix default role usage (except in unittest mock docs) 2014-10-30 22:25:41 +01:00
Georg Brandl bad8d4bb53 merge with 3.4 2014-10-29 10:57:42 +01:00
Georg Brandl b7354a65ce Fixing broken links in doc, part 4: some more breaks and redirects 2014-10-29 10:57:37 +01:00
Georg Brandl cadc3fdcb5 Merge with 3.4 2014-10-29 08:37:29 +01:00
Georg Brandl e73778c1ac Use https:// URLs when referring to python.org hosts. 2014-10-29 08:36:35 +01:00
Serhiy Storchaka 7438e4b56f Issue 1519638: Now unmatched groups are replaced with empty strings in re.sub()
and re.subn().
2014-10-10 11:06:31 +03:00
R David Murray 4487dd0ed5 #18615: Make sndhdr return namedtuples.
Patch by Claudiu Popa.
2014-10-09 16:59:30 -04:00
Berker Peksag 882c95c7dc whatsnew: Fix markup. 2014-10-09 11:46:56 +03:00
Berker Peksag fa0423b271 whatsnew: Add PEP 478. 2014-10-09 11:38:19 +03:00
R David Murray 861470c836 #16518: Bring error messages in harmony with docs ("bytes-like object")
Some time ago we changed the docs to consistently use the term 'bytes-like
object' in all the contexts where bytes, bytearray, memoryview, etc are used.
This patch (by Ezio Melotti) completes that work by changing the error
messages that previously reported that certain types did "not support the
buffer interface" to instead say that a bytes-like object is required.  (The
glossary entry for bytes-like object references the discussion of the buffer
protocol in the docs.)
2014-10-05 11:47:01 -04:00
R David Murray df75fee9a3 #22508: Drop email __version__ string. It no longer means anything.
A debian code search (by Tshepang Lekhonkhobe) turned up only one package
checking email.__version__...and it was the 2.7-only mailman package.  Since
Barry approves this change, it seems safe enough to make it...
2014-10-03 13:02:47 -04:00
Serhiy Storchaka 9baa5b2de2 Issue #22437: Number of capturing groups in regular expression is no longer
limited by 100.
2014-09-29 22:49:23 +03:00
R David Murray c31e6227f9 #17442: Add chained traceback support to InteractiveInterpreter.
Patch by Claudiu Popa.
2014-09-29 11:25:00 -04:00
Georg Brandl 9e7fbde67f merge with 3.4 2014-09-21 00:38:13 +02:00
Georg Brandl 3f40c40dea Doc: remove invalid uses of ":option:" which will emit warnings in Sphinx 1.3. 2014-09-21 00:35:08 +02:00
Benjamin Peterson 004c00b7f4 merge 3.4 2014-09-19 17:30:21 -04:00
Benjamin Peterson cbfaa7b9d3 standardize pep 466 relnote style 2014-09-19 17:27:03 -04:00
Benjamin Peterson 49d77fd58a remove extra letter 2014-09-19 17:29:08 -04:00
Benjamin Peterson ce30237493 whatsnew for pep 466 ssl backport 2014-09-19 17:23:21 -04:00
Brett Cannon f1a8df0ac9 Issue #16104: Allow compileall to do parallel bytecode compilation.
Both compileall.compile_dir() and the CLI for compileall now allow for
specifying how many workers to use (or 0 to use all CPUs).

Thanks to Claudiu Popa for the patch.
2014-09-12 10:39:48 -04:00
Serhiy Storchaka c2edcdd194 Issue #13968: The glob module now supports recursive search in
subdirectories using the "**" pattern.
2014-09-11 12:17:37 +03:00
Serhiy Storchaka dd6507eb86 Issue #22369: Change "context manager protocol" to "context management protocol". 2014-09-10 23:45:42 +03:00
Serhiy Storchaka 148679982f Issue #22369: Change "context manager protocol" to "context management protocol". 2014-09-10 23:43:41 +03:00
Serhiy Storchaka 38684c3663 imaplib.IMAP4 now supports the context manager protocol.
Original patch by Tarek Ziadé.
2014-09-09 19:07:49 +03:00
Victor Stinner ae58649721 Issue #22043: time.monotonic() is now always available
threading.Lock.acquire(), threading.RLock.acquire() and socket operations now
use a monotonic clock, instead of the system clock, when a timeout is used.
2014-09-02 23:18:25 +02:00
Nick Coghlan b51b1345bd Merge PEP 466 What's New in 2.7 changes from 3.4 2014-08-23 14:48:22 +10:00
Nick Coghlan a5bbc2ea3d Forward port PEP 466 What's New in 2.7 updates 2014-08-23 14:47:47 +10:00
R David Murray 2539e6744b #21725: Add RFC 6531 (SMTPUTF8) support to smtpd.
Patch by Milan Oberkirch, developed as part of his 2014 GSOC project.

Note that this also fixes a bug in mock_socket ('getpeername' was returning a
simple string instead of the tuple required for IPvX protocols), a bug in
DebugServer with respect to handling binary data (should have been fixed when
decode_data was introduced, but wasn't found until this patch was written),
and a long-standing bug in DebugServer (it was printing an extra blank line at
the end of the displayed message text).
2014-08-09 16:40:49 -04:00
Ezio Melotti 045160bc39 #15114, #21047: update whatsnew in Python 3.5. 2014-08-02 18:54:30 +03:00
Victor Stinner e1d24f7ec3 Issue #21813: Enhance documentation of the os.stat_result class. 2014-07-24 12:44:07 +02:00
R David Murray 76e13c1c29 #15014: Add 'auth' command to implement auth mechanisms and use it in login.
Patch by Milan Oberkirch.
2014-07-03 14:47:46 -04:00
Berker Peksag 3e887222aa Issue #5800: headers parameter of wsgiref.headers.Headers is now optional.
Patch by Pablo Torres Navarrete and SilentGhost.
2014-07-02 08:37:22 +03:00
R David Murray 2f60820f4c #20295: Teach imghdr to recognize OpenEXR format images.
Patch by Martin Vignali, test by Claudiu Popa.
2014-06-26 12:27:57 -04:00
Zachary Ware 63f277b694 Issue #21741: Add st_file_attributes to os.stat_result on Windows.
Patch by Ben Hoyt.
2014-06-19 09:46:37 -05:00
Victor Stinner 40ee30181f Issue #21205: Add a new ``__qualname__`` attribute to generator, the qualified
name, and use it in the representation of a generator (``repr(gen)``). The
default name of the generator (``__name__`` attribute) is now get from the
function instead of the code. Use ``gen.gi_code.co_name`` to get the name of
the code.
2014-06-16 15:59:28 +02:00
R David Murray 6ffface429 #19840: Add copy_function to shutil.move.
Patch by Claudiu Popa.
2014-06-11 14:40:13 -04:00
R David Murray 6fe56a329d #14758: add IPv6 support to smtpd.
Patch by Milan Oberkirch.
2014-06-11 13:48:58 -04:00
R David Murray 554bcbf1b9 #19662: add decode_data to smtpd so you can get at DATA in bytes form.
Otherwise smtpd is restricted to 7bit clean data, since even if the
incoming data is actually utf-8, it will often break things to decode
it before parsing the message.

Patch by Maciej Szulik, with some adjustments (mostly the warning
support).
2014-06-11 11:18:08 -04:00
Giampaolo Rodola' 915d14190e fix issue #17552: add socket.sendfile() method allowing to send a file over a socket by using high-performance os.sendfile() on UNIX. Patch by Giampaolo Rodola'· 2014-06-11 03:54:30 +02:00
Nick Coghlan 9f488512a8 Issue #21569: merge from 3.4 2014-06-09 13:30:33 +10:00
Nick Coghlan b1f59cecc9 Issue #21569: Fix incorrect cross reference 2014-06-09 13:14:54 +10:00
Nick Coghlan ce6c525762 Merge issue #21569 from 3.4 2014-06-08 00:00:13 +10:00
Nick Coghlan 024b2f52bf Issue #21569: sync Python 2.7 What's New with 2.7 version 2014-06-07 23:43:00 +10:00
Victor Stinner 2bc4d95bb6 Issue #21233: Revert bytearray(int) optimization using calloc() 2014-06-02 22:22:42 +02:00
Victor Stinner d8f0d922d5 Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" to
make sure that the code using it will be adapted for the new "calloc" field
(instead of crashing).
2014-06-02 21:57:10 +02:00
Brett Cannon 2a17bde930 Issue #20383: Introduce importlib.util.module_from_spec().
Along the way, dismantle importlib._bootstrap._SpecMethods as it was
no longer relevant and constructing the new function required
partially dismantling the class anyway.
2014-05-30 14:55:29 -04:00
Donald Stufft 8b852f111e Fix Issue #21528 - Fix documentation typos 2014-05-20 12:58:38 -04:00
Antoine Pitrou 0dfce56cd1 Mention ipaddress improvements. 2014-05-15 22:55:40 +02:00
Antoine Pitrou b9d9ce73d7 Better organization of the what's new 2014-05-15 22:47:33 +02:00
Brett Cannon 6eaac13c92 Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a
staticmethod.
2014-05-09 12:28:22 -04:00
Victor Stinner db067af12a Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),
PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) and bytearray(int) are now
using ``calloc()`` instead of ``malloc()`` for large objects which is faster
and use less memory (until the bytearray buffer is filled with data).
2014-05-02 22:31:14 +02:00
Antoine Pitrou 92c4d45326 Add porting note for issue #20951. 2014-04-29 10:05:59 +02:00
R David Murray 1976d9bf6d #15916: if there are no docstrings, make empty suite, not an error.
This makes doctest work like unittest: if the test case is empty, that
just means there are zero tests run, it's not an error.  The existing
behavior was broken, since it only gave an error if there were *no*
docstrings, and zero tests run if there were docstrings but none of them
contained tests.  So this makes it self-consistent as well.

Patch by Glenn Jones.
2014-04-14 20:28:36 -04:00
Yury Selivanov 67ae50ee1c inspect: Make Signature and Parameter hashable. Issue #20334. 2014-04-08 11:46:50 -04:00
Brett Cannon a04dbe4fe7 Issue #17621: Introduce importlib.util.LazyLoader. 2014-04-04 13:53:38 -04:00
Giampaolo Rodola' e09fb7198a fix #21076: turn signal module constants into enums 2014-04-04 15:34:17 +02:00
Yury Selivanov da39645ad3 inspect.Signature: Add 'Signature.from_callable' classmethod. Closes #17373 2014-03-27 12:09:24 -04:00
Yury Selivanov a5d63dd7b8 inspect.signature: Make Signature and Parameter picklable. Closes #20726 2014-03-27 11:31:43 -04:00
R David Murray b0e6951193 Merge #20145 backport: delete whatsnew entry. 2014-03-25 15:34:17 -04:00
R David Murray e1b6f97dae #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.
Previously a non-string, non-regex second argument could cause the test
to always pass.

Initial patch by Kamilla Holanda.
2014-03-23 15:08:43 -04:00
Brett Cannon 33a4000374 Issue #20627: xmlrpc.client.ServerProxy is now a context manager.
Patch by Claudiu Popa.
2014-03-21 11:24:40 -04:00
Brett Cannon a77d0c36e5 Issue #19165: The formatter module graduates to full deprecation. 2014-03-21 10:52:33 -04:00
Benjamin Peterson ee6bdc07d6 remove the ability of datetime.time to be considered false (closes #13936) 2014-03-20 18:00:35 -05:00
Victor Stinner eb7d40c12c Doc: add What's New in Python 3.5 to whatsnew index 2014-03-18 09:01:21 +01:00
Victor Stinner 7143029d43 Issue #19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
:py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the
``surrogateescape`` error handler, instead of the ``strict`` error handler.
2014-03-18 01:18:21 +01:00
Victor Stinner 01adf06d37 Add a stub "whatsnew in 3.5" document. 2014-03-18 00:53:32 +01:00
Jesus Cea 28a965ff71 Typo 2014-03-17 19:22:59 +01:00
Jesus Cea bdb8bb39dd Typo 2014-03-17 19:13:09 +01:00
Jesus Cea cec25b01ec Typo 2014-03-17 19:00:48 +01:00
Larry Hastings 3101b70762 Final documentation fixes for 3.4.0 final. 2014-03-15 22:43:17 -07:00
Larry Hastings 0548f5c514 Regenerate pydoc_topics, fix markup errors, in preparation for 3.4.0 final. 2014-03-15 22:29:19 -07:00
Larry Hastings 3732ed2414 Merge in all documentation changes since branching 3.4.0rc1. 2014-03-15 21:13:56 -07:00
R David Murray 6dfc632f1f whatsnew: difflib.isbjunk &c were removed, not deprecated.
Also move NEWS item to correct position (it was in 3.3).
2014-03-13 21:34:54 -04:00
R David Murray c4c7b1ccb6 whatsnew: cp273 codec (#10907797)
Also updated the docs and added the aliases mentioned by the
references.
2014-03-07 21:00:34 -05:00
R David Murray b79b785a92 whatsnew: importlib deprecations.
This addresses issue #20199, if I got it right.  The deprecation and
replacement lists are based on the importlib documentation.
2014-02-22 14:28:46 -05:00
Yury Selivanov 026019f89b Mangle __parameters in __annotations__ dict properly. Issue #20625. 2014-02-18 12:49:41 -05:00
Larry Hastings ad88d7a26b Python 3.4.0rc1 release: Updated pydoc topics, fixed suspicious markup errors. 2014-02-10 04:26:10 -08:00
Nick Coghlan 72318b97f6 Issue #20500: clarify that invocation may be indirect 2014-02-09 12:05:13 +10:00
Nick Coghlan c0bc0b46bb Issue #20500: Note other public APIs with the new assertion 2014-02-09 12:00:01 +10:00
Nick Coghlan 3d7b3641d3 Note the new debug assertion in PyObject_Str 2014-02-09 10:57:34 +10:00
Nick Coghlan aa029dad50 Tweaks to What's New and some referenced docs 2014-02-09 10:10:24 +10:00
Nick Coghlan 96bb437ae8 Close #20563: Declare ipaddress API stable 2014-02-09 09:18:26 +10:00
R David Murray 45e732de70 whatsnew: read/write on closed SSL socket exception has changed. 2014-02-03 01:33:39 -05:00
R David Murray bf0ab8377a whatsnew: html.escape 10x faster, _gestalt module gone. 2014-02-03 01:14:03 -05:00
R David Murray a56d4e8ea1 whatsnew: hmac accepts more bytes types, importlib decode_source, stat in C. 2014-02-02 12:50:48 -05:00
R David Murray 5147e00c81 whatsnew: -m <namespace package>, plus 'using' doc updates. 2014-02-02 12:19:57 -05:00
R David Murray 900aeb7221 whatsnew: some more importlib replacements for imp functions.
get_magic->util.MAGIC_NUMBER, source_from_cache, and cache_from_source.
2014-02-02 11:32:31 -05:00
R David Murray 4885f49e7f whatsnew: filecmp.clear_cache, and reword description of cache in docs. 2014-02-02 11:11:01 -05:00
R David Murray 70e04f5fbc whatsnew: fix importlib.reload entry.
Turns out I committed a work-in-progress entry because of a time
gap between when I wrote it and when I committed.
2014-02-02 10:50:17 -05:00
R David Murray 8c561b52b2 whatsnew: move of reload, update new windows-only ssl functions entry. 2014-02-01 12:27:07 -05:00
Yury Selivanov 63da7c7b0c inspect.signature: Support duck-types of Python functions (Cython, for instance) #17159 2014-01-31 14:48:37 -05:00
Andrew Kuchling fe0f0b050d Typo fix 2014-01-31 12:17:53 -05:00
Yury Selivanov d82eddcf05 inspect.getfullargspec: Use inspect.signature API behind the scenes #17481 2014-01-29 11:24:39 -05:00
Yury Selivanov 2393dca472 inspect.signature: Use '/' to separate positional-only parameters from
the rest in Signature.__str__. #20356
2014-01-27 15:07:58 -05:00
Nick Coghlan 77b286b2cc Close #20105: set __traceback__ when chaining exceptions in C 2014-01-27 00:53:38 +10:00
Eric V. Smith df9db26902 Fix grammar: merge with 3.3. 2014-01-25 05:12:11 -05:00
Eric V. Smith b72e69e529 Fix grammar. 2014-01-25 05:11:43 -05:00
R David Murray f1e4fdcf16 whatsnew: smtpd *map* argument, new ssl functions/methods.
Fleshed out Christian's placeholder for the new ssl methods.
2014-01-21 18:30:42 -05:00
Brett Cannon c089f70b54 Issue #18394: Document that cgi.FieldStorage now cleans up after its
'file' attribute properly in Python 3.4.

Thanks to Marcel Hellkamp for pointing out the oversight.
2014-01-17 11:03:19 -05:00
Ronald Oussoren 6db6653bbc Issue #14455: Fix some issues with plistlib
* Negative integer support in binary plists was broken

* Better exception for invalid data

* Fix the versionadded/versionchanged markup in the documentation

* Add the interface cleanup to what's new for 3.4
2014-01-15 11:32:35 +01:00
Zachary Ware 335957e087 Correct a typo. Found by Lauri Hakko on docs@. 2014-01-13 16:08:54 -06:00
R David Murray 0ae7ae1fc9 whatsnew: InspectLoader.get_code now concrete, b32decode raises binascii.Error.
And a news item rephrase.
2014-01-08 18:16:02 -05:00
R David Murray 66bf12a58e whatsnew: FileIO.readall performance, os.cpu_count.
And more news item tweaks.
2014-01-08 17:21:22 -05:00
R David Murray 0bce6e7462 whatsnew: expand 'dis' entry.
Also add one missing versionadded.
2014-01-07 14:30:17 -05:00
R David Murray a101bdb88c whatsnew: ssl getpeercert/do_handshake raise OSError, weakref __callback__.
Also add a missing word to gc entry, and delete a now-obsolete doc note
in the weakref __callback__ docs.  (Opened an issue for rewriting
the section that compares finalizers and __del__ method.)
2014-01-06 16:32:05 -05:00
R David Murray 9835827593 whatsnew: pydoc.Scanner removal, check_output input parm, operator.py.
Also fleshed out the entry on struct.iter_unpack.
2014-01-05 20:52:06 -05:00
R David Murray 410d320703 whatsnew: XMLPullParser, plus some doc updates.
I was confused by the text saying that read_events "iterated", since it
actually returns an iterator (that's what a generator does) that the
caller must then iterate.  So I tidied up the language.  I'm not sure
what the sentence "Events provided in a previous call to read_events()
will not be yielded again." is trying to convey, so I didn't try to fix that.

Also fixed a couple more news items.
2014-01-04 23:52:50 -05:00
R David Murray 244ad600e9 whatsnew: removal of TYPE_INT64 from marshal.
Also update news entry for SMTPException; when I changed it from
IOError to OSError I forgot to update the news item.
2014-01-04 21:17:52 -05:00
R David Murray 9cf617bff9 whatsnew: logging TimedRotatingFileHandler atTime parameter. 2014-01-04 18:55:01 -05:00
R David Murray 4908f4a151 whatsnew: from __future__ string exception, attribute UTF-32 decoder speedup.
And more news entry clarifications.
2014-01-04 18:07:20 -05:00
R David Murray b231b2be07 whatsnew: ppring string wrapping, string pickling optimization.
Also clarify some NEWS entries.
2014-01-04 17:11:23 -05:00
R David Murray 57fcf76d73 whatsnew: Mock mock_open readline(s); expand description of subtests feature. 2014-01-03 23:31:54 -05:00
Serhiy Storchaka 3079328d29 Reverted changeset b72c5573c5e7 (issue #15027). 2014-01-04 22:44:01 +02:00
Serhiy Storchaka 583a93943c Issue #15027: Rewrite the UTF-32 encoder. It is now 1.6x to 3.5x faster. 2014-01-04 19:25:37 +02:00
R David Murray e608255328 whatsnew: consistently use 3 blanks between major sections. 2 for minor. 2014-01-03 16:15:45 -05:00
R David Murray 59171722f0 whatsnew: make bullet list presentation style consistent. 2014-01-03 15:52:22 -05:00
R David Murray db085f56b9 whatsnew: unittest discovery sorting, urlllib Request getter/setter removals. 2014-01-03 15:46:24 -05:00
R David Murray a2924cabaf whatsnew: porting note for HTTP[S]Connection strict parameter removal.
It was discussed in issue #17460 whether or not to make the remaining
arguments keyword only so that things would fail noisily if someone was still
using positional parameters, but no decision was made and we are now well past
the Beta API change deadline.
2014-01-03 14:06:01 -05:00
R David Murray 0056936a4b whatsnew: deprecation of HTTPConnection's strict parameter. 2014-01-03 13:04:25 -05:00
R David Murray 42fa110035 whatsnew: unittest import time SkipTest reported as skip not error. 2014-01-03 13:03:36 -05:00
R David Murray a475a8d313 whatsnew: http.server send_error explain parameter.
Also rewrote the send_error description for clarity and correct English.
2014-01-03 13:03:00 -05:00
Martin v. Löwis 24e43308b7 * Issue #16113: Remove sha3 module again.
Patch by Christian Heimes, with modifications.
2014-01-03 14:05:06 +01:00
R David Murray 9025f1c5c4 whatsnew: sqlite3 uri parm, unittest.main defaultTest, ftplib.Netrc deprecation 2014-01-02 13:44:18 -05:00
R David Murray 33ef1aeb1e whatsnew: mock called_with improvements, socket CAN_BCM support.
Also reworded the other entries in the socket section of whatsnew, as
well as a couple of unrelated news entries.
2013-12-31 16:04:50 -05:00
R David Murray 8b2d68245e whatsnew: random.getrandbits performance.
Also fix a NEWS file issue number error, and some spacing fixes in whatsnew.
2013-12-31 15:06:05 -05:00
R David Murray d592bb2dc4 whatsnew: afic.open supports 'with'. 2013-12-31 13:45:38 -05:00
R David Murray fced3ec2db whatsnew: argparse FileType accepts errors and encodings args. 2013-12-31 11:18:01 -05:00
R David Murray 2bc930f044 whatsnew: epoll supports with.
Also reworded the description of the feature in the docs.
2013-12-31 11:17:21 -05:00
Christian Heimes f598558afb Fixed typo (thx Arfrever) 2013-12-30 09:33:46 +01:00
R David Murray 2691ee6183 whatsnew: abc.ABC. Also add issue number to news entry and reword. 2013-12-28 23:15:12 -05:00
R David Murray 473f45b4bc whatsnew: rewrite urllib, doctest, and poplib sections.
Also collapse redundant versionadded/versionchanged markup in
poplib.stls entry.
2013-12-27 17:01:16 -05:00
R David Murray d26538163e whatsnew: importlib cleanup and source_to_code add; python partial impl. 2013-12-27 14:06:15 -05:00
R David Murray 0e814634e5 whatsnew for gc.get_stats, plus doc tweaks.
Clarified the "At the moment" wording, and added the get_stats entry in the
module summary that Serhiy noted was missing at the end of issue 16351.

Given that pydoc lists all the function docstrings, I'm not sure that module
summary section is actually needed; but, it is probably better to address that
when the module is converted to use Argument Clinic.  In the meantime we
should keep the list complete.
2013-12-26 15:11:28 -05:00
R David Murray 575fb31955 shelf in with stmt, fish/csh in venv, ElementTree short_empty_elements keyword.
Also added versionadded for for fish/csh, fixed indentation of versionadded
for ElementTree.write, and make the behavior of shelf as a context manager
explicit in the docs.
2013-12-25 23:21:03 -05:00
R David Murray 6e39015f61 pty.spawn returns os.waitpid; optimization of BZ2File and LZMAFile. 2013-12-24 22:28:04 -05:00
R David Murray 3edcc7832e #16832: s/integer/object/ in docs/docstring, and add whatsnew entry. 2013-12-24 16:13:32 -05:00
R David Murray 5ea95249d5 idle -n deprecation, fix case of pickle section. 2013-12-24 15:59:57 -05:00
R David Murray d74d09ab4a Neaten up structure of major sections.
Also move tick_counter from deprecated section to removed section.
2013-12-24 15:33:02 -05:00
R David Murray 076deadd81 Move no-longer-supported operating systems into 'removed' section. 2013-12-24 14:59:50 -05:00
R David Murray e7cf678ad2 Use title case for all section titles except module names. 2013-12-24 14:51:25 -05:00
R David Murray d17aba7139 sys.getallocatedblocks + regrtest -R, make coverage-report, SO macro goes away. 2013-12-24 14:46:23 -05:00
R David Murray 061efb175f Use endash in PEP callouts.
Despite Serhiy's suggestion in issue18529, the emdash just looks
too long to me, at least in my browser.  This usage case is sort
of halfway between endash (connective) and emdash (pause/separator).
2013-12-24 12:35:59 -05:00
R David Murray 6dd1830c25 Move argument clinic into its own section, like the other PEPs. 2013-12-24 12:23:56 -05:00
R David Murray d91ba206a2 Mention Windows 2000 and OS/2 drops, python-config as shell script. 2013-12-24 12:13:44 -05:00
R David Murray 72420ff3ce Mention PATHEXT and removed Misc dirs; clarify wording of a NEWS entry. 2013-12-24 10:46:44 -05:00
Serhiy Storchaka f47036c130 Removed spaces before colons and semicolons. 2013-12-24 11:04:36 +02:00
R David Murray 347f9c7457 Make the 'read on' sentence cover more ground. 2013-12-23 21:30:06 -05:00
R David Murray bcaaecfe1e Move other improvements and optimization sections above deprecated.
This arrangement means the sections that have summaries come
first, and everything else comes after those.
2013-12-23 21:23:36 -05:00
R David Murray 4d48f2a6e7 Collapse 'python invocation changes' into 'other improvements'. 2013-12-23 21:21:09 -05:00
R David Murray 9217dadd12 Link new module summary entries to their description sections. 2013-12-23 21:08:28 -05:00
Serhiy Storchaka 89e84e7523 Removed spaces before colons and semicolons. 2013-12-24 11:05:24 +02:00
Serhiy Storchaka a4d170d985 Removed spaces before commas and periods. 2013-12-23 18:20:51 +02:00
R David Murray 68790662fc Add pep 435 summary entry in new required features, and ensurepip description.
Also added a note about platform packagers not being required to install
pip by default, if they provide an appropriate pip hook, to the PEP
description section.
2013-12-23 11:17:51 -05:00
R David Murray f9976e7254 Add link to selectors description from its summary line. 2013-12-23 10:32:02 -05:00
R David Murray 8d85678d5c Make summary entry format consistent (always end with pep or issue in parens). 2013-12-23 10:28:57 -05:00
Serhiy Storchaka 2a6145290b Removed spaces before commas and periods. 2013-12-23 18:21:57 +02:00
R David Murray 3f122d6f44 Mention deprecation and porting sections in intro. 2013-12-22 21:09:16 -05:00
R David Murray f85b2a8dc7 Reflow 'modulespec' paragraphs. 2013-12-22 21:06:13 -05:00
R David Murray e9b74d45d3 Make mailing list thread reference an inline link, reword i.e. abbreviation. 2013-12-22 21:05:04 -05:00
R David Murray 809487e5f5 Make the organization of the body and the summary have parallel structure.
This means I moved the 'new expected features' section to the top of the
summary, and made a new section with the same name at the start of
the body, turning the previous top level sections there into subsections.

I also added a line to the new first summary section for modulespec (pep 451).
2013-12-22 20:49:40 -05:00
R David Murray 8f7664ab15 Add description of marshal changes. 2013-12-22 20:40:11 -05:00
R David Murray a93ca971a5 Be consistent in how PEPs are referenced throughout the summary section. 2013-12-22 14:10:21 -05:00
R David Murray ca7946193f Rewrite module-globals summary entry, and expand the full description a bit. 2013-12-22 14:05:11 -05:00
R David Murray 2aa9d52ed2 Make argument clinic summary entry parallel to other PEP entries.
The existing entry repeated the same info that was in the body text, which
means it didn't satisfy the sections "brevity" requirement :)
2013-12-22 13:57:45 -05:00
R David Murray c16dfe1837 Make CPython PEP summary entry links consistent, add pep 456 discussion. 2013-12-21 12:32:10 -05:00
Christian Heimes af01f66817 Issue #16136: Remove VMS support and VMS-related code 2013-12-21 16:19:10 +01:00
R David Murray 26b80cfde0 Add link from email summary entry to entry in changed module section. 2013-12-20 17:26:52 -05:00
R David Murray ac18622126 Add links to discussion of multiprocessing spawn/forkserver feature. 2013-12-20 17:23:57 -05:00
R David Murray 748bad2cd0 Tidy up ssl whatsnew references, make ssl section formatting consistent.
Also remove some extra blank lines in the ssl doc acctions for tls1.1/1.2,
and reflow a paragraph.
2013-12-20 17:08:39 -05:00
R David Murray c054040f86 Add link from pickle protocol 4 in summary to the section about it. 2013-12-20 16:38:09 -05:00
R David Murray cde1a06a54 Include sha3 addition in hashlib section of whatsnew.
And link to it from the summary, and link to the Hash Algorithms
section of hashlib from the linked description.
2013-12-20 16:33:52 -05:00
R David Murray a17e0d873a No need for single para descriptions to have separate contributed by para. 2013-12-20 16:12:28 -05:00
R David Murray e0f7a78877 whatsnew: s/no new syntax features planned/no new syntax features added/ 2013-12-20 16:04:29 -05:00
R David Murray 0a1021661f Fix spelling error in single dispatch whatsnew summary, and add link. 2013-12-20 15:00:54 -05:00
R David Murray f9909c27df Make the 'PEP 446' string link to the PEP in whatsnew new feature description.
I also further qualified the cross reference link, since those are
global names.
2013-12-20 14:50:12 -05:00
R David Murray 6adb4543fc Add email package to whatsnew list of significantly improved stdlib modules. 2013-12-20 13:10:43 -05:00
Nick Coghlan 9a76735b1d Close #19946: use runpy as needed in multiprocessing
- handles main files without a suffix
- handles main submodules properly
- adds test cases for the various kinds of __main__
2013-12-17 22:17:26 +10:00
Victor Stinner 774b2e0af2 Issue #14432: Document the removal of the PyFrameObject.f_tstate field 2013-12-13 14:33:01 +01:00
Victor Stinner 2748bc735e asyncio: remove references to the Tulip project, rename Tulip to asyncio.
Patch written by Vajrasky Kok.
2013-12-13 10:57:04 +01:00
Victor Stinner 441adb8c57 Backout changeset 46393019b650
test_capi is failing and the fix is not trivial, I prefer to revert
2013-12-13 04:14:41 +01:00
Victor Stinner cd0cb8ccd3 Close #19787: PyThread_set_key_value() now always set the value. In Python 3.3,
the function did nothing if the key already exists (if the current value is a
non-NULL pointer).

_testcapi.run_in_subinterp() now correctly sets the new Python thread state of
the current thread when a subinterpreter is created.
2013-12-13 03:22:00 +01:00
Serhiy Storchaka 6de88b3107 Fixed formatting (was parsed as description list). 2013-12-02 20:31:00 +02:00
Serhiy Storchaka 0e90e99188 Issue #19795: Improved markup of True/False constants. 2013-11-29 12:19:53 +02:00
Serhiy Storchaka fbc1c26803 Issue #19795: Improved markup of True/False constants. 2013-11-29 12:17:13 +02:00
Ezio Melotti dd7e291dc3 #13592, #17087: add whatsnew entry about regex/match object repr improvements. 2013-11-25 23:20:20 +02:00
Victor Stinner d2736affa1 Mention the new tracemalloc module in the What's New in Python 3.4 document 2013-11-25 09:40:27 +01:00
Ezio Melotti 250a06c3cb Add whatsnew section about the html package. 2013-11-25 06:18:47 +02:00
Georg Brandl ed007d5b1b Fix suspicious markup in the docs. 2013-11-24 16:09:26 +01:00
Serhiy Storchaka 32eddc1bbc Issue #16203: Add re.fullmatch() function and regex.fullmatch() method,
which anchor the pattern at both ends of the string to match.

Original patch by Matthew Barnett.
2013-11-23 23:20:30 +02:00
Serhiy Storchaka 3062c9a6c8 Issue #19641: Added the audioop.byteswap() function to convert big-endian
samples to little-endian and vice versa.
2013-11-23 22:26:01 +02:00
Antoine Pitrou c9dc4a2a8a Issue #17810: Implement PEP 3154, pickle protocol 4.
Most of the work is by Alexandre.
2013-11-23 18:59:12 +01:00
Ned Deily 44a0db0c1e Issue #19551: Update whatsnew. 2013-11-22 22:39:09 -08:00
Nick Coghlan 7bc4b3bee3 Update What's New with PEP 453 progress 2013-11-23 11:59:40 +10:00
Nick Coghlan 9c1aed8f94 Close #7475: Restore binary & text transform codecs
The codecs themselves were restored in Python 3.2, this
completes the restoration by adding back the convenience
aliases.

These aliases were originally left out due to confusing
errors when attempting to use them with the text encoding
specific convenience methods. Python 3.4 includes several
improvements to those errors, thus permitting the aliases
to be restored as well.
2013-11-23 11:13:36 +10:00
Antoine Pitrou 31119e4f10 Issue #19673: Add pathlib to the stdlib as a provisional module (PEP 428). 2013-11-22 17:38:12 +01:00
Eric Snow b523f8433a Implement PEP 451 (ModuleSpec). 2013-11-22 09:05:39 -07:00
Nick Coghlan 50c48b89e3 Close #17916: dis.Bytecode based replacement for distb
- Bytecode.from_traceback() alternate constructor
- current_offset parameter and attribute

Patch by Claudiu Popa
2013-11-23 00:57:00 +10:00
Nick Coghlan 8afc8f61f9 Issue #19619: Update What's New for codec blacklist 2013-11-22 23:00:22 +10:00
Christian Heimes 634919a9fa Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
module supports digestmod names, e.g. hmac.HMAC('sha1').
2013-11-20 17:23:06 +01:00
Christian Heimes 985ecdcfc2 ssue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.
Python now uses SipHash24 on all major platforms.
2013-11-20 11:46:18 +01:00
Serhiy Storchaka 58cf607d13 Issue #12892: The utf-16* and utf-32* codecs now reject (lone) surrogates.
The utf-16* and utf-32* encoders no longer allow surrogate code points
(U+D800-U+DFFF) to be encoded.
The utf-32* decoders no longer decode byte sequences that correspond to
surrogate code points.
The surrogatepass error handler now works with the utf-16* and utf-32* codecs.

Based on patches by Victor Stinner and Kang-Hao (Kenny) Lu.
2013-11-19 11:32:41 +02:00
Nick Coghlan d4fdbcc078 Issue #17839: mention base64 change in What's New 2013-11-14 00:24:31 +10:00
Nick Coghlan 8b097b4ed7 Close #17828: better handling of codec errors
- output type errors now redirect users to the type-neutral
  convenience functions in the codecs module
- stateless errors that occur during encoding and decoding
  will now be automatically wrapped in exceptions that give
  the name of the codec involved
2013-11-13 23:49:21 +10:00
Nick Coghlan d0cf0635b3 Close #19406: Initial implementation of ensurepip
Patch by Donald Stufft and Nick Coghlan
2013-11-11 22:11:55 +10:00
Nick Coghlan f4cb48a72b Issue #4331: Added functools.partialmethod
Initial patch by Alon Horev
2013-11-03 16:41:46 +10:00
Brett Cannon f6901c8baa Issue #19410: Put back in special-casing of '' for
importlib.machinery.FileFinder.

While originally moved to stop special-casing '' as PathFinder farther
up the typical call chain now uses the cwd in the instance of '', it
was deemed an unnecessary risk to breaking subclasses of FileFinder to
take the special-casing out.
2013-11-01 10:37:57 -04:00
Nick Coghlan 367df12044 Assorted 3.4 What's New updates
- cross-references and attributions for inspect changes
- note improvements to inspect and pydoc handling of
  metaclasses and dynamic attributes (courtesy of the
  enum PEP)
- group all CPython implementation specific changes
  into a common section
- add see also links for most of the PEPs
- fix the see also link for the release PEP
- add suitable caveats on Argument Clinic inclusion
- clarify the change to __wrapped__ handling
2013-10-27 01:57:34 +10:00
Antoine Pitrou 3b2f0f0459 Issue #19375: The site module adding a "site-python" directory to sys.path, if it exists, is now deprecated. 2013-10-25 21:39:26 +02:00
Victor Stinner 3dd263faab Close #19345: fix typo 2013-10-23 18:54:43 +02:00
Christian Heimes 086b1afa55 Issue #19344: fix markup error in whatsnew
Thanks to Marius Gedminas
2013-10-22 11:49:34 +02:00
Christian Heimes b7bd5df809 Issue #16595: Add prlimit() to resource module
prlimit() is a Linux specific command that combines setrlimit, getrlimit and can set the limit
of other processes.
2013-10-22 11:21:54 +02:00
Victor Stinner 6633c39af8 fix typo in what's new in 3.4 2013-10-21 13:27:11 +02:00
Christian Heimes e1bfd3e296 Fix typo in whatsnew 2013-10-21 12:32:21 +02:00
Christian Tismer 59202e5fc7 add a filterfunc to zip file.PyZipFile.writepy, issue 19274 2013-10-21 03:59:23 +02:00
Nick Coghlan 0acceb7697 What's New updates prior to alpha 2013-10-20 13:22:21 +10:00
Serhiy Storchaka eaea5e9107 Issue #12866: The audioop module now supports 24-bit samples. 2013-10-19 21:10:46 +03:00
Georg Brandl 0f5bff24ab Doc markup fixes. 2013-10-19 17:46:38 +02:00
Brett Cannon 27e27f7ee1 Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd
and stop importlib.machinery.FileFinder treating '' as '.'.

Previous PathFinder transformed '' into '.' which led to __file__ for
modules imported from the cwd to always be relative paths. This meant
the values of the attribute were wrong as soon as the cwd changed.
This change now means that as long as the site module is run (which
makes all entries in sys.path absolute) then all values for __file__
will also be absolute unless it's for __main__ when specified by file
path in a relative way (modules imported by runpy will have an
absolute path).

Now that PathFinder is no longer treating '' as '.' it only makes
sense for FileFinder to stop doing so as well. Now no transformation
is performed for the directory given to the __init__ method.

Thanks to Madison May for the initial patch.
2013-10-18 11:39:04 -04:00
Nick Coghlan 240f86d7dd Close #19266: contextlib.ignore -> contextlib.suppress
Patch by Zero Piraeus.
2013-10-17 23:40:57 +10:00
Nick Coghlan 7d270ee05d Issue #16129: Add `Py_SetStandardStreamEncoding`
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.

Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.

(Initial patch by Bastien Montagne)
2013-10-17 22:35:35 +10:00
R David Murray 3da240fd01 #18891: Complete new provisional email API.
This adds EmailMessage and, MIMEPart subclasses of Message
with new API methods, and a ContentManager class used by
the new methods.  Also a new policy setting, content_manager.

Patch was reviewed by Stephen J. Turnbull and Serhiy Storchaka,
and reflects their feedback.

I will ideally add some examples of using the new API to the
documentation before the final release.
2013-10-16 22:48:40 -04:00
Serhiy Storchaka 98b28fddd8 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:12:09 +03:00
Nick Coghlan e206b6e10e Issue #17827: document codecs.encode and codecs.decode
- Merge from 3.3
- Added to What's New since these are more important in 3.x,
  as the bytes<->bytes and str<->str codecs don't fit the
  text model convenience methods in 3.x the way they did the
  basestring<->basestring methods in the 2.x text model
- Included under Library in Misc/NEWS for the same reason
2013-10-14 00:55:46 +10:00
Nick Coghlan b4534ae704 Docs tweaks for contextlib additions 2013-10-13 23:23:08 +10:00
Eric V. Smith 57841ddb5c Grammar fix. 2013-10-13 00:36:08 -04:00
Christian Heimes 17ecd1d384 Document speedup in whatsnew 2013-10-13 03:10:06 +02:00
Christian Heimes e92ef13b0a Issue #18582: Add 'pbkdf2_hmac' to the hashlib module. 2013-10-13 00:52:43 +02:00
Ezio Melotti 34808e2237 #19221: update whatsnew entry about UCD version. 2013-10-12 16:36:13 +03:00
Georg Brandl c2228c8995 Markup fix. 2013-10-12 13:24:55 +02:00
R David Murray 78d692f98e 18764: remove the problematic 'print' alias for the PDB 'p' command.
So that it no longer shadows the print function.

Patch by Connor Osborn, doc and test changes by R. David Murray.
2013-10-10 17:23:26 -04:00
Victor Stinner 2fe9bac4dc Close #16742: Fix misuse of memory allocations in PyOS_Readline()
The GIL must be held to call PyMem_Malloc(), whereas PyOS_Readline() releases
the GIL to read input.

The result of the C callback PyOS_ReadlineFunctionPointer must now be a string
allocated by PyMem_RawMalloc() or PyMem_RawRealloc() (or NULL if an error
occurred), instead of a string allocated by PyMem_Malloc() or PyMem_Realloc().

Fixing this issue was required to setup a hook on PyMem_Malloc(), for example
using the tracemalloc module.

PyOS_Readline() copies the result of PyOS_ReadlineFunctionPointer() into a new
buffer allocated by PyMem_Malloc(). So the public API of PyOS_Readline() does
not change.
2013-10-10 16:18:20 +02:00
Victor Stinner 8d19767403 Close #19199: Remove ``PyThreadState.tick_counter`` field 2013-10-09 14:53:01 +02:00
Brett Cannon 1448ecf470 Issue #18716: Deprecate the formatter module 2013-10-04 11:38:59 -04:00
Serhiy Storchaka 7c411a4041 Issue #19132: The pprint module now supports compact mode. 2013-10-02 11:56:18 +03:00
Nick Coghlan f94a16b494 Close #18626: add a basic CLI for the inspect module 2013-09-22 22:46:49 +10:00
Nick Coghlan be57ab8a34 Close #19047: weakref doc cleanups
- be clear finalizers survive automatically
- update for PEP 442 __del__ changes
- mention module cleanup changes and weakref.finalize in What's New
2013-09-22 21:26:30 +10:00
Georg Brandl c6ebbef6bd One more markup fix. 2013-09-16 04:03:12 +02:00
Andrew Kuchling 173a157e72 #1565525: Add traceback.clear_frames() helper function to clear locals ref'd by a traceback 2013-09-15 18:15:56 -04:00
Raymond Hettinger 8408dc581e Issue 18771: Make it possible to set the number linear probes at compile-time. 2013-09-15 14:57:15 -07:00
Georg Brandl 5642ff9d8e Fixup reST syntax errors and streamline docs of PEP 446. 2013-09-15 10:37:57 +02:00
Eli Bendersky 96d848ace4 Update whatsnew/3.4 wrt. --version going to stdout. #18338, #18920, #18922 2013-09-06 06:55:58 -07:00
Serhiy Storchaka 34d201374c Issue #18878: sunau.open now supports the context manager protocol. Based on
patches by Claudiu Popa and R. David Murray.
2013-09-05 17:01:53 +03:00
Victor Stinner 4aea4a0c89 Issue #16853: Mention the new selectors module in What's New in Python 3.4 2013-09-04 20:30:34 +02:00
Charles-François Natali 243d8d85de Issue #16853: Add new selectors module. 2013-09-04 19:02:49 +02:00
Serhiy Storchaka e06a89655a Issue #18901: The sunau getparams method now returns a namedtuple rather than
a plain tuple.  Patch by Claudiu Popa.
2013-09-04 00:43:03 +03:00
Eli Bendersky 34567ec94b Update whatsnew/3.4.rst wrt. the socket constants switch to IntEnum
[issue #18730]
2013-08-31 15:18:48 -07:00
Eli Bendersky b586934f0e Issue #17741: Rename IncrementalParser and its methods.
The new names are hopefully more descriptive and consistent. If you feel you
don't agree with this change, *please* read issue 17741 first - there's a lot of
discussion in there.
2013-08-30 05:51:20 -07:00
Victor Stinner daf455554b Issue #18571: Implementation of the PEP 446: file descriptors and file handles
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
2013-08-28 00:53:59 +02:00
Andrew Kuchling 13aa7818ac Typo fix 2013-08-19 13:07:18 -04:00
Raymond Hettinger c301b55d7b Issue 18774: Update news and whatsnew for the set optimizations 2013-08-19 09:12:20 -07:00
Richard Oudkerk 84ed9a68bd Issue #8713: Support alternative start methods in multiprocessing on Unix.
See http://hg.python.org/sandbox/sbt#spawn
2013-08-14 15:35:41 +01:00
Antoine Pitrou 0c7907dd48 Remove duplicate text in 3.4 what's new (my bad) 2013-08-13 22:25:56 +02:00
Antoine Pitrou d6cbd34aad Sort whatsnew entries alphabetically 2013-08-12 20:48:15 +02:00
Antoine Pitrou f89aa9af3c Add whatsnew entries for 3.4. 2013-08-12 20:46:47 +02:00
Christian Heimes ad73a9cf97 Issue #16400: Add command line option for isolated mode.
-I

    Run Python in isolated mode. This also implies -E and -s. In isolated mode
    sys.path contains neither the script’s directory nor the user’s
    site-packages directory. All PYTHON* environment variables are ignored,
    too. Further restrictions may be imposed to prevent the user from
    injecting malicious code.
2013-08-10 16:36:18 +02:00
R David Murray bb17d2b857 #18600: add policy to add_string, and as_bytes and __bytes__ methods.
This was triggered by wanting to make the doctest in email.policy.rst pass;
as_bytes and __bytes__ are clearly useful now that we have BytesGenerator.
Also updated the Message docs to document the policy keyword that was
added in 3.3.
2013-08-09 16:15:28 -04:00
Serhiy Storchaka 9b855de8d2 Issue #14323: Expanded the number of digits in the coefficients for the
RGB -- YIQ conversions so that they match the FCC NTSC versions.
2013-08-06 11:51:23 +03:00
Victor Stinner 8580dab513 Hum, VMS code is still present 2013-08-04 10:32:26 +02:00
Victor Stinner f3fd13b5dd Complete What's New in Python 3.4 2013-08-04 10:30:57 +02:00
Antoine Pitrou a68cbfa556 Issue #18589: fix hyperlinking of type slots (tp_*) 2013-08-01 21:14:43 +02:00
Antoine Pitrou 39668f57f4 Issue #18589: fix hyperlinking of type slots (tp_*) 2013-08-01 21:12:45 +02:00
R David Murray c91d5eea10 #17616: wave.open now supports the 'with' statement.
Feature and tests by ClClaudiu.Popa, I added the doc changes.
2013-07-31 13:46:08 -04:00
Antoine Pitrou 796564c27b Issue #18112: PEP 442 implementation (safe object finalization). 2013-07-30 19:59:21 +02:00
Nick Coghlan e8c45d6d0e Close #13266: Add inspect.unwrap
Initial patch by Daniel Urban and Aaron Iles
2013-07-28 20:00:01 +10:00
R David Murray 4d35e75ca0 #17818: aifc.getparams now returns a namedtuple.
Patch by Claudiu Popa.
2013-07-25 16:12:01 -04:00
Nick Coghlan 24c05bc154 Close issue 17482: don't overwrite __wrapped__ 2013-07-15 21:13:08 +10:00
Victor Stinner 0507bf56f0 Issue #3329: Implement the PEP 445
Add new enum:

* PyMemAllocatorDomain

Add new structures:

* PyMemAllocator
* PyObjectArenaAllocator

Add new functions:

* PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
* PyMem_GetAllocator(), PyMem_SetAllocator()
* PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator()
* PyMem_SetupDebugHooks()

Changes:

* PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead
  of calling PyObject_Malloc()/PyObject_Realloc() in debug mode.
* PyObject_Malloc()/PyObject_Realloc() now falls back to
  PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes.
* Redesign debug checks on memory block allocators as hooks, instead of using C
  macros
2013-07-07 02:05:46 +02:00
Brett Cannon 679ecb565b Issue #15767: back out 8a0ed9f63c6e, finishing the removal of
ModuleNotFoundError.
2013-07-04 17:51:50 -04:00
Brett Cannon 82da8886cc Issue #15767: Revert 3a50025f1900 for ModuleNotFoundError 2013-07-04 17:48:16 -04:00
R David Murray 9a2f139ba0 #18111: Add What's New entry for max/min default. 2013-06-28 13:31:19 -04:00
R David Murray 5707d508e1 #11390: convert doctest CLI to argparse and add -o and -f options.
This provides a way to specify arbitrary doctest options when using
the CLI interface to process test files, just as one can when calling
testmod or testfile programmatically.
2013-06-23 14:24:13 -04:00
Christian Heimes c77d9f38c2 Issue #11016: Add C implementation of the stat module as _stat 2013-06-22 21:05:02 +02:00
Christian Heimes 70833a8b1f ... also TLSv1.1 and TLSv1.2 2013-06-22 19:34:17 +02:00
Christian Heimes 24cd4cfc58 Add my SSL module patches to whatsnew 3.4 2013-06-22 19:31:58 +02:00
Victor Stinner 854ffcb6f3 whatsnew/3.4: mention functools.singledispatch, PEP 443 2013-06-21 00:36:30 +02:00
Victor Stinner 84e33c8431 whatsnew/3.4: mention the new enum module, PEP 435 2013-06-21 00:31:55 +02:00
Brett Cannon f4375ef4d4 importlib.abc.SourceLoader.get_source() was re-raising SyntaxError and
UnicodeDecodeError as ImportError. That was over-reaching the point of
raising ImportError in get_source() (which is to signal the source
code was not found when it should have). Conflating the two exceptions
with ImportError could lead to masking errors with the source which
should be known outside of whether there was an error simply getting
the source to begin with.
2013-06-16 18:05:54 -04:00
Brett Cannon e4f41deccf Issue #17177: The imp module is pending deprecation.
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
2013-06-16 13:13:40 -04:00
Andrew Kuchling 0d0813a816 Fix typo; clarify that the methods were removed entirely 2013-06-15 13:29:09 -04:00
Brett Cannon 82b3d6ae93 Move something to the right section of What's New 2013-06-14 22:37:11 -04:00
Brett Cannon 33915eba7c Issue #17222: Raise FileExistsError when py_compile.compile would
overwrite a symlink or non-regular file with a regular file.
2013-06-14 18:33:00 -04:00
Brett Cannon 8f5ac5106e Issue #15767: Touch up ModuleNotFoundError usage by import.
Forgot to raise ModuleNotFoundError when None is found in sys.modules.
This led to introducing the C function PyErr_SetImportErrorSubclass()
to make setting ModuleNotFoundError easier.

Also updated the reference docs to mention ModuleNotFoundError
appropriately. Updated the docs for ModuleNotFoundError to mention the
None in sys.modules case.

Lastly, it was noticed that PyErr_SetImportError() was not setting an
exception when returning None in one case. That issue is now fixed.
2013-06-12 23:29:18 -04:00
Brett Cannon b1611e2772 Issue #15767: Introduce ModuleNotFoundError, a subclass of
ImportError.

The exception is raised by import when a module could not be found.
Technically this is defined as no viable loader could be found for the
specified module. This includes ``from ... import`` statements so that
the module usage is consistent for all situations where import
couldn't find what was requested.

This should allow for the common idiom of::

  try:
    import something
  except ImportError:
    pass

to be updated to using ModuleNotFoundError and not accidentally mask
ImportError messages that should propagate (e.g. issues with a
loader).

This work was driven by the fact that the ``from ... import``
statement needed to be able to tell the difference between an
ImportError that simply couldn't find a module (and thus silence the
exception so that ceval can raise it) and an ImportError that
represented an actual problem.
2013-06-12 16:59:46 -04:00
Brett Cannon 3e0651b5fa Issue #18065: For frozen packages set __path__ to [].
Previously __path__ was set to [__name__], but that could lead to bad
results if someone managed to circumvent the frozen importer and
somehow ended up with a finder that thought __name__ was a legit
directory/location.
2013-05-31 23:18:39 -04:00
Brett Cannon 0dbb4c7f13 Issues #18088, 18089: Introduce
importlib.abc.Loader.init_module_attrs() and implement
importlib.abc.InspectLoader.load_module().

The importlib.abc.Loader.init_module_attrs() method sets the various
attributes on the module being loaded. It is done unconditionally to
support reloading. Typically people used
importlib.util.module_for_loader, but since that's a decorator there
was no way to override it's actions, so init_module_attrs() came into
existence to allow for overriding. This is also why module_for_loader
is now pending deprecation (having its other use replaced by
importlib.util.module_to_load).

All of this allowed for importlib.abc.InspectLoader.load_module() to
be implemented. At this point you can now implement a loader with
nothing more than get_code() (which only requires get_source();
package support requires is_package()). Thanks to init_module_attrs()
the implementation of load_module() is basically a context manager
containing 2 methods calls, a call to exec(), and a return statement.
2013-05-31 18:56:47 -04:00
Brett Cannon 028d51236a Update What's New for importlib.util.module_to_load name change 2013-05-31 18:02:11 -04:00
Brett Cannon 3dc48d6f69 Issue #18070: importlib.util.module_for_loader() now sets __loader__
and __package__ unconditionally in order to do the right thing for
reloading.
2013-05-28 18:35:54 -04:00
Nick Coghlan b39fd0c9b8 Issue #11816: multiple improvements to the dis module
* get_instructions generator
* ability to redirect output to a file
* Bytecode and Instruction abstractions

Patch by Nick Coghlan, Ryan Kelly and Thomas Kluyver.
2013-05-06 23:59:20 +10:00
Brett Cannon 4c14b5de1c #17115,17116: Have modules initialize the __package__ and __loader__
attributes to None.

The long-term goal is for people to be able to rely on these
attributes existing and checking for None to see if they have been
set. Since import itself sets these attributes when a loader does not
the only instances when the attributes are None are from someone
overloading __import__() and not using a loader or someone creating a
module from scratch.

This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
2013-05-04 13:56:58 -04:00
R David Murray 8a34596bbe #2118: IOError is deprecated, use OSError. 2013-04-14 06:46:35 -04:00
R David Murray 8e37d5df95 #2118: Make SMTPException a subclass of IOError.
Initial patch by Ned Jackson Lovely.
2013-04-13 14:49:48 -04:00