Commit Graph

6311 Commits

Author SHA1 Message Date
Ned Deily 5fddf866d8 Issue #14662: Prevent shutil failures on OS X when destination does not
support chflag operations.  (Patch by Hynek Schlawack)
2012-05-10 17:21:23 -07:00
Ned Deily baf75713c7 Issue #14662: Prevent shutil failures on OS X when destination does not
support chflag operations.  (Patch by Hynek Schlawack)
2012-05-10 17:05:19 -07:00
Antoine Pitrou e8751e05d9 Issue #14157: Fix time.strptime failing without a year on February 29th.
Patch by Hynek Schlawack.
2012-05-10 20:18:46 +02:00
Antoine Pitrou 1682e5d740 Issue #14157: Fix time.strptime failing without a year on February 29th.
Patch by Hynek Schlawack.
2012-05-10 20:17:46 +02:00
Richard Oudkerk 59d5404bc7 Issue #14753: Make multiprocessing treat negative timeouts as it did in 3.2
In Python 3.2 and earlier, Process.join() and Connection.poll()
treated negative timeouts as zero timeouts.  Earlier versions from
the 3.3 line of development treat them as infinite timeouts.

The patch reverts to the old behaviour.
2012-05-10 16:11:12 +01:00
Antoine Pitrou ca5f91b888 Issue #14738: Speed-up UTF-8 decoding on non-ASCII data. Patch by Serhiy Storchaka. 2012-05-10 16:36:02 +02:00
Jesus Cea b58ab2c6aa MERGE: Closes #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/' 2012-05-10 05:16:41 +02:00
Jesus Cea 7f0d88860f Closes #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/' 2012-05-10 05:10:50 +02:00
Antoine Pitrou d576c711a5 Issue #14761: Fix potential leak on an error case in the import machinery. 2012-05-09 13:24:31 +02:00
Antoine Pitrou 6efa50a384 Issue #14583: Fix importlib bug when a package's __init__.py would first import one of its modules then raise an error. 2012-05-07 21:41:59 +02:00
Mark Dickinson 943cab2fec Issue #14741: Merge fix from 3.2. 2012-05-07 17:25:14 +01:00
Mark Dickinson da029fb293 Issue #14741: Fix missing support for ellipsis in parser module. 2012-05-07 17:24:04 +01:00
Mark Dickinson 72f6095d4f Issue #14697: Merge fix from 3.2. 2012-05-07 16:36:33 +01:00
Mark Dickinson 11c1dee183 Issue #14697: Fix missing parser module support for set displays and set comprehensions. 2012-05-07 16:34:34 +01:00
Mark Dickinson cf360b9209 Issue #14701: Add missing support for 'raise ... from' in parser module. 2012-05-07 12:01:27 +01:00
Mark Dickinson 9fad160411 Issue #14701: Merge fix from 3.2. 2012-05-07 12:03:11 +01:00
Mark Dickinson 99e2e5552a Issue #14700: Fix two broken and undefined-behaviour-inducing overflow checks in old-style string formatting. Thanks Serhiy Storchaka for report and original patch. 2012-05-07 11:20:50 +01:00
Mark Dickinson 43d6ddc80f Merge Misc/NEWS issue number fix from 3.2 2012-05-07 10:25:56 +01:00
Mark Dickinson 640335c61f Fix issue number in Misc/NEWS. 2012-05-07 10:24:02 +01:00
Richard Oudkerk d30c5d5c9d Add Misc/NEWS entry for rev b4a1d9287780 2012-05-07 00:12:02 +01:00
Mark Dickinson fe8440aec0 Issue #14965: Bring Tools/parser/unparse.py up to date with the Python 3.3. Grammar. 2012-05-06 17:35:19 +01:00
Mark Dickinson 1b2e9444fe Issue #14965: Fix missing support for starred assignments in Tools/parser/unparse.py. 2012-05-06 17:27:39 +01:00
Ezio Melotti df5bedbf88 #14034: merge argparse tutorial from 3.2. 2012-05-06 16:34:43 +03:00
Ezio Melotti 6cc7a41c2f #14034: added the argparse tutorial. Patch by Tshepang Lekhonkhobe. 2012-05-06 16:15:35 +03:00
Nadeem Vawda 7e126205e6 Closes #13989: Add support for text modes to gzip.open().
Also, add tests for gzip.open().
2012-05-06 15:04:01 +02:00
Georg Brandl 88b95f9105 Fix some rst errors in NEWS. 2012-05-06 11:24:06 +02:00
Georg Brandl 85a2394467 Post-3.3a3 bump. 2012-05-06 11:20:09 +02:00
Larry Hastings d9728b5932 Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) 2012-05-05 21:57:17 -07:00
Lars Gustäbel 7a919e9930 Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects.
The ExFileObject class was removed, some of its code went into _FileInFile.
2012-05-05 18:15:03 +02:00
Benjamin Peterson 8fbd295458 merge 3.2 (#14699) 2012-05-01 09:51:46 -04:00
Benjamin Peterson 7295c6a871 fix calling the classmethod descriptor directly (closes #14699) 2012-05-01 09:51:09 -04:00
Georg Brandl ab0ef20663 Bump to 3.3.0a3. 2012-05-01 09:35:18 +02:00
Martin v. Löwis f6b16a4b50 Issue #14371: Support bzip2 in zipfile module.
Patch by Serhiy Storchaka.
2012-05-01 07:58:44 +02:00
Senthil Kumaran 417c3848d5 issue13183 - Fix pdb skipping frames after hitting a breakpoint and running step. Patch by Xavier de Gaye 2012-05-01 10:37:11 +08:00
Senthil Kumaran 42d7081806 issue13183 - Fix pdb skipping frames after hitting a breakpoint and running step. Patch by Xavier de Gaye 2012-05-01 10:07:49 +08:00
Martin v. Löwis ce58ed3e7c Merge with 3.2: issue #14433 2012-04-30 06:20:37 +02:00
Martin v. Löwis e654c11f56 Issue #14433: Prevent msvcrt crash in interactive prompt when stdin is closed. 2012-04-30 06:10:41 +02:00
Mark Dickinson 57404891a0 Issue #14696: Merge from 3.2 2012-04-29 22:20:01 +01:00
Mark Dickinson 407b3bd89b Issue #14696: Fix parser module to understand 'nonlocal' declarations. 2012-04-29 22:18:31 +01:00
Alexander Belopolsky 5a38f80f9c Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near
the DST transition.  Patch by Joe Peterson.
2012-04-29 16:12:27 -04:00
Alexander Belopolsky 2420d83158 Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near
the DST transition.  Patch by Joe Peterson.
2012-04-29 15:56:49 -04:00
Mark Dickinson b63fd2a408 Issue #9154: Merge fix from 3.2. 2012-04-29 18:35:56 +01:00
Mark Dickinson ea7e9f9a83 Issue #9154: Fix parser module to understand function annotations. 2012-04-29 18:34:40 +01:00
Mark Dickinson e383e82e04 Issue #14521: Make result of float('nan') and float('-nan') more consistent across platforms. Further, don't rely on Py_HUGE_VAL for float('inf'). 2012-04-29 15:31:56 +01:00
Senthil Kumaran 1aacba497b Fix Issue6085 - SimpleHTTPServer address_string to return client ip instead of client hostname 2012-04-29 12:51:54 +08:00
Victor Stinner 47620a6611 Close #14309: Deprecate time.clock()
Use time.perf_counter() or time.process_time() instead.
2012-04-29 02:52:39 +02:00
Victor Stinner ec89539ccc Issue #14428, #14397: Implement the PEP 418
* Rename time.steady() to time.monotonic()
 * On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of
   QueryPerformanceCounter()
 * time.monotonic() uses CLOCK_HIGHRES if available
 * Add time.get_clock_info(), time.perf_counter() and time.process_time()
   functions
2012-04-29 02:41:27 +02:00
Brett Cannon efad00d520 Issue #14646: __import__() now sets __loader__ if need be.
importlib.util.module_for_loader also will set __loader__ along with
__package__. This is in conjunction to a forthcoming update to PEP 302
which will make these two attributes required for loaders to set.
2012-04-27 17:27:14 -04:00
Brett Cannon aa93642a35 Issue #14605: Use None in sys.path_importer_cache to represent no
finder instead of using some (now non-existent) implicit finder.
2012-04-27 15:30:58 -04:00
Brett Cannon ce418b448f Issue #14605: Stop having implicit entries for sys.meta_path.
ImportWarning is raised if sys.meta_path is found to be empty.
2012-04-27 14:01:58 -04:00
Martin v. Loewis cfc1cc2996 Issue #14642: Add "hg touch" extension, and "make touch" target. 2012-04-27 16:10:21 +02:00
Jesus Cea 990eff0776 Backing out 86dc014cdd74. Not ready yet 2012-04-26 17:05:31 +02:00
Jesus Cea 2b47f0a23f Close #10142: Support for SEEK_HOLE/SEEK_DATA 2012-04-26 16:39:35 +02:00
Brett Cannon e0d88a173c Issue #14605: Make explicit the entries on sys.path_hooks that used to
be implicit.

Added a warning for when sys.path_hooks is found to be empty. Also
changed the meaning of None in sys.path_importer_cache to represent
trying sys.path_hooks again (an interpretation of previous semantics).
Also added a warning for when None was found.

The long-term goal is for None in sys.path_importer_cache to represent
the same as imp.NullImporter: no finder found for that sys.path entry.
2012-04-25 20:54:04 -04:00
Brian Curtin ae7758457f Fix #3561. Add an option to place the Python installation into the Windows Path environment variable. 2012-04-25 08:12:37 -05:00
Antoine Pitrou f99983dacb Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a test class that doesn't inherit from TestCase (i.e. a mixin). 2012-04-25 14:58:17 +02:00
Antoine Pitrou b05ac864f0 Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a test class that doesn't inherit from TestCase (i.e. a mixin). 2012-04-25 14:56:46 +02:00
Marc-Andre Lemburg 4fe29c9657 Issue #14605: Rename _SourcelessFileLoader to SourcelessFileLoader.
This time also recreating the Python/importlib.h file to make
make happy. See the ticket for details.
2012-04-25 02:31:37 +02:00
Marc-Andre Lemburg ac8805a01a Issue #14605: Revert renaming of _SourcelessFileLoader, since it caused
the buildbots to fail.
2012-04-25 02:11:07 +02:00
Marc-Andre Lemburg 2945e78b05 Issue #14605: Rename _SourcelessFileLoader to SourcelessFileLoader 2012-04-25 01:36:48 +02:00
Antoine Pitrou 5438ed1572 Issue #4892: multiprocessing Connections can now be transferred over multiprocessing Connections.
Patch by Richard Oudkerk (sbt).
2012-04-24 22:56:57 +02:00
Lars Gustäbel 9f478c021d Merge with 3.2: Issue #14160: TarFile.extractfile() failed to resolve symbolic
links when the links were not located in an archive subdirectory.
2012-04-24 21:09:17 +02:00
Lars Gustäbel 1ef9eda7bc Issue #14160: TarFile.extractfile() failed to resolve symbolic links
when the links were not located in an archive subdirectory.
2012-04-24 21:04:40 +02:00
Benjamin Peterson 42f58818d6 merge 3.2 (#14658) 2012-04-24 11:09:20 -04:00
Benjamin Peterson 7b1668735a don't use a slot wrapper from a different special method (closes #14658)
This also alters the fix to #11603. Specifically, setting __repr__ to
object.__str__ now raises a recursion RuntimeError when str() or repr() is
called instead of silently bypassing the recursion. I believe this behavior is
more correct.
2012-04-24 11:06:25 -04:00
R David Murray a82c960c17 merge #14638: pydoc now treats non-str __name__ as None instead of raising
Original patch by Peter Otten.
2012-04-23 13:26:44 -04:00
R David Murray c43125a05c #14638: pydoc now treats non-str __name__ as None instead of raising
Original patch by Peter Otten.
2012-04-23 13:23:57 -04:00
Senthil Kumaran 976db921b8 news for issue13684 2012-04-23 23:55:50 +08:00
Senthil Kumaran 88ec6209cf news for issue13684 2012-04-23 23:53:16 +08:00
Benjamin Peterson 7d95e40721 Implement PEP 412: Key-sharing dictionaries (closes #13903)
Patch from Mark Shannon.
2012-04-23 11:24:50 -04:00
Brett Cannon 938d44d59c Issue #14605: Expose importlib.abc.FileLoader and
importlib.machinery.(FileFinder, SourceFileLoader,
_SourcelessFileLoader, ExtensionFileLoader).

This exposes all of importlib's mechanisms that will become public on
the sys module.
2012-04-22 19:58:33 -04:00
Nick Coghlan 243994dc21 Resolve #14026 (Merge from 3.2) 2012-04-22 17:16:39 +10:00
Nick Coghlan 37fc401188 Close issue #14026 by better testing sys.argv handling in test_cmd_line_script (patch by Jason Yeo) 2012-04-22 17:11:33 +10:00
Brett Cannon ce9bb9eaa0 Mention the backwards-incompatible change to imp.cache_from_source()/source_from_cache(). 2012-04-22 02:08:59 -04:00
Senthil Kumaran 3a441c1bed Fix Issue2193 - Allow ":" character in Cookie NAME values 2012-04-22 09:19:04 +08:00
Mark Dickinson 9a359bd97f Issue #14630: Merge fix from 3.2. 2012-04-20 21:44:09 +01:00
Mark Dickinson bcc17eefd2 Issue #14630: Fix an incorrect access of ob_digit[0] for a zero instance of an int subclass. 2012-04-20 21:42:49 +01:00
Mark Dickinson e28465482c Issue #14339: Improve speed of bin, oct and hex builtins. Patch by Serhiy Storchaka (with minor modifications). 2012-04-20 21:21:24 +01:00
Brett Cannon c33f3f2339 Issue #14629: Mention the filename in SyntaxError exceptions from
tokenizer.detect_encoding() (when available).
2012-04-20 13:23:54 -04:00
Martin v. Löwis 63c39fe38e merge 3.2: issue 14629 2012-04-20 14:37:17 +02:00
Martin v. Löwis 63674f4b52 Issue #14629: Raise SyntaxError in tokenizer.detect_encoding
if the first two lines have non-UTF-8 characters without an encoding declaration.
2012-04-20 14:36:47 +02:00
Antoine Pitrou dd5aa36f17 Issue #14308: Fix an exception when a dummy thread is in the threading module's active list after a fork(). 2012-04-20 00:05:17 +02:00
Antoine Pitrou 8e6e0fdb7f Issue #14308: Fix an exception when a "dummy" thread is in the threading module's active list after a fork(). 2012-04-19 23:55:01 +02:00
Martin v. Löwis aa2efcb0bc Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
Patch by Stefan Behnel.
2012-04-19 14:33:43 +02:00
Nick Coghlan e27b3608ef Merge from 3.2 2012-04-19 22:22:37 +10:00
Nick Coghlan 10ac77d2d8 Close #14032: fix incorrect variable reference in test_cmd_line_script 2012-04-19 22:19:36 +10:00
Ezio Melotti dea6c21a9c #14538: merge with 3.2. 2012-04-18 19:36:03 -06:00
Ezio Melotti 0780b6bc58 #14538: HTMLParser can now parse correctly start tags that contain a bare /. 2012-04-18 19:18:22 -06:00
Victor Stinner b0b224233e Issue #14385: Support other types than dict for __builtins__
It is now possible to use a custom type for the __builtins__ namespace, instead
of a dict. It can be used for sandboxing for example.  Raise also a NameError
instead of ImportError if __build_class__ name if not found in __builtins__.
2012-04-19 00:57:45 +02:00
Antoine Pitrou 23bba4ca39 Issue #11750: The Windows API functions scattered in the _subprocess and
_multiprocessing.win32 modules now live in a single module "_winapi".
Patch by sbt.
2012-04-18 20:51:15 +02:00
Benjamin Peterson 447f0cc386 merge 3.2 2012-04-18 11:26:02 -04:00
Benjamin Peterson 2c1414661d improve 2012-04-18 11:25:12 -04:00
Benjamin Peterson 6e3358a1d5 merge 3.2 (#14612) 2012-04-18 11:19:00 -04:00
Benjamin Peterson e42fb307ed SETUP_WITH acts like SETUP_FINALLY for the purposes of setting f_lineno (closes #14612) 2012-04-18 11:14:31 -04:00
Benjamin Peterson d76bc7abac rollback 005fd1fe31ab (see #14609 and #14582)
Being able to overload a sys.module entry during import of a module was broken
by this changeset.
2012-04-18 10:55:43 -04:00
Brett Cannon 03c7ed1580 Merge 2012-04-17 21:42:07 -04:00
Brett Cannon 7bd329d800 Issue #12599: Be more strict in accepting None vs. a false-like object
in importlib.

Thanks to PJE for pointing out the issue and Nick Coghlan for filing
the bug.
2012-04-17 21:41:35 -04:00
Benjamin Peterson 2a1fdc4c76 merge 3.2 (#14607) 2012-04-17 19:54:35 -04:00
Benjamin Peterson 32c59b6fc1 mangle keyword-only argname when loading defaults (closes #14607) 2012-04-17 19:53:21 -04:00
Brett Cannon 273323cf68 Issue #14592: A relative import will raise a KeyError if __package__
or __name__ are not set in globals.

Thanks to Stefan Behnel for the bug report.
2012-04-17 19:05:11 -04:00
Charles-François Natali c8ce715a82 Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt. 2012-04-17 18:45:57 +02:00
Brett Cannon 75babfa886 Add an explicit mention of a backwards-incompatible fix that importlib implicitly fixed. 2012-04-16 11:35:55 -04:00
Vinay Sajip b4e59e9dc1 Closes #14452: remove BOM insertion code. 2012-04-16 14:44:31 +01:00
Vinay Sajip ee9e485c21 Closes #14452: remove BOM insertion code. 2012-04-16 14:39:53 +01:00
Brian Curtin b206a80dab Fix #10854. Make use of the new path and name attributes on ImportError
for extension modules on Windows.
2012-04-16 00:10:17 -05:00
Antoine Pitrou d15e6a32c4 Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl. 2012-04-16 03:37:35 +02:00
Antoine Pitrou aa292f91bb Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl. 2012-04-16 03:34:44 +02:00
Victor Stinner 0db176f8f6 Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType 2012-04-16 00:16:30 +02:00
Brett Cannon 8a1d04c643 Issue #13959: Simplify imp.reload() by relying on a module's
__loader__.

Since import now sets __loader__ on all modules it creates and
imp.reload() already relied on the attribute for modules that import
didn't create, the only potential compatibility issue is if people
were deleting the attribute on modules and expecting imp.reload() to
continue to work.
2012-04-15 17:56:09 -04:00
Brett Cannon 6f44d66bc4 Issue #13959: Rename imp to _imp and add Lib/imp.py and begin
rewriting functionality in pure Python.

To start, imp.new_module() has been rewritten in pure Python, put into
importlib (privately) and then publicly exposed in imp.
2012-04-15 16:08:47 -04:00
Brett Cannon 881535b726 Issue #14582: Import returns the module returned by a loader instead
of sys.modules when possible.

This is being done for two reasons. One is to gain a little bit of
performance by skipping an unnecessary dict lookup in sys.modules. But
the other (and main) reason is to be a little bit more clear in how
things should work from the perspective of import's interactions with
loaders. Otherwise loaders can easily forget to return the module even
though PEP 302 explicitly states they are expected to return the module
they loaded.
2012-04-15 15:24:04 -04:00
Mark Dickinson da4210f77d Issue #13496: Merge from 3.2 2012-04-15 16:32:04 +01:00
Mark Dickinson a13b109bc0 Issue 13496: Fix bisect.bisect overflow bug for large collections. 2012-04-15 16:30:35 +01:00
Mark Dickinson b0f00476a0 Issue #13889: Merge fix from 3.2. 2012-04-15 15:12:37 +01:00
Mark Dickinson 18e3d81f96 Issue #13889: On MSVC builds, set FPU control word at runtime for all string <-> float conversions. Patch by Samuel Iseli and Stefan Krah. 2012-04-15 15:10:56 +01:00
Kristján Valur Jónsson 69c635266e Issue #10576: Add a progress callback to gcmodule 2012-04-15 11:41:32 +00:00
Brett Cannon fd0741555b Issue #2377: Make importlib the implementation of __import__().
importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().
2012-04-14 14:10:13 -04:00
R David Murray 2c4efa871e Merge #14399: corrected news item 2012-04-13 21:27:19 -04:00
R David Murray 650dfaf5c4 #14399: corrected news item 2012-04-13 21:24:27 -04:00
Brett Cannon a29629f632 NEWS entry about importlib and ImportError's new attributes. 2012-04-12 21:12:37 -04:00
Brett Cannon 79ec55e980 Issue #1559549: Add 'name' and 'path' attributes to ImportError.
Currently import does not use these attributes as they are planned
for use by importlib (which will be another commit).

Thanks to Filip Gruszczyński for the initial patch and Brian Curtin
for refining it.
2012-04-12 20:24:54 -04:00
R David Murray f50b38a11f Merge #14399: zipfile now correctly handles comments added to empty zipfiles.
Patch by Serhiy Storchaka.

This also moves the TypeError that results from trying to use a unicode
comment from the 'close' step to the point at which the comment is added to
the zipfile.
2012-04-12 18:44:58 -04:00
R David Murray 51804e9725 #14399: zipfile now correctly handles comments added to empty zipfiles.
Patch by Serhiy Storchaka.

This also moves the TypeError that results from trying to use a unicode
comment from the 'close' step to the point at which the comment is added to
the zipfile.
2012-04-12 18:44:42 -04:00
Charles-François Natali 515ea9bd65 Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban. 2012-04-12 19:09:00 +02:00
Charles-François Natali 5739e102dd Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban. 2012-04-12 19:07:25 +02:00
Georg Brandl a51497ab86 Merge 3.2.3 release clone. 2012-04-11 12:46:24 +02:00
Brett Cannon 9fe92d1de5 Make the trace module ignore modules whose names start with "<" and
end with ">", i.e. follow convention.
2012-04-10 21:05:53 -04:00
Antoine Pitrou 126aef768d Issue #8799: Fix and improve the threading.Condition documentation. 2012-04-10 22:24:05 +02:00
Georg Brandl 470f33f50b News entry for f91ecbc8bafc. 2012-04-10 19:27:27 +02:00
Stefan Krah 0c0914edb0 _decimal is now 100x faster than the Python version in the pi benchmark. 2012-04-09 20:31:15 +02:00
Antoine Pitrou 1584ae3987 Issue #13165: stringbench is now available in the Tools/stringbench folder.
It used to live in its own SVN project.
2012-04-09 17:03:32 +02:00
R David Murray 78fc25c77f #14533: if a test has no test_main, use loadTestsFromModule.
This moves us further in the direction of using normal unittest facilities
instead of specialized regrtest ones.  Any test module that can be correctly
run currently using 'python unittest -m test.test_xxx' can now be converted to
use normal unittest test loading by simply deleting its test_main, thus no
longer requiring manual maintenance of the list of tests to run.  (Not all
tests can be converted that easily, since test_main sometimes does some
additional things (such as reap_children or reap_threads).  In those cases the
extra code may be moved to setUpModule/tearDownModule methods, or perhaps the
same ends can be achieved in a different way, such as moving the decorators to
the test classes that need them, etc.)

I don't advocate going through and making this change wholesale, but any time
a list of tests in test_main would otherwise need to be updated, consideration
should instead be given to deleting test_main.
2012-04-09 08:55:42 -04:00
R David Murray b019ee752a #12537: in mailbox avoid depending on knowledge of email package internals
Previously mailbox was copying a list of attributes from one message object to
another in order to "copy the message data".  This means that any time new
attributes were added to email.message.Message, mailbox broke.  Now instead it
copies all attributes from the source object to the target object, skipping
any mailbox-object-specific attributes to produce the same clean initial
state it was previously getting by copying only the "known" attributes.

David Lam assisted in the development of this patch.
2012-04-08 22:36:07 -04:00
Antoine Pitrou c9e8e3c4dd Issue #7978: socketserver now restarts the select() call when EINTR is returned.
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.
2012-04-09 00:49:17 +02:00
Antoine Pitrou b0a9c66a49 Issue #7978: socketserver now restarts the select() call when EINTR is returned.
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.
2012-04-09 00:47:24 +02:00
Antoine Pitrou df97cbe7a1 Issue #14522: Avoid duplicating socket handles in multiprocessing.connection.
Patch by sbt.
2012-04-07 22:38:52 +02:00
Kristján Valur Jónsson 10f383a937 Issue #14310: inter-process socket duplication for windows 2012-04-07 11:23:31 +00:00
Ross Lagerwall 0f9eec19ee Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
Found with Clang's Static Analyzer.
2012-04-07 07:09:57 +02:00
Andrew Svetlov dfe980bb82 Issue #8515: Set __file__ when run file in IDLE. 2012-04-05 21:54:39 +03:00
Andrew Svetlov 73d2da4209 Merge from 3.2 2012-04-05 17:04:28 +03:00
Andrew Svetlov 1024541a0d Issue #14496: Fix wrong name in idlelib/tabbedpages.py.
Patch by Popa Claudiu.
2012-04-05 16:58:05 +03:00
Andrew Svetlov 20bbf54f5e Issue #3033: Add displayof parameter to tkinter font.
Patch by Guilherme Polo.
2012-04-05 12:41:20 +03:00
Éric Araujo 4f61a2dbde A few tweaks to whatsnew/3.3 (fixes #14362) 2012-04-04 23:01:01 -04:00
Matthias Klose da80b1eb2f - Issue #14493: Use gvfs-open/xdg-open in Lib/webbrowser.py. 2012-04-04 14:19:04 +02:00
Antoine Pitrou 5c73e8eaf4 Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows.  Patch by Popa Claudiu.
2012-04-03 20:13:45 +02:00
Antoine Pitrou 6d20cba8d6 Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows.  Patch by Popa Claudiu.
2012-04-03 20:12:23 +02:00
Kristján Valur Jónsson 8f639e0375 Issue #14288: Modify Misc/NEWS 2012-04-03 10:59:26 +00:00
Andrew Svetlov 39f0037735 Issue #802310: Generate always unique tkinter font names if not directly passed 2012-04-03 09:48:07 +03:00
Kristján Valur Jónsson 2247775bfa Merge with 3.2 (Issue #14471) 2012-04-02 15:41:06 +00:00
Benjamin Peterson dba1b40b60 merge 3.2 2012-04-02 11:28:49 -04:00
Kristján Valur Jónsson 984dfa7eed Issue #14471: Fix a possible buffer overrun in the winreg module. 2012-04-02 15:23:29 +00:00
Benjamin Peterson e900096dc4 prevent writing to stderr from messing up the exception state (closes #14474) 2012-04-02 11:15:17 -04:00
Georg Brandl f4228b0e6a Merge. 2012-04-02 07:52:29 +02:00
Georg Brandl d3fca8e07f Post-release update. 2012-04-02 07:51:45 +02:00
Antoine Pitrou 93bba8fb8a Issue #14151: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms.  Patch by Popa Claudiu.
2012-04-01 17:25:49 +02:00
Antoine Pitrou 709176f10c Issue #14151: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms.  Patch by Popa Claudiu.
2012-04-01 17:19:09 +02:00
Antoine Pitrou 29b964d0dd Issue #13019: Fix potential reference leaks in bytearray.extend().
Patch by Suman Saha.
2012-04-01 16:08:11 +02:00
Antoine Pitrou 58bb82e7b4 Issue #13019: Fix potential reference leaks in bytearray.extend().
Patch by Suman Saha.
2012-04-01 16:05:46 +02:00
Georg Brandl 50af011ca6 Bump to 3.3.0a2. 2012-04-01 13:49:21 +02:00
Antoine Pitrou 9a54a260de Issue #14300: Under Windows, sockets created using socket.dup() now allow overlapped I/O.
Patch by sbt.
2012-04-01 01:14:39 +02:00
Antoine Pitrou 8315f96764 Issue #13872: socket.detach() now marks the socket closed (as mirrored in the socket repr()).
Patch by Matt Joiner.
2012-04-01 01:00:55 +02:00
Antoine Pitrou 70deb3de39 Issue #13872: socket.detach() now marks the socket closed (as mirrored in the socket repr()).
Patch by Matt Joiner.
2012-04-01 01:00:17 +02:00
Antoine Pitrou 6211b88161 Issue #14437: Fix building the _io module under Cygwin. 2012-03-31 23:50:31 +02:00
Antoine Pitrou 8b34b53c52 Issue #14406: Fix a race condition when using `concurrent.futures.wait(return_when=ALL_COMPLETED)`.
Patch by Matt Joiner.
2012-03-31 20:25:22 +02:00
Antoine Pitrou f70401e842 Issue #14406: Fix a race condition when using `concurrent.futures.wait(return_when=ALL_COMPLETED)`.
Patch by Matt Joiner.
2012-03-31 20:23:30 +02:00
Andrew Svetlov 29e665dbda fix typo 2012-03-31 19:44:18 +03:00
Andrew Svetlov 9e892bbf28 fix issue #5136: deprecate old unused functions from tkinter.
These functions are not documnted, so no documentation update.
2012-03-31 19:36:39 +03:00
Kristján Valur Jónsson d4bb972839 Issue #14435: Add Misc/NEWS and Misc/ACKS 2012-03-31 13:08:11 +00:00
Andrew Svetlov 78a0f208cc Merge from 3.2 2012-03-31 14:20:19 +03:00
Andrew Svetlov f3c297675d update NEWS as Terry Reedy proposed 2012-03-31 14:10:10 +03:00
Andrew Svetlov d3cebd790d Merge with 3.2 2012-03-29 19:50:46 +03:00
Ross Lagerwall 86407432d5 Issue #14442: Add missing errno import in test_smtplib. 2012-03-29 18:08:48 +02:00
Andrew Svetlov 67ac079203 Issue #14409: IDLE doesn't not execute commands from shell with default keybinding for <Return>.
Patch by Roger Serwy.
2012-03-29 19:01:28 +03:00
R David Murray eac0939ddd #14416: conditionally add LOG_AUTHPRIV facility and LOG_ODELAY to syslog.
Unlike the other facilities, we don't use a fallback for AUTHPRIV if it
doesn't exist.  Because it is intended for logging sensitive log messages, it
is better that a program trying to log such messages fail than that it log
them insecurely.

Initial patch by Federico Reghenzani.
2012-03-29 07:15:45 -04:00
Éric Araujo 1641bb7669 Fix typo 2012-03-26 23:35:31 -04:00
Andrew Svetlov d543f2b8b0 IDLE can be launched as python -m ildelib 2012-03-26 22:11:46 +03:00
Michael Foord 313f85f0ca unittest.mock.MagicMock objects are now unorderable by default 2012-03-25 18:16:07 +01:00
Stefan Krah 60187b5ee5 Issue #7652: Enable linking of _decimal.so against an installed libmpdec. 2012-03-23 19:06:27 +01:00
R David Murray 8680bcc5db #14380: Have MIMEText defaults to utf-8 when passed non-ASCII unicode
Previously it would just accept the unicode, which would wind up as unicode in
the transfer-encoded message object, which is just wrong.

Patch by Jeff Knupp.
2012-03-22 22:17:51 -04:00
Giampaolo Rodola' f4ce1146fc fix #10340: properly handle EINVAL on OSX and also avoid to call handle_connect() in case of a disconnetected socket which is not meant to connect. 2012-03-22 16:24:33 +01:00
Giampaolo Rodola' 4a65b0a355 issue 10340 - forgot to update Misc/NEWS 2012-03-22 16:22:06 +01:00
Antoine Pitrou d0acb411ef Issue #14387: Do not include accu.h from Python.h. 2012-03-22 14:42:18 +01:00
Antoine Pitrou 0197ff97d0 Issue #14387: Do not include accu.h from Python.h. 2012-03-22 14:38:16 +01:00
Benjamin Peterson 98ba753432 merge 3.2 (#14378) 2012-03-22 08:19:50 -04:00
Benjamin Peterson a4e4e35783 check by equality for __future__ not identity (closes #14378) 2012-03-22 08:19:04 -04:00
Georg Brandl 96ad2619b2 Fix typo. 2012-03-22 07:42:31 +01:00
Antoine Pitrou d5d17eb653 Issue #14204: The ssl module now has support for the Next Protocol Negotiation extension, if available in the underlying OpenSSL library.
Patch by Colin Marc.
2012-03-22 00:23:03 +01:00
Andrew Svetlov a966c6fddb Issue #3035: Unused functions from tkinter are marked as pending peprecated. 2012-03-21 23:52:59 +02:00
R David Murray 1da08e77df Merge #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v 2012-03-21 14:55:04 -04:00
R David Murray e112153727 #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v 2012-03-21 14:53:42 -04:00
Stefan Krah 1919b7e72b Issue #7652: Integrate the decimal floating point libmpdec library to speed
up the decimal module. Performance gains of the new C implementation are
between 12x and 80x, depending on the application.
2012-03-21 18:25:23 +01:00
Andrew Svetlov 206d2a43a3 Merge from 3.2 for issue #3573, fix Misc/NEWS as Ned Deily guess. 2012-03-21 13:31:12 +02:00
Andrew Svetlov 0f71f44156 #3573: idle now doesn't hungs if launched as: idle -e <directory>
Patch by Guilherme Polo.
2012-03-21 13:23:41 +02:00
Andrew Svetlov 6b6e437626 #3573: idle now doesn't hungs if launched as: idle -e <directory>
Patch by Guilherme Polo.
2012-03-20 23:03:26 +02:00
R David Murray 669b755c92 #14269: smtpd now conforms to the RFC and requires HELO before MAIL.
This is a backward incompatible change, but since it is an RFC conformance bug
and all real mail servers that I know of do conform to the RFC in this regard,
I believe it is an acceptable change for a feature release.

Patch by Jason Killen.
2012-03-20 16:16:29 -04:00
Giampaolo Rodola' 7941736ddb Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr. 2012-03-20 16:49:55 +01:00
Giampaolo Rodola' 2a886412ba Fix issue #13694: asynchronous connect in asyncore.dispatcher does not set addr. 2012-03-20 16:44:24 +01:00
Ross Lagerwall 6d3a575fc1 Merge with 3.2 for #14359. 2012-03-19 06:13:13 +02:00
Ross Lagerwall 71faefc37e Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.
Based on patch from Hervé Coatanhay.
2012-03-19 06:08:43 +02:00
Gregory P. Smith c809f98143 Fixes Issue #14331: Use significantly less stack space when importing modules by
allocating path buffers on the heap instead of the stack.
2012-03-18 16:06:53 -07:00
Georg Brandl 3187749646 Merge 3.2.3rc2 from release clone. 2012-03-18 20:37:43 +01:00
Georg Brandl 1eb0f9de99 Post-release updates for 3.2.3rc2. 2012-03-18 08:36:53 +01:00
Georg Brandl 226af70a59 Bump to 3.2.3rc2. 2012-03-18 07:34:49 +01:00
R David Murray bd53809ee7 #14344: fixed the repr of email.policy objects. 2012-03-17 15:11:59 -04:00
Georg Brandl 5ab88177a4 Move MANIFEST parsing change to the right position. 2012-03-17 18:38:13 +01:00
Benjamin Peterson d845450eef merge heads 2012-03-17 00:05:59 -05:00
Benjamin Peterson 96384b93aa make extra arguments to object.__init__/__new__ to errors in most cases (finishes #1683368) 2012-03-17 00:05:44 -05:00
R David Murray 970952bf6d Merge #11686: news entry. 2012-03-16 22:51:00 -04:00
R David Murray eebe1112ff #11686: news entry. 2012-03-16 22:49:54 -04:00
Antoine Pitrou 846fd302a0 Issue #14335: multiprocessing's custom Pickler subclass now inherits from the C-accelerated implementation.
Patch by sbt.
2012-03-17 00:23:04 +01:00
Benjamin Peterson de394543b4 merge 3.2 (#14334) 2012-03-16 09:35:38 -05:00
Benjamin Peterson 16d84ac355 check to make sure the attribute is a string (#14334) 2012-03-16 09:32:59 -05:00
Raymond Hettinger e60d2d9911 merge 2012-03-16 01:18:33 -07:00
Raymond Hettinger ec0e91045e Improve the memory utilization (and speed) of functools.lru_cache(). 2012-03-16 01:16:31 -07:00
Senthil Kumaran 209d70e579 closes issue10484 - Fix the http.server's cgi PATH_INFO handling problem 2012-03-16 01:14:51 -07:00
Senthil Kumaran be3f851411 closes issue10484 - Fix the http.server's cgi PATH_INFO handling problem 2012-03-16 01:13:50 -07:00
Matthias Klose df2aecbf61 - Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in
config.{guess,sub}. Don't use uname calls for cross builds.
2012-03-15 22:19:28 +01:00
Matthias Klose ca2f6ecfc9 - Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in
config.{guess,sub}.
2012-03-15 21:30:11 +01:00
Senthil Kumaran 3270d11d8a port from 3.2 - Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199 2012-03-15 13:28:27 -07:00
Senthil Kumaran 73277fe0eb closes Issue #11199: Fix the with urllib which hangs on particular ftp urls. 2012-03-15 13:26:12 -07:00
Matthias Klose 3b739b149b - Issue #14324: Fix configure tests for cross builds.
when using gcc, use a compilation test for the cross build check for long long format.
2012-03-15 19:31:06 +01:00
Matthias Klose 93a0ef16c9 - Issue #14321: Do not run pgen during the build if files are up to date. 2012-03-15 18:08:34 +01:00
Georg Brandl a5d729a7f7 Transplant from main repo d6c197edd99b: Fixes Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes 2012-03-15 08:31:00 +01:00
Victor Stinner 3d7c878fe3 Issue #14222: Use the new time.steady() function instead of time.time() for
timeout in queue and threading modules to not be affected of system time
update.
2012-03-15 01:22:16 +01:00
Benjamin Peterson 1a5e5de818 remove get_prefix and set_prefix (#13248) 2012-03-14 17:41:15 -05:00
Gregory P. Smith 70c9c4dca6 Fixes Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 15:00:39 -07:00
Gregory P. Smith 373c740924 Fixes Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 14:41:00 -07:00
Gregory P. Smith 8e91cf6a5e Fixes issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 14:26:55 -07:00
Andrew Svetlov b53da6e374 Merge from tip 2012-03-14 13:44:02 -07:00
Andrew Svetlov 05bab93339 Issue #14200: Idle shell crash on printing non-BMP unicode character.
UnicodeEncodeError is raised for strings contains non-BMP characters.
For eval results unicode escaping is used, print() calls display
exception with traceback as usual.
2012-03-14 13:22:12 -07:00
R David Murray b53319f509 #12818: remove escaping of () in quoted strings in formataddr
The quoting of ()s inside quoted strings is allowed by the RFC, but is not
needed.  There seems to be no reason to add needless escapes.
2012-03-14 15:31:47 -04:00
R David Murray 8d8f110492 #14062: fix BytesParser handling of Header objects
This is a different fix than the 3.2 fix, but the new tests are the same.

This also affected smtplib.SMTP.send_message, which calls BytesParser.
2012-03-14 14:24:22 -04:00
R David Murray 9fd170e2d0 #14062: fix BytesParser handling of linesep for Header objects
This also affected smtplib.SMTP.send_message, which calls BytesParser.
2012-03-14 14:05:03 -04:00
Antoine Pitrou 9d8c186650 Issue #13839: When invoked on the command-line, the pstats module now accepts several filenames of profile stat files and merges them all.
Patch by Matt Joiner.
2012-03-14 17:47:11 +01:00
R David Murray e2922835b0 Merge #14291: if a header has non-ascii unicode, default to CTE using utf-8
In Python2, if a unicode string was assigned as the value of a header,
email would automatically CTE encode it using the UTF8 charset.
This capability was lost in the Python3 translation, and this patch
restores it.

Patch by Ali Ikinci, assisted by R. David Murray.

I also added a fix for the mailbox test that was depending (with a comment
that it was a bad idea to so depend) on non-ASCII causing message_from_string
to raise an error.  It now uses support.patch to induce an error during
message serialization.
2012-03-14 03:03:27 -04:00
R David Murray 7441a7aedd #14291: if a header has non-ascii unicode, default to CTE using utf-8
In Python2, if a unicode string was assigned as the value of a header,
email would automatically CTE encode it using the UTF8 charset.
This capability was lost in the Python3 translation, and this patch
restores it.

Patch by Ali Ikinci, assisted by R. David Murray.

I also added a fix for the mailbox test that was depending (with a comment
that it was a bad idea to so depend) on non-ASCII causing message_from_string
to raise an error.  It now uses support.patch to induce an error during
message serialization.
2012-03-14 02:59:51 -04:00
Andrew Svetlov a2251aadaa Issue #989712: Support using Tk without a mainloop. 2012-03-13 18:36:13 -07:00
Victor Stinner 21f5893571 Issue #14180: datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp()
and datetime.datetime.utcfromtimestamp() now raise an OSError instead of
ValueError if localtime() or gmtime() failed.
2012-03-14 00:15:40 +01:00
R David Murray 910df329fd #8315: add automatic unittest test discovery in test.test_email 2012-03-13 18:02:22 -04:00
Martin v. Löwis eb945a938d Issue #5219: Prevent event handler cascade in IDLE.
Patch by Roger Serwy.
2012-03-13 14:32:29 -07:00
Martin v. Löwis ee381a0c36 Issue #5219: Prevent event handler cascade in IDLE.
Patch by Roger Serwy.
2012-03-13 14:18:36 -07:00
Martin v. Löwis df50cebbed Issue #3835: Refuse to use unthreaded Tcl in threaded Python.
Patch by Guilherme Polo and Andrew Svetlov.
2012-03-13 13:59:15 -07:00
Martin v. Löwis 5c3c424237 Issue #2843: Add new Tk API to Tkinter.
Patch by Guilherme Polo and Andrew Svetlov.
2012-03-13 13:40:42 -07:00
Ned Deily 577c830531 Issue #14184: merge 2012-03-13 11:31:36 -07:00
Ned Deily 7ca97d5208 Issue #14184: Increase the default stack size for secondary threads on
Mac OS X to prevent interpreter crashes when compiled on 10.7.
2012-03-13 11:18:18 -07:00
Victor Stinner 5d272cc6a2 Close #14180: Factorize code to convert a number of seconds to time_t, timeval or timespec
time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(),
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
raises an OverflowError, instead of a ValueError, if the timestamp does not fit
in time_t.

datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
round microseconds towards zero instead of rounding to nearest with ties going
away from zero.
2012-03-13 13:35:55 +01:00
Michael Foord 5738e4f3df Merge 2012-03-13 00:14:19 -07:00
Michael Foord e01c62cd6b Fix unittest test discovery for Jython 2012-03-13 00:09:54 -07:00
Martin v. Löwis 2b695a4678 Issue #1178863: Separate initialisation from setting when initializing
Tkinter.Variables; harmonize exceptions to ValueError; only delete variables
that have not been deleted; assert that variable names are strings
Patch by Andrew Svetlov.
2012-03-12 17:47:35 -07:00
Sean Reifschneider 7b3c975aaf closes #14259 re.finditer() now takes keyword arguments: pos, endpos.
Contrary to the documentation, finditer() did not take pos and endpos
keyword arguments.
2012-03-12 18:22:38 -06:00
Victor Stinner a8ec5ea923 Issue #14104: Implement time.monotonic() on Mac OS X,
patch written by Nicholas Riley.
2012-03-13 00:25:42 +01:00
Ezio Melotti 48d578c02a #13394: add more tests for the aifc module and use warnings.warn instead of print. Patch by Oleg Plakhotnyuk. 2012-03-12 23:57:18 +02:00
Benjamin Peterson 7e0dbfbbde give the AST class a __dict__ 2012-03-12 09:46:44 -07:00
Antoine Pitrou b69ef16fe6 Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under Windows when the child process has already exited. 2012-03-11 19:33:29 +01:00
Antoine Pitrou 1f9a835400 Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under Windows when the child process has already exited. 2012-03-11 19:29:12 +01:00
Georg Brandl 4c7c3c58be Close #14210: add command argument completion to pdb: complete file names, global/local variables, aliases 2012-03-10 22:36:48 +01:00
Victor Stinner 8f40860944 Close #14223: curses.addch() is no more limited to the range 0-255 when the
Python curses is not linked to libncursesw. It was a regression introduced in
Python 3.3a1.
2012-03-08 02:08:48 +01:00
Benjamin Peterson 9a6338651e merge 3.2 (#3787e896dbe9) 2012-03-07 18:52:52 -06:00
Benjamin Peterson dae9f8334e this stuff will actually be new in 3.2.4 2012-03-07 18:49:43 -06:00
Benjamin Peterson 52c424343d allow cycles throught the __dict__ slot to be cleared (closes #1469629)
Patch from Armin, test from me.
2012-03-07 18:41:11 -06:00
Benjamin Peterson 099a78fe6d make delegating generators say they running (closes #14220) 2012-03-07 17:57:04 -06:00
Benjamin Peterson 33d21a24fa merge 3.2 (#14212) 2012-03-07 14:59:13 -06:00
Benjamin Peterson 1ae230aa1a merge heads 2012-03-07 14:50:35 -06:00
Benjamin Peterson e48944b69c keep the buffer object around while we're using it (closes #14212) 2012-03-07 14:50:25 -06:00
Éric Araujo 2fa0cbc9ae Remove buggy change for #13719 in packaging 2012-03-07 20:56:18 +01:00
Éric Araujo a420c820fe Backout buggy patch committed for #13719 2012-03-07 20:48:55 +01:00
Victor Stinner 198b291df7 Close #14205: dict lookup raises a RuntimeError if the dict is modified during
a lookup.

"if you want to make a sandbox on top of CPython, you have to fix segfaults"
so let's fix segfaults!
2012-03-06 01:03:13 +01:00
Martin v. Löwis b2c7cca0cf Move entry to right section. Mention minidom. 2012-03-05 22:02:28 +01:00
Antoine Pitrou bdb1cf1ca5 Issue #12328: Fix multiprocessing's use of overlapped I/O on Windows.
Also, add a multiprocessing.connection.wait(rlist, timeout=None) function
for polling multiple objects at once.  Patch by sbt.

Complete changelist from sbt's patch:

* Adds a wait(rlist, timeout=None) function for polling multiple
  objects at once.  On Unix this is just a wrapper for
  select(rlist, [], [], timeout=None).

* Removes use of the SentinelReady exception and the sentinels argument
  to certain methods.  concurrent.futures.process has been changed to
  use wait() instead of SentinelReady.

* Fixes bugs concerning PipeConnection.poll() and messages of zero
  length.

* Fixes PipeListener.accept() to call ConnectNamedPipe() with
  overlapped=True.

* Fixes Queue.empty() and SimpleQueue.empty() so that they are
  threadsafe on Windows.

* Now PipeConnection.poll() and wait() will not modify the pipe except
  possibly by consuming a zero length message.  (Previously poll()
  could consume a partial message.)

* All of multiprocesing's pipe related blocking functions/methods are
  now interruptible by SIGINT on Windows.
2012-03-05 19:28:37 +01:00
Éric Araujo b8e280d225 Make packaging’ upload command work with bdist_msi products (#13719) 2012-03-05 17:04:07 +01:00
Éric Araujo 6a59b70cba Merge 3.2 2012-03-05 16:24:07 +01:00
Éric Araujo e413c06f35 Make distutils’ upload command work with bdist_msi products (#13719).
Patch by Ralf Schmitt.
2012-03-05 16:09:29 +01:00
Florent Xicluna 75b5e7ee15 Issue #14007: accept incomplete TreeBuilder objects (missing start/end/data/close) for the Python implementation as well. Add disabled tests for the doctype() method. 2012-03-05 10:42:19 +01:00
Georg Brandl ab8f392ff0 3.3.0a1 is done. 2012-03-05 08:54:46 +01:00
Martin v. Löwis 67245a6ed4 Issue #14168: Check for presence of _attrs before accessing it. 2012-03-05 07:01:49 +01:00
Meador Inge f1c42599ba Issue #14195: Make WeakSet.__lt__ and WeakSet.__gt__ irreflexive. 2012-03-04 22:40:15 -06:00
Meador Inge 653f932eff Issue #14195: Make WeakSet.__lt__ and WeakSet.__gt__ irreflexive. 2012-03-04 22:15:38 -06:00
Antoine Pitrou 8d3c290de4 Issue #14166: Pickler objects now have an optional `dispatch_table` attribute which allows to set custom per-pickler reduction functions.
Patch by sbt.
2012-03-04 18:31:48 +01:00
Georg Brandl 6c8850d94d Bump to 3.3.0a1. 2012-03-04 16:23:53 +01:00
Antoine Pitrou 0d3a003f24 - Issue #14177: marshal.loads() now raises TypeError when given an unicode
string.  Patch by Guilherme Gonçalves.
2012-03-03 02:38:37 +01:00
Antoine Pitrou 4a90ef0363 Issue #14177: marshal.loads() now raises TypeError when given an unicode string.
Patch by Guilherme Gonçalves.
2012-03-03 02:35:32 +01:00
Victor Stinner 135b6d8aa5 Close #13550: Remove the debug machinery from the threading module: remove
verbose arguments from all threading classes and functions.
2012-03-03 01:32:57 +01:00
Antoine Pitrou b2677c7397 Issue #14172: Fix reference leak when marshalling a buffer-like object (other than a bytes object). 2012-03-02 18:16:38 +01:00
Antoine Pitrou 679e9d36f7 Issue #14172: Fix reference leak when marshalling a buffer-like object (other than a bytes object). 2012-03-02 18:12:43 +01:00
Antoine Pitrou 0836baa46a Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary, WeakValueDictionary) to return a better approximation when some objects are dead or dying.
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
2012-03-01 16:28:14 +01:00
Antoine Pitrou bbe2f60b3c Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary, WeakValueDictionary) to return a better approximation when some objects are dead or dying.
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
2012-03-01 16:26:35 +01:00
Antoine Pitrou 049242b87c Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
Patch by Mikhail Novikov.
2012-02-27 19:56:37 +01:00
Antoine Pitrou d311374089 Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
Patch by Mikhail Novikov.
2012-02-27 19:55:36 +01:00
Éric Araujo 40e0f35ad5 Fix comparison bug with 'rc' versions in packaging.version (#11841).
I added some tests in 2105ab8553b7 and found no bug, but it turns out
that the doctest is not actually run.  While converting the doctest to
unittest style, I stumbled upon this bug again and this time applied the
code patch provided by Filip Gruszczyński.
2012-02-27 11:47:44 +01:00
Antoine Pitrou 70d2717f2e Issue #13521: dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
Patch by Filip Gruszczyński.
2012-02-27 00:59:34 +01:00
Antoine Pitrou e965d97ed1 Issue #13521: dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
Patch by Filip Gruszczyński.
2012-02-27 00:45:12 +01:00
Nick Coghlan ab7bf2143e Close issue #6210: Implement PEP 409 2012-02-26 17:49:52 +10:00
Ezio Melotti cda6b6d60d #14081: The sep and maxsplit parameter to str.split, bytes.split, and bytearray.split may now be passed as keyword arguments. 2012-02-26 09:39:55 +02:00
Éric Araujo 7d32e7e5bc Port the #6884 fix to packaging 2012-02-26 04:01:34 +01:00
Georg Brandl 48605a65b5 3.2.3rc1 done 2012-02-25 18:30:26 +01:00
Éric Araujo f71654521b Merge from 3.2 2012-02-25 17:26:44 +01:00
Éric Araujo e7295a7635 Add news entry for previous commit 2012-02-25 16:57:39 +01:00
Éric Araujo c071a613df Merge 3.2 2012-02-25 16:32:18 +01:00
Éric Araujo 29b925548c Fix long-standing bugs with MANIFEST.in parsing on Windows (#6884).
These regex changes fix a number of issues for distutils on Windows:
- #6884: impossible to include a file starting with 'build'
- #9691 and #14004: sdist includes too many files
- #13193: test_filelist failures

This commit replaces the incorrect changes done in 0a94e2f807c7 and
90b30d62caf2 to fix #13193; we were too eager to fix the test failures
and I did not study the code enough before greenlighting patches.  This
time we have unit tests from the problems reported by users to be sure
we have the right fix.

Thanks to Nadeem Vawda for his help.
2012-02-25 16:28:05 +01:00
Éric Araujo 2e0a0e1640 Fix long-standing bugs with MANIFEST.in parsing on Windows (#6884).
These regex changes fix a number of issues for distutils on Windows:
- #6884: impossible to include a file starting with 'build'
- #9691 and #14004: sdist includes too many files
- #13193: test_filelist failures

This commit replaces the incorrect changes done in 0a94e2f807c7 and
90b30d62caf2 to fix #13193; we were too eager to fix the test failures
and I did not study the code enough before greenlighting patches.  This
time we have unit tests from the problems reported by users to be sure
we have the right fix.

Thanks to Nadeem Vawda for his help.
2012-02-25 16:28:05 +01:00
Stefan Krah 9a2d99e28a - Issue #10181: New memoryview implementation fixes multiple ownership
and lifetime issues of dynamically allocated Py_buffer members (#9990)
  as well as crashes (#8305, #7433). Many new features have been added
  (See whatsnew/3.3), and the documentation has been updated extensively.
  The ndarray test object from _testbuffer.c implements all aspects of
  PEP-3118, so further development towards the complete implementation
  of the PEP can proceed in a test-driven manner.

  Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
  and many ideas.

- Issue #12834: Fix incorrect results of memoryview.tobytes() for
  non-contiguous arrays.

- Issue #5231: Introduce memoryview.cast() method that allows changing
  format and shape without making a copy of the underlying memory.
2012-02-25 12:24:21 +01:00
Georg Brandl afe05bd494 Bump version to 3.2.3rc1. 2012-02-23 21:14:12 +01:00
Benjamin Peterson 36a6558891 version now 3.1.5rc1 2012-02-23 10:45:48 -05:00
Antoine Pitrou cf1c8339f9 Issue #14084: Fix a file descriptor leak when importing a module with a bad encoding. 2012-02-22 18:08:30 +01:00
Antoine Pitrou 4f22a8d739 Issue #14084: Fix a file descriptor leak when importing a module with a bad encoding. 2012-02-22 18:05:43 +01:00
Nadeem Vawda 6721149501 Merge: #14053: Fix "make patchcheck" to work with MQ.
Patch by Francisco Martín Brugué
2012-02-22 11:53:09 +02:00
Nadeem Vawda 9f64f73193 Issue #14053: Fix "make patchcheck" to work with MQ.
Patch by Francisco Martín Brugué
2012-02-22 11:46:41 +02:00
Benjamin Peterson c9f54cf512 enable hash randomization by default 2012-02-21 16:08:05 -05:00
Martin v. Löwis dc4170c5bc merge 2.6 2012-02-21 18:07:58 +01:00
Martin v. Löwis dbd3f6173a Issue #6807: Run msisupport.mak earlier. 2012-02-21 18:06:22 +01:00
Martin v. Löwis f9caee9ab4 merge 3.2 2012-02-21 17:26:10 +01:00
Martin v. Löwis 26bb3cf7cd Issue #10580: Minor grammar change in Windows installer. 2012-02-21 17:23:55 +01:00
Petri Lehtinen 8b24506534 Merge branch '3.2'
Closes #8033.
2012-02-21 13:59:40 +02:00
Petri Lehtinen 4fe85abab9 sqlite3: Fix 64-bit integer handling in user functions on 32-bit architectures
Closes #8033.
2012-02-21 13:49:50 +02:00
Ezio Melotti 307da2b070 Merge the HTMLParser fix with 3.2. 2012-02-21 09:29:10 +02:00
Ezio Melotti 29877e8e04 HTMLParser is now able to handle slashes in the start tag. 2012-02-21 09:25:00 +02:00
Benjamin Peterson 71f660e00f update to Unicode 6.1 2012-02-20 22:24:29 -05:00
Georg Brandl 2fb477c0f0 Merge 3.2: Issue #13703 plus some related test suite fixes. 2012-02-21 00:33:36 +01:00
Georg Brandl 09562b4330 Fix typo. 2012-02-20 23:09:59 +01:00
Georg Brandl 06b1c4f68b Fix typo. 2012-02-20 23:09:59 +01:00
Georg Brandl 09a7c72cad Merge from 3.1: Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 21:31:46 +01:00
Georg Brandl 2daf6ae249 Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Antoine Pitrou c229e6e8ff Issue #14040: Remove rarely used file name suffixes for C extensions (under POSIX mainly).
This will improve import performance a bit (especially under importlib).
2012-02-20 19:41:11 +01:00
Antoine Pitrou ea6b4d5f70 Issue #13641: Decoding functions in the base64 module now accept ASCII-only unicode strings.
Patch by Catalin Iacob.
2012-02-20 19:30:23 +01:00
Benjamin Peterson 8eb1269c34 add generic implementation of a __dict__ descriptor for C types 2012-02-19 19:59:10 -05:00
Antoine Pitrou c541f8ef40 Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new importlib.invalidate_caches() function.
importlib is now often faster than imp.find_module() at finding modules.
2012-02-20 01:48:16 +01:00
Benjamin Peterson 01d7eba316 allow arbitrary attributes on classmethod and staticmethod (closes #14051) 2012-02-19 01:10:25 -05:00
Charles-François Natali 3ccc918b4a Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
2012-02-18 15:02:10 +01:00
Charles-François Natali cd96b4f1ff Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
2012-02-18 14:53:41 +01:00
Charles-François Natali ec1712a166 Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
2012-02-18 14:42:57 +01:00
Petri Lehtinen aa2c670ee6 Merge branch '3.2'
Closes #11689.
2012-02-17 21:36:52 +02:00
Petri Lehtinen c86d9e2846 Fix a variable scoping error in an sqlite3 test
Closes #11689.
2012-02-17 21:31:02 +02:00
Brett Cannon ba17fe256e Have importlib use os.replace() for atomic renaming.
Closes issue #13961. Thanks to Charles-François Natali for the patch.
2012-02-17 09:26:53 -05:00
Brett Cannon 22e7c88057 Merge 2012-02-16 18:03:47 -05:00
Brett Cannon 3b1a06c1ea importlib.__import__() now raises ValueError when level < 0.
This is to bring it more in line with what PEP 328 set out to do with
removing ambiguous absolute/relative import semantics.
2012-02-16 17:47:48 -05:00
Petri Lehtinen 17f1be6368 Merge branch '3.2'
Closes #13995.
2012-02-16 21:44:26 +02:00
Petri Lehtinen b3890226b3 sqlite3: Fix documentation errors concerning Cursor.rowcount
Closes #13995.
2012-02-16 21:39:03 +02:00
Gregory P. Smith 5b791fb548 Issue #2489: Fix bug in _copy loop that could consume 100% cpu on EOF. 2012-02-16 00:35:43 -08:00
Gregory P. Smith 58e7c1dc02 NEWS entry for previous commit. 2012-02-16 00:30:50 -08:00
Antoine Pitrou 04d4ee4e56 Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert(). 2012-02-15 22:28:21 +01:00
Antoine Pitrou 2f5a163dfc Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert(). 2012-02-15 22:25:27 +01:00
Petri Lehtinen be2cf338e9 Merge branch '3.2'
Issue #13491.
2012-02-15 22:22:34 +02:00
Petri Lehtinen 1ca93954e1 Issue #13491: Fix many errors in sqlite3 documentation
Initial patch by Johannes Vogel.
2012-02-15 22:21:01 +02:00
Éric Araujo 4575afcb53 Fix parsing of packaging’s build_ext --libraries option (#1326113) 2012-02-15 17:25:25 +01:00
Éric Araujo 1d175f7768 Merge fixes for #1326113 and #12297 from 3.2 2012-02-15 17:13:26 +01:00
Éric Araujo b2f5c0a4c4 Fix parsing of build_ext --libraries option (#1326113) 2012-02-15 16:44:37 +01:00
Antoine Pitrou 8b4d64f256 Move NEWS entry to correct section. 2012-02-15 02:54:54 +01:00
Antoine Pitrou 552be9b214 Issue #13020: Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.
2012-02-15 02:54:33 +01:00
Antoine Pitrou 37784ba5c0 Issue #13020: Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.
2012-02-15 02:51:43 +01:00
Antoine Pitrou 15af7b4a4f Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
Patch by Suman Saha.
2012-02-15 02:43:47 +01:00