Raymond Hettinger
1ff50df8bc
Minor cleanup: add whitespace, add comments, bring function attribute updates together.
2012-03-30 13:15:48 -07:00
Eli Bendersky
0192ba33b4
Issue #14065 : Added cyclic GC support to ET.Element
2012-03-30 16:38:33 +03:00
Vinay Sajip
b4f6da8265
Closes #14436 : merged fix from 3.2.
2012-03-29 20:18:21 +01:00
Vinay Sajip
6f5e54e769
Closes #14436 : Convert msg + args to string before pickling.
2012-03-29 20:17:18 +01: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
Michael Foord
aa8ec7e076
Fix unittest.mock.patch docstring
2012-03-28 15:41:28 +01:00
Michael Foord
54b3db8c84
Minor unittest.mock.patch doc / docstring improvement
2012-03-28 15:08:08 +01:00
Georg Brandl
dc5a4e1611
merge with 3.2
2012-03-27 07:46:54 +02:00
Georg Brandl
d86440750f
Closes #14411 : remove outdated comment in rlcompleter docstring.
2012-03-27 07:46:46 +02:00
Éric Araujo
1641bb7669
Fix typo
2012-03-26 23:35:31 -04:00
Andrew Svetlov
a5cf6c4913
Update missed idlelib/NEWS.txt
2012-03-26 22:14:13 +03:00
Andrew Svetlov
d543f2b8b0
IDLE can be launched as python -m ildelib
2012-03-26 22:11:46 +03:00
Andrew Svetlov
753445a425
Issue #989712 : update the code to process tkinter messages in IDLE
...
without mainloop.
Thanks to Roger Serwy for patch.
2012-03-26 21:56:44 +03:00
Michael Foord
0340ea77d1
unittest.mock: removed another bit of Python 2 only code
2012-03-25 23:27:12 +01:00
Michael Foord
944e02d055
Adding unittest.mock documentation
2012-03-25 23:12:55 +01:00
Michael Foord
e58a562d93
unittest.mock: a mock created by patch with a spec as the list argument will be callable if __call__ is in the spec
2012-03-25 19:53:18 +01:00
Michael Foord
fb5d0a78cf
unittest.mock: remove another piece of Python 2 specific code
2012-03-25 19:35:22 +01:00
Michael Foord
1ab27c6fde
Remove more Python 2 code from unittest.mock (obsolete function attributes)
2012-03-25 19:16:10 +01:00
Michael Foord
0dccf657b5
Minor changes to the unittest.mock.mock_open helper
2012-03-25 19:11:50 +01:00
Michael Foord
99254730b2
Addition of docstrings to unittest.mock helpers
2012-03-25 19:07:33 +01:00
Michael Foord
a74561a56d
unittest.mock: set file_spec on first use
2012-03-25 19:03:13 +01:00
Michael Foord
50a8c0ef5d
Support subclassing unittest.mock._patch and fix various obscure bugs around patcher spec arguments
2012-03-25 18:57:58 +01:00
Michael Foord
a3eabb6f8e
Merge
2012-03-25 18:16:26 +01:00
Michael Foord
313f85f0ca
unittest.mock.MagicMock objects are now unorderable by default
2012-03-25 18:16:07 +01:00
Stefan Krah
fe17b2bc77
Raise MemoryError instead of InvalidOperation/MallocError for compatibility
...
with decimal.py. The standard specifies InsufficientStorage (MallocError) as
a sub-condition of InvalidOperation. This allows a calculation to continue
with NaN results when allocation fails.
2012-03-25 18:59:21 +02:00
Andrew Svetlov
cd49d53238
Issue #14200 — now displayhook for IDLE works in non-subprocess mode as well as subprecess.
2012-03-25 11:43:02 +03:00
Charles-François Natali
9384c7ddab
Issue #13902 : Fix a random test_threading failure on FreeBSD 6 buildbots (due
...
to a known bug in pthread implementation on FreeBSD < 7).
2012-03-24 20:37:01 +01:00
Charles-François Natali
8e6fe648cc
Issue #13902 : Fix a random test_threading failure on FreeBSD 6 buildbots (due
...
to a known bug in pthread implementation on FreeBSD < 7).
2012-03-24 20:36:09 +01:00
Charles-François Natali
55bce63ea0
Issue #14154 : Reimplement the bigmem test memory watchdog as a subprocess.
2012-03-24 10:06:23 +01:00
Vinay Sajip
ee64b28cf4
Closes #14314 : backported fix.
2012-03-23 14:36:22 +00:00
Giampaolo Rodola'
c7ea19fee8
attempt to fix asyncore buildbot failure
2012-03-23 15:09:58 +01:00
Giampaolo Rodola'
a3481e70d1
attempt to fix asyncore buildbot failure
2012-03-23 15:07:07 +01:00
Stefan Krah
b6405efd1b
Use the same exception hierarchy as decimal.py. FloatOperation now also
...
inherits from TypeError. Cleanup in module initialization to make repeated
import failures robust.
2012-03-23 14:46:48 +01:00
Giampaolo Rodola'
4164ac1f27
merge
2012-03-23 13:29:49 +01:00
Giampaolo Rodola'
466a54f4dc
fix failing asyncore test as per http://bugs.python.org/issue10340#msg156586
2012-03-23 13:29:01 +01:00
Eli Bendersky
396e8fcf36
Issue #13782 : streamline argument type-checking in ET.Element
...
append, extend and insert now consistently type-check their argument in both
the C and Python implementations, and raise TypeError for non-Element
argument.
Added tests
2012-03-23 14:24:20 +02:00
R David Murray
42243c4dca
#14380 : Make actual default match docs, fix __init__ order.
...
Éric pointed out that given that the default was documented as None, someone
would reasonably pass that to get the default behavior. In fixing the code to
use None, I noticed that the change to _charset was being done after it had
already been passed to MIMENonMultipart. The change to the test verifies that
the order is now correct.
2012-03-22 22:40:44 -04: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'
3539ef3d21
merge 79422b3684f1 in 3.3 branch (issue 10340)
2012-03-22 16:19:45 +01:00
Giampaolo Rodola'
350c94b900
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:17:43 +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
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
Benjamin Peterson
65e32d1f1a
merge heads
2012-03-21 14:26:09 -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
Benjamin Peterson
1b1a8e7cb5
correctly lookup __trunc__ in int() constructor
2012-03-20 23:48:11 -04: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
Larry Hastings
83a9f48699
Issue #14328 : Add keyword-only parameters to PyArg_ParseTupleAndKeywords.
...
They're optional-only for now (unlike in pure Python) but that's all
I needed. The syntax can easily be relaxed if we want to support
required keyword-only arguments for extension types in the future.
2012-03-20 20:06:16 +00: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
Benjamin Peterson
4ca5661669
all OSErrors should indicate there are no extended attributes ( closes #14358 )
2012-03-18 22:26:05 -04:00
Georg Brandl
3187749646
Merge 3.2.3rc2 from release clone.
2012-03-18 20:37:43 +01:00
Georg Brandl
226af70a59
Bump to 3.2.3rc2.
2012-03-18 07:34:49 +01:00
Raymond Hettinger
7dabfede34
Fix whitespace
2012-03-17 15:11:09 -07:00
Raymond Hettinger
7e0c581c49
Low overhead path for maxsize==0
2012-03-17 15:10:24 -07:00
R David Murray
0863d7106c
Merge #14333 : fix test_queue so it can be run via standard unittest test discovery.
2012-03-17 16:39:44 -04:00
R David Murray
c6bfce9871
#14333 : fix test_queue so it can be run via standard unittest test discovery.
2012-03-17 16:38:39 -04:00
R David Murray
bd53809ee7
#14344 : fixed the repr of email.policy objects.
2012-03-17 15:11:59 -04:00
Raymond Hettinger
bc8e81dcc3
Section-off the source for better readability.
2012-03-17 00:24:09 -07:00
Raymond Hettinger
dce583e0bd
Minor beautification.
2012-03-16 22:12:20 -07: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
80e22b56d3
Merge #11686 : add missing entries to email __all__ lists.
...
Original patch by Steffen Daode Nurpmeso
2012-03-16 22:46:14 -04:00
R David Murray
1b6c724df0
#11686 : add missing entries to email __all__ lists.
...
Original patch by Steffen Daode Nurpmeso
2012-03-16 22:43:05 -04:00
R David Murray
7104c7295c
#12788 : fix error in test_policy when run under refleak detection
2012-03-16 21:39:57 -04:00
Raymond Hettinger
4f5139ba20
Root variable is not changed.
2012-03-16 17:08:37 -07:00
Raymond Hettinger
202d1ad3f6
Fix whitespace
2012-03-16 17:05:17 -07:00
Raymond Hettinger
d37fb55910
Unique sentinel value for cache.get()
2012-03-16 17:04:11 -07:00
Raymond Hettinger
6e8c817687
Refactor calculation of the cache key. Minor code cleanups.
2012-03-16 16:53:05 -07:00
Antoine Pitrou
020bf28200
Merge
2012-03-17 00:24:12 +01: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
29a837d857
merge heads
2012-03-16 18:22:53 -05:00
Benjamin Peterson
954cf578c7
clear the root with the cache
2012-03-16 18:22:26 -05:00
Raymond Hettinger
d656958915
Minor code cleanup.
2012-03-16 11:48:12 -07:00
Raymond Hettinger
57b2959d26
Eliminate duplicate link lookup. Minor cleanup.
2012-03-16 11:21:39 -07: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
Eli Bendersky
6e33525098
fix trailing whitespace
2012-03-16 15:32:04 +02:00
Eli Bendersky
2b711409c7
Add a test that makes sure TreeBuilder can be passed element_factory in the
...
constructor. Marked as expectedFailure since it currently fails for the C
implementation.
2012-03-16 15:29:50 +02: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
Eli Bendersky
5b77d81314
Issue #14207 : the ParseError exception raised by _elementtree was made
...
consistent to the one raised by the Python module (the 'code' attribute
was added).
In addition, the exception is now documented.
Added a test to check that ParseError has the required attributes, and
threw away the equivalent doctest which is no longer required.
2012-03-16 08:20:05 +02:00
Eli Bendersky
f996e775ea
Closes Issue #14246 : _elementtree parser will now handle io.StringIO
2012-03-16 05:53:30 +02:00
Senthil Kumaran
e53d977e80
Explain the use of charset parameter with Content-Type header: issue11082
2012-03-15 18:15:34 -07:00
Senthil Kumaran
6b3434ae04
Explain the use of charset parameter with Content-Type header. Issue11082
2012-03-15 18:11:16 -07:00
Benjamin Peterson
2afe6aeae8
perform yield from delegation by repeating YIELD_FROM opcode ( closes #14230 )
...
This allows generators that are using yield from to be seen by debuggers. It
also kills the f_yieldfrom field on frame objects.
Patch mostly from Mark Shannon with a few tweaks by me.
2012-03-15 15:37:39 -05: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
Giampaolo Rodola'
a4e018889a
(sched) when run() is invoked with blocking=False return the deadline of the next scheduled call in the scheduler; this use case was suggested in http://bugs.python.org/issue1641#msg149453
2012-03-15 13:05:41 +01:00
Vinay Sajip
17160fd6d6
Fixes #14314 : Improved SMTP timeout handling.
2012-03-15 12:02:08 +00: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
Victor Stinner
071eca3f5c
Issue #10278 : Add an optional strict argument to time.steady(), False by default
2012-03-15 01:17:09 +01:00
Victor Stinner
ec919cc74d
Issue #10278 : Drop time.monotonic() function, rename time.wallclock() to time.steady()
...
* On Mac OS X, time.steady() now uses mach_absolute_time(), a monotonic clock
* Optimistic change: bet that CLOCK_MONOTONIC and CLOCK_REALTIME are available
when clock_gettime() is available
* Rewrite time.steady() documentation
2012-03-15 00:58:32 +01:00
Benjamin Peterson
1a5e5de818
remove get_prefix and set_prefix ( #13248 )
2012-03-14 17:41:15 -05:00
Michael Foord
d7c65e2807
Removed XXX from unittest.mock docstring and switch to a nicer try...except...finally
2012-03-14 14:56:54 -07:00
Michael Foord
a74b3aa0cc
Remove more Python 2 compatibility cruft from unittest.mock
2012-03-14 14:40:22 -07:00
Senthil Kumaran
e7c8fdee18
merge heads
2012-03-14 14:00:31 -07:00
Senthil Kumaran
2f9bf35007
Fix the buildbot breakdown - issue 10050
2012-03-14 13:59:56 -07:00
Andrew Svetlov
8247b188f3
Megre from tip
2012-03-14 13:46:08 -07:00
Andrew Svetlov
b53da6e374
Merge from tip
2012-03-14 13:44:02 -07:00
Senthil Kumaran
38b968b913
deprecated the old urllib primitives in 3.3 urllib package - issue 10050
2012-03-14 13:43:53 -07:00
Michael Foord
c17adf4151
Remove Python 2 compatibility cruft from unittest.mock
2012-03-14 13:30:29 -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
Michael Foord
ebff097937
And another one... mock import fix.
2012-03-14 13:01:31 -07:00
Michael Foord
83a16856ee
Fix another mock import
2012-03-14 12:58:46 -07:00
Michael Foord
0ca9acd1dd
Fix import failure in mock test
2012-03-14 12:38:06 -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
Michael Foord
345266aa7e
PEP 417: Adding unittest.mock
2012-03-14 12:24:34 -07: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
Senthil Kumaran
e24f96a059
Issue10050 - urlretrieve uses newer urlopen. reporthook of urlretrieve takes, block number, block read size, file_size
2012-03-13 19:29:33 -07:00
Andrew Svetlov
a2251aadaa
Issue #989712 : Support using Tk without a mainloop.
2012-03-13 18:36:13 -07:00
Victor Stinner
8050ca9c6f
Issue #14180 : TestDateTime.test_microsecond_rounding() handles localtime() and
...
gmtime() failure on Windows
2012-03-14 00:17:05 +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
5c3c424237
Issue #2843 : Add new Tk API to Tkinter.
...
Patch by Guilherme Polo and Andrew Svetlov.
2012-03-13 13:40:42 -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
Vinay Sajip
69437da15f
Merged upstream change.
2012-03-13 12:18:19 +00:00
Vinay Sajip
3cac309939
Merged upstream change.
2012-03-13 12:15:46 +00:00
Vinay Sajip
0f15181d39
Closes #14267 : Merged fix from 3.2.
2012-03-13 12:15:09 +00:00
Vinay Sajip
27f48979ca
Closes #14267 : Corrected computation of rollover filename.
2012-03-13 12:10:33 +00:00
Senthil Kumaran
19b114b818
merge to 3.3 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers
2012-03-13 01:51:20 -07:00
Senthil Kumaran
47b5ddb9cf
3.2 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers
2012-03-13 01:50:27 -07: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
R David Murray
a9719057a2
#8942 : add test for __path__ contents in zipimport tests
...
Patch by Tatiana Al-Chueyr.
2012-03-12 21:16:33 -04: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
Ezio Melotti
cc50ba26bd
#14179 : merge with 3.2.
2012-03-13 01:33:30 +02:00
Ezio Melotti
df723e1e5e
#14179 : add tests for re.compile. Patch by Florian Mladitsch.
2012-03-13 01:29:48 +02:00
Eric V. Smith
f2bb8898ea
Merge heads.
2012-03-12 15:29:06 -07:00
Eric V. Smith
97722c4132
str.format_map tests don't do what they say: fix to actually implement the intent of the test. Closes #13450 . Patch by Akira Li.
2012-03-12 15:26:21 -07:00
Michael Foord
56bac7b9e1
Merge
2012-03-12 15:25:12 -07:00
Michael Foord
b36c70c9ff
Move adding unittest test discovery command line options into their own method.
2012-03-12 15:24:46 -07:00
Eric V. Smith
1d4798cb93
Merge heads.
2012-03-12 15:18:30 -07:00
Eric V. Smith
edbb6ca084
str.format_map tests don't do what they say: fix to actually implement the intent of the test. Closes #13450 .
2012-03-12 15:16:22 -07: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
Ezio Melotti
85769539a3
#13394 : add more tests for the aifc module. Patch by Oleg Plakhotnyuk.
2012-03-12 23:52:40 +02:00
Michael Foord
c1f5d8af57
Merge
2012-03-12 13:54:03 -07:00
Michael Foord
5f99ced092
Refactor unittest command line handling to always use optparse
2012-03-12 13:53:04 -07:00
Łukasz Langa
17591c1a1d
Head merge.
2012-03-12 19:59:48 +01:00
Łukasz Langa
f3078fbee2
Fixes #13842 : cannot pickle Ellipsis or NotImplemented.
...
Thanks for James Sanders for the bug report and the patch.
2012-03-12 19:46:12 +01:00
Benjamin Peterson
f28fcff17d
adjust for change in AST type
2012-03-12 11:19:19 -07:00
Benjamin Peterson
7e0dbfbbde
give the AST class a __dict__
2012-03-12 09:46:44 -07:00
Benjamin Peterson
61a4161de4
merge 3.2
2012-03-12 09:43:27 -07:00
Benjamin Peterson
ef87f06798
allow AST objects to be like its subclasses
2012-03-12 09:43:09 -07:00
Benjamin Peterson
6645f7e590
merge heads
2012-03-12 09:28:51 -07:00
Benjamin Peterson
09b4bd03f6
merge 3.2
2012-03-12 09:28:36 -07:00
Benjamin Peterson
d279e286f2
every other ast object has a dict, so I think AST should, too
2012-03-12 09:27:36 -07:00
Eric V. Smith
851cad7616
Make test_logging no longer fail if zlib not present. Closes #14256 . Patch by Pedro Kroger.
2012-03-11 22:46:04 -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
Antoine Pitrou
eab2a50dfc
PEP8-ize test names
2012-03-10 16:34:40 +01:00
Antoine Pitrou
8cd8d5e8f2
Remove useless failOnException() method
2012-03-10 16:20:24 +01:00
Georg Brandl
6aacc14e29
Merge with 3.2.
2012-03-10 09:27:30 +01:00
Georg Brandl
e144c74e02
Closes #14244 : add info about capturing groups and maxsplit to the docstring of re.split().
2012-03-10 09:26:53 +01:00
Victor Stinner
28393828e2
Issue #14205 : Fix test_dict.test_mutating_lookup()
2012-03-09 22:58:51 +01:00
Antoine Pitrou
3774977de2
Relax timeout tests for weak Windows buildbot
2012-03-09 18:40:15 +01:00
Victor Stinner
63ed5664a1
Issue #14231 : Lib/test/crashers/borrowed_ref_1.py was fixed by ba6376dff6c4.
2012-03-09 13:59:42 +01:00
Eli Bendersky
865756a94c
Issue #14178 : Problem deleting slices with steps != +1 in the _elementtree module.
...
Fixed the problem and added some tests. Closes #14178
2012-03-09 13:38:15 +02:00
Victor Stinner
40c9565bcc
Issue #14211 : Oops, I removed the wrong file :-)
2012-03-09 00:52:07 +01:00
Victor Stinner
2d01dc00bc
Issue #14211 : _PyObject_GenericSetAttrWithDict() keeps a strong reference to
...
the descriptor because it may be destroyed before being used, destroyed during
the update of the dict for example.
2012-03-09 00:44:13 +01:00
Victor Stinner
d74782b0ac
Close #14199 : _PyType_Lookup() and super_getattro() keep a strong reference to
...
the type MRO to avoid a crash if the MRO is changed during the lookup.
2012-03-09 00:39:08 +01:00
Benjamin Peterson
9a6338651e
merge 3.2 (#3787e896dbe9)
2012-03-07 18:52:52 -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
00b41fc828
Merge 3.2
2012-03-07 20:50:06 +01:00
Éric Araujo
a420c820fe
Backout buggy patch committed for #13719
2012-03-07 20:48:55 +01:00
Brett Cannon
f67e494ca8
merge
2012-03-06 15:33:24 -05:00
Antoine Pitrou
5bb9a8f237
Remove a couple of local imports.
2012-03-06 13:43:24 +01:00
Antoine Pitrou
6c64cc1973
Reap processes at test end to avoid false positives in reference leak detection.
2012-03-06 13:42:35 +01:00
Victor Stinner
b1f7f6343b
test_pty: fix ResourceWarning warnings
2012-03-06 02:04:58 +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
Vinay Sajip
b2fcd3a989
Added delay before record creation.
2012-03-05 20:02:53 +00: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
Stefan Krah
1e88f3faa6
Merge.
2012-03-05 17:48:21 +01:00
Stefan Krah
1649c1b33a
Issue #14181 : Preserve backwards compatibility for getbufferprocs that a) do
...
not adhere to the new documentation and b) manage to clobber view->obj before
returning failure.
2012-03-05 17:45:17 +01:00
Éric Araujo
c53d624235
Merge 3.2
2012-03-05 17:04:20 +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
c3705d3ac4
Fix NameError from #13719 fix
2012-03-05 17:02:31 +01:00
Éric Araujo
6a59b70cba
Merge 3.2
2012-03-05 16:24:07 +01:00
Éric Araujo
80f7102d43
Improve packaging.database documentation
2012-03-05 16:16:37 +01:00
Éric Araujo
420f698d6e
Backport minidom attribute tests from default (73c76466cf44).
...
Some minidom code changed between 3.2 and 3.3, so to be sure to avoid
differenced in behavior I’m backporting these tests added by MvL.
2012-03-05 16:11:41 +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
Éric Araujo
c432a9d5b9
Use raw string for a docstring that uses a backslash
2012-03-05 15:45:08 +01:00
Stefan Krah
bf6c7eca43
Issue #14181 : Test creating memoryviews from a static exporter with both
...
view.obj==NULL and view.obj==base.
2012-03-05 14:37:34 +01:00
Vinay Sajip
8d217c6a71
Issue #12151 : Added more info to diagnostics.
2012-03-05 12:45:51 +00:00
Florent Xicluna
8cf4b51fa4
xml.dom.minidom: add more __slots__ to limit resource usage.
2012-03-05 12:37:02 +01:00
Florent Xicluna
6c75301eb6
xml.dom: fix typo, drop unused imports.
2012-03-05 12:35:15 +01:00
Florent Xicluna
fb06746852
Flatten nested try ... finally, try ... except.
2012-03-05 11:42:49 +01:00
Stefan Krah
49ab14f452
Merge.
2012-03-05 10:50:11 +01:00
Stefan Krah
fcbb4169b9
Issue #10181 : The decision was to raise a buffer error in memory_exit()
...
if the view has exported buffers. Make this official by uncommenting
a test case.
2012-03-05 10:45:31 +01:00
Vinay Sajip
682c979871
Merged upstream changes.
2012-03-05 09:44:25 +00:00
Vinay Sajip
b6f6670d87
Added more diagnostics for diagnosing #12151 .
2012-03-05 09:43:47 +00: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
Stefan Krah
4e99a315b7
Issue #14181 : Allow memoryview construction from an object that uses the
...
getbuffer redirection scheme.
2012-03-05 09:30:47 +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
5102bf476c
Fix some set algebra methods of WeakSet objects.
2012-03-04 21:16:52 +01:00
Antoine Pitrou
f7dabd849f
Merge
2012-03-04 20:59:01 +01:00
Antoine Pitrou
a14bd00542
Port 2.7 fix for sporadic failure in test_weakset.
2012-03-04 20:55:35 +01:00
Antoine Pitrou
9c47ac05d1
Fix some set algebra methods of WeakSet objects.
2012-03-04 20:47:05 +01:00
Georg Brandl
0b2b583ea2
Fix spelling.
2012-03-04 20:36:28 +01:00
Antoine Pitrou
de89d4b097
Port 2.7 fix for sporadic failure in test_weakset.
2012-03-04 20:20:34 +01: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
Georg Brandl
0f25cea2c5
Regenerate pydoc topics.
2012-03-04 16:12:09 +01:00
Armin Ronacher
c0eaecafe9
Updated tokenize to support the inverse byte literals new in 3.3
2012-03-04 13:07:57 +00:00
Armin Ronacher
6ecf77b3f8
Basic support for PEP 414 without docs or tests.
2012-03-04 12:04:06 +00:00
Eli Bendersky
745ccf8b1a
fix trailing whitespace
2012-03-04 07:15:21 +02:00
Eli Bendersky
092af1fc5c
Issue #14128 : Exposing Element as an actual type from _elementtree, rather than a factory function.
...
This makes the C implementation more aligned with the Python implementation.
Also added some tests to ensure that Element is now a type and that it can
be subclassed.
2012-03-04 07:14:03 +02:00
Vinay Sajip
d263d18553
Fixed problem with diagnostic output.
2012-03-03 16:20:37 +00: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
Victor Stinner
643cd68ea4
Issue #13964 : signal.sigtimedwait() timeout is now a float instead of a tuple
...
Add a private API to convert an int or float to a C timespec structure.
2012-03-02 22:54:03 +01:00
Brett Cannon
0d4d410b2d
Remove a dead docstring.
2012-03-02 12:32:14 -05: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
Vinay Sajip
2f24d98df0
Closes #14158 : merged test file resilience fix from 3.2.
2012-03-02 01:24:13 +00:00
Vinay Sajip
f959618142
Closes #14158 : improved resilience to test files left behind.
2012-03-02 01:01:13 +00: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
Philip Jenvey
d7aff2d696
update skip reason
2012-02-29 16:21:25 -08:00
Philip Jenvey
e308b7c0c0
also skip test_device_encoding when stdin isn't a tty
2012-02-29 16:16:15 -08:00
Brett Cannon
efb00c0cc1
Issue #14153 Create _Py_device_encoding() to prevent _io from having to import
...
the os module.
2012-02-29 18:31:31 -05:00
Ezio Melotti
aba0b13f0a
#14089 : merge with 3.2.
2012-02-29 14:06:56 +02:00
Ezio Melotti
682d37423d
#14089 : increase coverage of the fractions module. Patch by Oleg Plakhotnyuk.
2012-02-29 14:05:53 +02:00
Ezio Melotti
0b8123d8ae
#10713 : merge with 3.2.
2012-02-29 11:49:45 +02:00
Ezio Melotti
5a045b9f54
#10713 : Improve documentation for \b and \B and add a few tests. Initial patch and tests by Martin Pool.
2012-02-29 11:48:44 +02:00
Nadeem Vawda
3692453a2d
Merge: Give better failure messages in test_strptime (cf. issue #14113 ).
2012-02-29 00:24:46 +02:00
Nadeem Vawda
aba2b06001
Give better failure messages in test_strptime (cf. issue #14113 ).
2012-02-29 00:22:09 +02:00
Vinay Sajip
19b1d50732
Added additional diagnostics to help with #12151 .
2012-02-28 19:02:43 +00:00
Brett Cannon
b46a1793a7
Update importlib.invalidate_caches() to be more general.
2012-02-27 18:15:42 -05:00
Antoine Pitrou
9a4d7ddb6c
More debug output
2012-02-27 22:01:25 +01:00
Antoine Pitrou
ffd85c8182
Improve debugging output for test failure
2012-02-27 20:04:05 +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
Stefan Krah
0509d9418a
Issue #14113 : Fix a test_strptime failure caused by changes to LC_ALL.
2012-02-27 10:18:51 +01:00
Antoine Pitrou
f12b4475cc
Merge
2012-02-27 01:01: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
Nadeem Vawda
05a4dd83af
Issue #13873 : Fix crash in test_zlib when running on a small (<4GB) tmpfs.
2012-02-27 00:42:58 +02:00
Antoine Pitrou
4f92a68a81
Issue #14080 : fix sporadic test_imp failure. Patch by Stefan Krah.
2012-02-26 18:09:50 +01:00
Charles-François Natali
9578757ec4
Issue #14107 : test: Fix a deadlock involving the memory watchdog thread.
2012-02-26 17:27:32 +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
408026c7e8
Merge 3.2
2012-02-26 04:07:37 +01:00
Éric Araujo
7d32e7e5bc
Port the #6884 fix to packaging
2012-02-26 04:01:34 +01:00
Éric Araujo
845a77205f
Set archive format explicitly in one distutils test
2012-02-26 02:14:33 +01:00
Éric Araujo
f71654521b
Merge from 3.2
2012-02-25 17:26:44 +01:00
Éric Araujo
b46562480b
Add test file for scripts in Tools ( #13447 ).
...
When people find bugs in scripts such as reindent.py, msgfmt.py or
pygettext.py, we have to try to reproduce the bug manually, apply a fix
and test manually again. The alternative is to only read the code and
trust that it works. This test file is a way to stop that
unsatisfactory state of things and write proper unit tests instead.
2012-02-25 16:57:04 +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
Nadeem Vawda
afdac030e3
Use assertEqual in test_strptime for better failure messages (cf. issue #14113 ).
2012-02-25 15:58:36 +02: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
Philip Jenvey
4b42ff609d
unused imports, pep8
2012-02-24 21:48:17 -08:00
Victor Stinner
6f73874edd
Close #14095 : type.__new__() doesn't remove __qualname__ key from the class
...
dict anymore if the key is present. Reject also non-string qualified names.
And fix reference leaks in type.__new__().
2012-02-25 01:22:36 +01:00
Victor Stinner
abc649ddbe
Issue #14107 : fix bigmem tests on str.capitalize(), str.swapcase() and
...
str.title(). Compute correctly how much memory is required for the test
(memuse).
2012-02-25 00:43:27 +01:00
Benjamin Peterson
ab5a044aec
merge 3.2.2 release branch for rc
2012-02-24 11:47:29 -05:00
Brett Cannon
625cd23da4
Simplify importib._resolve_name().
2012-02-24 11:20:54 -05:00
Ezio Melotti
91932da338
#13973 : move a couple of imports at module level. Patch by Tshepang Lekhonkhobe.
2012-02-24 12:44:04 +02:00
Brett Cannon
2fe4bb10e7
merge
2012-02-23 20:48:13 -05:00
Brett Cannon
4b03b68635
Turn _return_module() into _handle_fromlist().
2012-02-23 20:47:57 -05:00
Victor Stinner
90f50d4df9
Issue #13706 : Fix format(float, "n") for locale with non-ASCII decimal point (e.g. ps_aF)
2012-02-24 01:44:47 +01:00
Brett Cannon
6858cabb26
merge
2012-02-23 19:34:55 -05:00
Brett Cannon
dfc32706a0
Make the benchmark recording more sensible for importlib.test.benchmark.
2012-02-23 19:34:35 -05:00
Victor Stinner
41a863cb81
Issue #13706 : Fix format(int, "n") for locale with non-ASCII thousands separator
...
* Decode thousands separator and decimal point using PyUnicode_DecodeLocale()
(from the locale encoding), instead of decoding them implicitly from latin1
* Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used
* Change _PyUnicode_InsertThousandsGrouping() API to return the maximum
character if unicode is NULL
* Replace MIN/MAX macros by Py_MIN/Py_MAX
* stringlib/undef.h undefines STRINGLIB_IS_UNICODE
* stringlib/localeutil.h only supports Unicode
2012-02-24 00:37:51 +01:00
Brett Cannon
dcb30cf959
merge
2012-02-23 18:30:04 -05:00
Brett Cannon
f500778f65
Improper type for __package__ should raise TypeError, not ValueError.
2012-02-23 18:29:12 -05:00
Brett Cannon
068915cc8b
Do a type check instead of an interface check.
2012-02-23 18:18:48 -05:00
Vinay Sajip
349c900ed0
Merged upstream changes.
2012-02-23 20:53:40 +00:00
Vinay Sajip
323e4fb864
Merged fix added for recent changes in non-threading environments.
2012-02-23 20:51:18 +00:00
Vinay Sajip
f05090372a
Fix added for recent changes in non-threading environments.
2012-02-23 20:49:08 +00:00
Georg Brandl
bada35bdf5
merge heads
2012-02-23 21:16:49 +01:00
Georg Brandl
afe05bd494
Bump version to 3.2.3rc1.
2012-02-23 21:14:12 +01:00
Georg Brandl
29ca21c702
Update pydoc topics.
2012-02-23 21:12:41 +01:00
Vinay Sajip
57c223791d
Merged logging flush/close changes from 3.2.
2012-02-23 20:03:49 +00:00
Vinay Sajip
0abf61db4d
logging: Added locking in flush() and close() handler methods. Thanks to Fayaz Yusuf Khan for the suggestion.
2012-02-23 19:45:52 +00:00
Brett Cannon
5b761f1dca
Merge
2012-02-23 10:17:56 -05:00
Nadeem Vawda
197e22c1d7
Simplify zlib bigmem tests.
2012-02-23 14:23:17 +02:00
Nadeem Vawda
bc8c8175cc
Fix previous fix (for test_zlib) to work on 32-bit systems.
2012-02-23 14:16:15 +02:00
Nadeem Vawda
b063a48406
Issue #13873 : Fix crash in test_zlib on bigmem buildbot.
2012-02-23 13:36:25 +02:00
Brett Cannon
34d8e41a47
Refactor importlib to make it easier to re-implement in C.
2012-02-22 18:33:05 -05:00
Charles-François Natali
6db1c40b37
Issue #14077 : importlib: Fix regression introduced by de6703671386.
2012-02-22 21:03:09 +01:00
Ross Lagerwall
e7ad419058
Fix sporadic test_subprocess regression introduced by 834650d63130.
2012-02-22 06:02:07 +02:00
Antoine Pitrou
c09424255a
Fix (presumably) test_hash under big-endian systems (PPC).
2012-02-22 03:33:56 +01:00
Antoine Pitrou
679be99a85
Fix (presumably) test_hash under big-endian systems (PPC).
2012-02-22 03:33:56 +01:00
Antoine Pitrou
658d1963e1
Additional debug info in case of failure
2012-02-22 02:46:58 +01:00
Antoine Pitrou
037615e1ef
unload() should be sufficient
2012-02-22 02:30:09 +01:00
Antoine Pitrou
abe72d7eb3
Try to debug sporadic test failures
2012-02-22 01:11:31 +01:00
Victor Stinner
65532111b4
site: don't import traceback at startup to speed up Python startup
2012-02-21 22:10:16 +01:00
Benjamin Peterson
c9f54cf512
enable hash randomization by default
2012-02-21 16:08:05 -05:00
Antoine Pitrou
bc499d26a8
Actually run the new tests.
2012-02-21 19:18:10 +01:00
Antoine Pitrou
07c65884c6
Add a test that memoryviews have hash randomization enabled.
2012-02-21 19:14:26 +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
802505d05e
Merge more test vs hashing-order fixes from 3.2.
2012-02-21 00:34:05 +01: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
178e5ea305
Disable an inspect test: it depends on dict ordering which parameter is reported as duplicate.
2012-02-21 00:32:36 +01:00
Antoine Pitrou
95a97b7c0c
Delete the iterator, which could accidentally keep a temporary reference to the yielded element.
2012-02-21 00:00:06 +01:00
Antoine Pitrou
e9f637b062
Make "regrtest -j" "-R"-aware
2012-02-20 23:49:07 +01:00
Georg Brandl
e5a0e0a75f
Fix obscure failures of datetime-related tests due to the datetime tests failing to restore the system state completely after testing the pure-Python versions.
2012-02-20 23:37:36 +01:00
Georg Brandl
16684eb624
Fix dbm_gnu test relying on set order.
2012-02-20 22:48:06 +01:00
Georg Brandl
f47b20f0b0
Fix use of deprecated assertRegexpMatches method.
2012-02-20 22:08:27 +01:00
Antoine Pitrou
b5c793a0b3
Issue #14063 : fix test_importlib failure under OS X case-insensitive filesystems
...
(regression)
2012-02-20 22:06:59 +01:00
Georg Brandl
61470246d0
Remove setting hash seed to regrtest's random seed and re-execv()ing: this doesn't preserve Python flags and fails from a temp directory.
2012-02-20 22:06:02 +01:00
Georg Brandl
27fe226eb1
Another test_dis dict order dependency.
2012-02-20 22:03:28 +01:00
Georg Brandl
b9dafe618f
Merge with 3.1.
2012-02-20 21:43:25 +01:00
Georg Brandl
a108227c47
Fix test_dis dependency on dict order.
2012-02-20 21:41:03 +01:00
Georg Brandl
c425a94899
Fix use of deprecated assert_ method.
2012-02-20 21:37:22 +01:00
Georg Brandl
242631da86
Fix "sys.path modified" warning in test_strlit, by not replacing sys.path itself, only its contents.
2012-02-20 21:36:28 +01:00
Georg Brandl
a86b262d1e
Fix bad inheritance in test_subprocess that led to a number of tests being executed twice.
2012-02-20 21:34:57 +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
Benjamin Peterson
a3ed11bd34
don't rely on the order of module clearing
2012-02-20 15:20:37 -05:00
Benjamin Peterson
6ddac006be
put docstrings on functions
2012-02-20 15:06:35 -05: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
dff46faa95
Fix use of assertRaises following c760bd844222 (spotted by Alex Gaynor).
2012-02-20 19:46:26 +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
Antoine Pitrou
b67075beb5
_relax_case -> _make_relax_case
2012-02-20 13:52:47 +01: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
Brett Cannon
336b2f45e5
Fix a failing importlib test under Windows.
...
Closes issue #14054 .
2012-02-19 19:36:44 -05:00
Benjamin Peterson
85c71ae882
fix test now that staticmethod and classmethod are bigger
2012-02-19 19:16:47 -05:00
Antoine Pitrou
c135fa424e
Fix last remaining build issues of _ssl under old OpenSSLs. Patch by Vinay.
2012-02-19 21:22:39 +01:00
Martin v. Löwis
7b77188e89
Create _attr/_attrNS lazily.
2012-02-19 20:55:05 +01:00
Martin v. Löwis
14aa280de2
Use __slots__ throughout instead of __dict__, to reduce the memory usage.
2012-02-19 20:25:12 +01:00
Benjamin Peterson
b900d6a78c
initialize __dict__ if needed
2012-02-19 10:17:30 -05:00
Benjamin Peterson
01d7eba316
allow arbitrary attributes on classmethod and staticmethod ( closes #14051 )
2012-02-19 01:10:25 -05:00
Jesus Cea
fbc6f943e0
Test for issue #13500
2012-02-19 03:54:29 +01:00
Jesus Cea
14ed7f23c2
Test for issue #13500
2012-02-19 03:52:23 +01: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
Antoine Pitrou
a9bf2ac726
Try to really fix compilation failures of the _ssl module under very old OpenSSLs.
2012-02-17 18:47:54 +01:00
Éric Araujo
f1fd388c77
Branch merge
2012-02-17 18:10:11 +01:00
Éric Araujo
2180ee641c
Fix code I unwittingly broke in b0e2d6592a1f ( #14038 )
2012-02-17 17:26:30 +01:00
Brett Cannon
082f177c67
Fix importlib.test.__main__ to only worry about command-line flags when directly executed.
2012-02-17 10:44:24 -05:00
Brett Cannon
f2e86751cc
Optimize importlib's case-sensitivity check by wasting as little time as possible under case-sensitive OSs.
2012-02-17 09:46:48 -05:00
Brett Cannon
1f14bebe3c
Have importlib.test use argparse instead of some hacked up solution.
2012-02-17 09:37:39 -05: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
f58d45c649
Tweak the handling of the empty string in sys.path for importlib.
...
It seems better to cache the finder for the cwd under its full path
insetad of '' in case the cwd changes. Otherwise FileFinder needs to
dynamically change itself based on whether it is given '' instead of
caching a finder for every change to the cwd.
2012-02-16 18:12:00 -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
Florent Xicluna
1639505c38
fix the _namespace_map cleanup for cElementTree tests.
2012-02-16 23:28:35 +01:00
Florent Xicluna
e59a306081
The C accelerator was not always imported for cElementTree's tests. (there's still an issue with --huntrleaks switch)
2012-02-16 23:17:31 +01:00
Charles-François Natali
8e3926a810
Merge.
2012-02-16 19:54:48 +01:00
Charles-François Natali
4a72ebe34b
Issue #13878 : Fix random test_sched failures.
2012-02-16 19:51:45 +01:00
Charles-François Natali
f670ca5e70
Issue #13878 : Fix random test_sched failures.
2012-02-16 19:49:48 +01:00
Brett Cannon
7fab676e87
Refactor importlib.__import__() and _gcd_import() to facilitate using
...
an __import__ implementation that takes care of basics in C and punts
to importlib for more complicated code.
2012-02-16 13:43:41 -05:00
Éric Araujo
e8c5fdba30
Add test for packaging.util.set_platform ( #13974 ).
...
Patch by Tshepang Lekhonkhobe.
2012-02-16 19:32:17 +01:00
Eli Bendersky
292f9a891d
make TestAccelerator[Not]Imported for ElementTree more robust
2012-02-16 19:55:29 +02:00
Eli Bendersky
66e6f8e525
Disabling a test that fails on some bots. Will investigate the failure soon
2012-02-16 18:08:44 +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
a124a688a2
don't use assertSameElements.
2012-02-16 00:34:12 -08:00
Gregory P. Smith
05f5953ab4
Issue #2489 : Fix bug in _copy loop that could consume 100% cpu on EOF.
2012-02-16 00:29:12 -08:00
Eli Bendersky
da57819efa
in the tests of ElementTree, verify that the C accelerator is imported or not imported as expected
2012-02-16 06:52:39 +02:00
Victor Stinner
4aec77617f
(Merge 3.2) Issue #13913 : Another fix test_pep3120 for the UTF-8 codec name
2012-02-15 23:45:34 +01:00
Victor Stinner
5c724a804a
Issue #13913 : Another fix test_pep3120 for the UTF-8 codec name
2012-02-15 23:44:03 +01:00
Sandro Tosi
cd77815e4c
Issue #11836 : document and expose multiprocessing.SimpleQueue
2012-02-15 23:27:00 +01:00
Victor Stinner
10e467c963
(Merge 3.2) Issue #13913 : Fix test_pep3120 for the UTF-8 codec name
2012-02-15 22:25:51 +01:00
Victor Stinner
1303298d06
Issue #13913 : Fix test_pep3120 for the UTF-8 codec name
2012-02-15 22:24:17 +01:00
Antoine Pitrou
482ee66cb7
Issue #7644 : Add tests for the file argument of NNTP.head() and NNTP.body().
...
Patch by Hynek Schlawack.
2012-02-15 18:53:49 +01:00
Antoine Pitrou
2640b52237
Issue #7644 : Add tests for the file argument of NNTP.head() and NNTP.body().
...
Patch by Hynek Schlawack.
2012-02-15 18:53:18 +01:00
Éric Araujo
43df889d63
Fix for packaging test failure on shared builds ( #1326113 )
2012-02-15 18:14:50 +01:00
Éric Araujo
a76eff7db0
Merge fix from 3.2
2012-02-15 18:13:00 +01:00
Éric Araujo
2a57a36368
Fix test failure for shared builds caused by #1326113 fix
2012-02-15 18:12:12 +01: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
Brett Cannon
0568d6fd4e
Bring importlib in line w/ changes made in my personal bootstrap branch in the sandbox.
2012-02-14 18:38:11 -05:00
Antoine Pitrou
06b57ef958
Issue #10287 : nntplib now queries the server's CAPABILITIES first before sending MODE READER, and only sends it if not already in READER mode.
...
Patch by Hynek Schlawack.
2012-02-14 23:30:35 +01:00
Antoine Pitrou
71135624d8
Issue #10287 : nntplib now queries the server's CAPABILITIES first before sending MODE READER, and only sends it if not already in READER mode.
...
Patch by Hynek Schlawack.
2012-02-14 23:29:34 +01:00
Meador Inge
ffeee3518a
Issue #13979 : Fix ctypes.util.find_library ldconfig regex
2012-02-13 22:08:39 -06:00
Gregory P. Smith
53ec8ae6a5
re.escape os.sep so that \ is interpreted properly in the regex.
2012-02-13 16:43:55 -08:00