Serhiy Storchaka
d2c07a58af
Issue #19053 : ZipExtFile.read1() with non-zero argument no more returns empty
...
bytes until end of data.
2013-09-27 22:11:57 +03:00
Vinay Sajip
cb2c4fe649
Updated test_logging so that errors don't occur in the absence of threading.
2013-09-27 19:08:24 +01:00
Vinay Sajip
f6cdffeb78
Streamlined logging tests by moving common code to a helper function.
2013-09-27 18:41:12 +01:00
Vinay Sajip
5421f35d5e
logging: added support for Unix domain sockets to SocketHandler and DatagramHandler.
2013-09-27 18:18:28 +01:00
Ethan Furman
e03ea37a7b
Close #19030 : improvements to inspect and Enum.
...
inspect.getmembers and inspect.classify_class_attrs now search the metaclass
mro for types.DynamicClassAttributes (what use to be called
enum._RouteClassAttributeToGetattr); in part this means that these two
functions no longer rely solely on dir().
Besides now returning more accurate information, these improvements also
allow a more helpful help() on Enum classes.
2013-09-25 07:14:41 -07:00
Serhiy Storchaka
369606df2f
Issue #19028 : Fixed tkinter.Tkapp.merge() for non-string arguments.
2013-09-23 23:20:07 +03:00
Ethan Furman
64a9972b40
Close #19025 : Better error message when trying to delete an Enum member.
...
Also slight code reorg for PEP 8 guidelines.
2013-09-22 16:18:19 -07:00
Jason R. Coombs
838521eed0
Close #18978 : Merge changes.
2013-09-22 10:06:24 -04:00
Nick Coghlan
f94a16b494
Close #18626 : add a basic CLI for the inspect module
2013-09-22 22:46:49 +10:00
Nick Coghlan
df4cb129e4
Merge from 3.3
2013-09-22 19:38:44 +10:00
Nick Coghlan
ce34687d23
Fix comment in test_gdb
2013-09-22 19:38:16 +10:00
Antoine Pitrou
a78cccb134
test_gdb: skip pretty-printing of sets with gdb < 7.3
...
(should fix the failures on OpenIndiana)
2013-09-22 00:14:27 +02:00
Antoine Pitrou
d0f3e07a60
test_gdb: dump gdb version in verbose mode
2013-09-21 23:56:17 +02:00
R David Murray
4750fa8369
Merge #14984 : On POSIX, enforce permissions when reading default .netrc.
2013-09-17 21:28:17 -04:00
R David Murray
fb9dc0b3ae
Merge #14984 : On POSIX, enforce permissions when reading default .netrc.
2013-09-17 21:04:50 -04:00
R David Murray
8270a2c209
Merge #14984 : On POSIX, enforce permissions when reading default .netrc.
2013-09-17 20:32:54 -04:00
R David Murray
104aab956f
#14984 : On POSIX, enforce permissions when reading default .netrc.
...
Initial patch by Bruno Piguet.
This is implemented as if a useful .netrc file could exist without passwords,
which is possible in the general case; but in fact our netrc implementation
does not support it. Fixing that issue will be an enhancement.
2013-09-17 20:30:02 -04:00
Serhiy Storchaka
935349406a
Issue #18873 : The tokenize module, IDLE, 2to3, and the findnocoding.py script
...
now detect Python source code encoding only in comment lines.
2013-09-16 23:57:00 +03:00
Serhiy Storchaka
dafea85190
Issue #18873 : The tokenize module, IDLE, 2to3, and the findnocoding.py script
...
now detect Python source code encoding only in comment lines.
2013-09-16 23:51:56 +03:00
Ethan Furman
c850f34220
Close #18693 : Enum is now more help() friendly.
2013-09-15 16:59:35 -07:00
Andrew Kuchling
173a157e72
#1565525 : Add traceback.clear_frames() helper function to clear locals ref'd by a traceback
2013-09-15 18:15:56 -04:00
Ethan Furman
101e0746d3
Close #18989 : enum members will no longer overwrite other attributes, nor be overwritten by them.
2013-09-15 12:34:36 -07:00
Raymond Hettinger
c76aa4832b
merge
2013-09-14 20:52:54 -07:00
Raymond Hettinger
46f5ca31d0
Issue #19018 : The heapq.merge() function no longer suppresses IndexError
2013-09-14 20:51:57 -07:00
Ethan Furman
2131a4a2fc
Add __reversed__ to Enum. Minor code reorg (moved __members__ to be in alpha order).
2013-09-14 18:11:24 -07:00
Ezio Melotti
5589bd109a
#18856 : merge with 3.3.
2013-09-15 04:05:04 +03:00
Ezio Melotti
0a32d92bff
Merge heads.
2013-09-15 03:00:42 +03:00
Antoine Pitrou
04d4d6a3aa
Avoid test_logging failure when run after test_unittest, by renaming a conflicting logger
2013-09-14 21:16:39 +02:00
R David Murray
f11caa0bba
Merge #18206 : Fix test for existence of license URL.
...
This test will fail because a previous attempt to fix a merge error
in site.py was incorrect, but the test wasn't running so it wasn't
caught. The next commit will fix the site.py bug.
2013-09-14 13:31:14 -04:00
R David Murray
1bc6ceba92
#18206 : Fix test for existence of license URL.
...
It now always checks, instead of only when the LICENSE file doesn't exist. It
is also protected by the 'network' resource, and uses a HEAD request since we
are only doing an existence check.
2013-09-14 13:28:37 -04:00
Ezio Melotti
87f09371b0
#18856 : improve test coverage of the calendar module. Patch by Madison May.
2013-09-14 04:55:53 +03:00
Charles-François Natali
0cc86850b6
Issue #16201 : socket: Use inet_pton()/inet_addr() instead of ad-hoc parsing for
...
numeric IP addresses.
2013-09-13 19:53:08 +02:00
Eli Bendersky
12f18289c0
Merge for Issue #18997 : Issue #18997 : fix ElementTree crash with using pickle and __getstate__.
2013-09-13 06:27:52 -07:00
Eli Bendersky
dd3661e782
Issue #18997 : fix ElementTree crash with using pickle and __getstate__.
...
Based on report and initial patch from Germán M. Bravo
2013-09-13 06:24:25 -07:00
Eli Bendersky
7290608af7
Issue #18945 : Add tests for tempfile name collision handling.
...
Patch by Vlad Shcherbina
2013-09-13 05:30:00 -07:00
Eli Bendersky
aa04f9ae7d
Issue #18945 : Add tests for tempfile name collision handling.
...
Patch by Vlad Shcherbina
2013-09-13 05:28:20 -07:00
Serhiy Storchaka
bf28d2dcad
Issue #18818 : The "encodingname" part of PYTHONIOENCODING is now optional.
2013-09-13 11:46:24 +03:00
Senthil Kumaran
187b063005
Fix http.server's request handling case on trailing '/'.
...
Patch contributed by Vajrasky Kok. Addresses Issue #17324
2013-09-13 00:22:45 -07:00
Senthil Kumaran
72c238e21a
Fix http.server's request handling case on trailing '/'.
...
Patch contributed by Vajrasky Kok. Addresses Issue #17324
2013-09-13 00:21:18 -07:00
Senthil Kumaran
0b5463fef2
Fix typo
2013-09-09 23:13:06 -07:00
Tim Peters
72460fa68b
Get "stopped" back into repr(Thread) when appropriate.
...
Due to recent changes, a Thread doesn't know that it's over before
someone calls .join() or .is_alive(). That meant repr(Thread)
continued to include "started" (and not "stopped") before one of
those methods was called, even if hours passed since the thread
ended.
Repaired that.
2013-09-09 18:48:24 -05:00
Tim Peters
c363a23eff
Issue 18984: Remove ._stopped Event from Thread internals.
...
The fix for issue 18808 left us checking two things to be sure a Thread
was done: an Event (._stopped) and a mutex (._tstate_lock). Clumsy &
brittle. This patch removes the Event, leaving just a happy lock :-)
The bulk of the patch removes two excruciating tests, which were
verifying sanity of the internals of the ._stopped Event after a fork.
Thanks to Antoine Pitrou for verifying that's the only real value
these tests had.
One consequence of moving from an Event to a mutex: waiters (threads
calling Thread.join()) used to block each on their own unique mutex
(internal to the ._stopped event), but now all contend on the same
mutex (._tstate_lock). These approaches have different performance
characteristics on different platforms. I don't think it matters in
this context.
2013-09-08 18:44:40 -05:00
Serhiy Storchaka
d86709ce91
Fixed tests with Tcl/Tk <8.5 ( closes #18964 ).
2013-09-08 20:31:20 +03:00
Serhiy Storchaka
dfa689bfdd
Fixed tests with Tcl/Tk <8.5 ( closes #18964 ).
2013-09-08 20:29:37 +03:00
Jason R. Coombs
4a6524295d
Issue #18978 : Add tests to capture expected behavior for class-level method overrides.
2013-09-08 13:03:40 -04:00
Victor Stinner
4f7a36f84f
Issue #18904 : test_os and test_socket use unittest.skipIf() to check if fcntl
...
module is present (to record skipped tests)
2013-09-08 14:14:38 +02:00
Antoine Pitrou
5da7e7959e
Issue #18808 again: fix the after-fork logic for not-yet-started or already-stopped threads.
...
(AFAICT, in theory, we must reset all the locks, not just those in use)
2013-09-08 13:19:06 +02:00
Charles-François Natali
6f6f4865d1
Merge.
2013-09-08 12:35:53 +02:00
Charles-François Natali
807ba8552a
Issue #18963 : skip test_selectors.test_above_fd_setsize on older OS X versions.
2013-09-08 12:31:32 +02:00
Charles-François Natali
833bf1fcb2
Issue #18935 : Fix test_regrtest.test_timeout when built --without-threads (the
...
'--timeout' option requires faulthandler.dump_traceback_later).
2013-09-08 12:27:33 +02:00
Victor Stinner
a3c18d0f14
Issue #18904 : test_socket: add inheritance tests using fcntl and FD_CLOEXEC
2013-09-08 11:53:09 +02:00
Victor Stinner
7ba6b0f943
Issue #18904 : Improve os.get/set_inheritable() tests
2013-09-08 11:47:54 +02:00
Victor Stinner
8898350076
Close #18957 : The PYTHONFAULTHANDLER environment variable now only enables the
...
faulthandler module if the variable is non-empty. Same behaviour than other
variables like PYTHONDONTWRITEBYTECODE.
2013-09-08 11:36:23 +02:00
Charles-François Natali
9437d7a7fe
Issue #18963 : Fix test_selectors.test_above_fd_setsize on OS X, where the
...
default RLIMIT_NOFILE hard limit can be RLIMIT_INFINITY.
2013-09-08 11:34:42 +02:00
Nick Coghlan
ff6382b40d
Merge #18952 fix from 3.3
2013-09-08 12:49:53 +10:00
Nick Coghlan
0494c2ae7f
Close #18952 : correctly download test support data
...
When test.support was converted to a package, it started silently
skipping the tests which needed to download support data to run.
This change refactors the affected code, and also tidies up
test.support.findfile to remove the unused *here* parameter, document
the *subdir* parameter and rename the *filename* parameter to avoid
shadowing the file builtin and be consistent with the documentation.
The unexpected skips were noticed and reported by Zachary Ware
2013-09-08 11:40:34 +10:00
Antoine Pitrou
7b4769937f
Issue #18808 : Thread.join() now waits for the underlying thread state to be destroyed before returning.
...
This prevents unpredictable aborts in Py_EndInterpreter() when some non-daemon threads are still running.
2013-09-07 23:38:37 +02:00
Senthil Kumaran
2f2ae39037
merge from 3.3
...
Fix License URL display and add test to check for license url presence.
Fixes issue #18206 Patch contributed by Berker Peksag and py.user
2013-09-07 14:09:48 -07:00
Senthil Kumaran
8ef519b24f
Fix License URL display and add test to check for license url presence.
...
Fixes issue #18206 Patch contributed by Berker Peksag and py.user
2013-09-07 13:59:17 -07:00
Tim Peters
f4ecfae75f
Merge 3.3 into default.
...
Issue 18944: fix a 1-character typo in test_set.py.
The error caused test_inline_methods() to test much less than intended.
Caught (& fixed) by Armin Rigo.
2013-09-06 15:42:47 -05:00
Tim Peters
23d7d4e85c
Issue 18944: fix a 1-character typo in test_set.py.
...
The error caused test_inline_methods() to test much less than intended.
Caught (& fixed) by Armin Rigo.
2013-09-06 15:41:30 -05:00
Antoine Pitrou
66ff01fede
Remove old-school inheritance
2013-09-06 21:18:25 +02:00
Charles-François Natali
6703bb4984
Issue #18934 : Relax test_multiprocessing.test_invalid_handles a bit: we just
...
want to check that Connection.poll() doesn't crash.
2013-09-06 21:12:22 +02:00
Antoine Pitrou
b0478b3f5f
Issue #18623 : Factor out the _SuppressCoreFiles context manager into test.support.
...
Patch by Valerie Lambert.
2013-09-06 20:50:00 +02:00
Ethan Furman
f203f2d51d
Close #18924 : Block naive attempts to change an Enum member.
2013-09-06 07:16:48 -07:00
Eli Bendersky
cdac551675
Issue #18920 : argparse's default version action (for -v, --version) should
...
output to stdout, matching the 'python -v'
Reported by Wolfgang Maier
2013-09-06 06:49:15 -07:00
Eli Bendersky
309836c5c8
Issue #18849 : Fixed a Windows-specific tempfile bug where collision with an
...
existing directory caused mkstemp and related APIs to fail instead of
retrying. Report and fix by Vlad Shcherbina.
2013-09-06 06:14:16 -07:00
Eli Bendersky
f315df31bd
Issue #18849 : Fixed a Windows-specific tempfile bug where collision with an
...
existing directory caused mkstemp and related APIs to fail instead of
retrying. Report and fix by Vlad Shcherbina.
2013-09-06 06:11:19 -07:00
Serhiy Storchaka
1e0d82cece
Issue #18830 : inspect.getclasstree() no more produces duplicated entries even
...
when input list contains duplicates.
2013-09-05 17:16:12 +03:00
Serhiy Storchaka
362c1b513d
Issue #18830 : inspect.getclasstree() no more produces duplicated entries even
...
when input list contains duplicates.
2013-09-05 17:14:32 +03:00
Serhiy Storchaka
34d201374c
Issue #18878 : sunau.open now supports the context manager protocol. Based on
...
patches by Claudiu Popa and R. David Murray.
2013-09-05 17:01:53 +03:00
Antoine Pitrou
e619427f7e
Issue #18876 : The FileIO.mode attribute now better reflects the actual mode under which the file was opened.
...
Patch by Erik Bray.
2013-09-04 20:52:14 +02:00
Antoine Pitrou
e93b63b74b
Issue #18876 : The FileIO.mode attribute now better reflects the actual mode under which the file was opened.
...
Patch by Erik Bray.
2013-09-04 20:46:33 +02:00
Charles-François Natali
243d8d85de
Issue #16853 : Add new selectors module.
2013-09-04 19:02:49 +02:00
Andrew Svetlov
58b5c5ad14
Issue #18882 : Add threading.main_thread() function.
2013-09-04 07:01:07 +03:00
Meador Inge
3c56145638
Issue #16826 : Revert fix while Windows issues are being worked out.
2013-09-03 19:54:40 -05:00
Meador Inge
c9e1dcdd53
Issue #16826 : Revert fix while Windows issues are being worked out.
2013-09-03 19:43:49 -05:00
Meador Inge
2b0a98f540
Merge heads.
2013-09-03 17:32:13 -05:00
Meador Inge
9ab358ad7c
Issue #16826 : Don't check for PYTHONCASEOK when using -E.
...
This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
2013-09-03 16:53:22 -05:00
Serhiy Storchaka
e06a89655a
Issue #18901 : The sunau getparams method now returns a namedtuple rather than
...
a plain tuple. Patch by Claudiu Popa.
2013-09-04 00:43:03 +03:00
Meador Inge
d151da9ef7
Issue #16826 : Don't check for PYTHONCASEOK when using -E.
...
This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
2013-09-03 16:37:26 -05:00
Serhiy Storchaka
4c6a020a2d
Issue #17487 : The result of the wave getparams method now is pickleable again.
...
Patch by Claudiu Popa.
2013-09-04 00:28:43 +03:00
Eli Bendersky
e8de29669d
Remove unused --debug option of regrtest.
...
If bots fail due to using this flag, the buildbot scripts have to be modified
to omit it. Regrtest ignores it anyway.
2013-09-02 17:01:10 -07:00
Eli Bendersky
e5eebedd55
Fix docstring and some indentation
2013-09-02 16:52:25 -07:00
Eli Bendersky
7f5c22c022
Refactor the main function of regrtest a bit.
...
Moving subprocess execution of tests into a function.
2013-09-02 08:57:21 -07:00
Ethan Furman
a661f4531e
Close #18745 : Improve enum tests in test_json for infinities and NaN.
2013-09-02 01:14:56 -07:00
Antoine Pitrou
625eed765a
test_threading isn't rudimentary anymore
2013-09-01 19:52:08 +02:00
Antoine Pitrou
4c8ce847e6
test_threading isn't rudimentary anymore
2013-09-01 19:51:49 +02:00
Victor Stinner
f6fa22efe0
Issue #18571 : Merge duplicate test code
...
Merge test/subprocessdata/inherited.py into test/subprocessdata/fd_status.py
2013-09-01 10:22:41 +02:00
Andrew Svetlov
8913a6c83d
Issue #11798 : fix tests for regrtest -R :
2013-09-01 07:58:41 +03:00
Ethan Furman
ec15a826ce
Close #18738 : Route __format__ calls to mixed-in type for mixed Enums (such as IntEnum).
2013-08-31 19:17:41 -07:00
Eli Bendersky
b2ff3cf0e9
Switch the AF_* and SOCK_* constants in the socket module to IntEnum.
...
Closes #18720 .
2013-08-31 15:13:30 -07:00
Terry Jan Reedy
7e7cf8bc51
Issue #12037 : Fix test_email for desktop Windows.
2013-08-31 17:16:45 -04:00
Terry Jan Reedy
740d6b6f39
Issue #12037 : Fix test_email for desktop Windows.
2013-08-31 17:12:21 -04:00
Ethan Furman
13bdfa7a7f
Issue #18780 : code cleanup.
2013-08-31 12:48:51 -07:00
Ethan Furman
fb13721b1b
Close #18780 : %-formatting now prints value for int subclasses with %d, %i, and %u codes.
2013-08-31 10:18:55 -07:00
Charles-François Natali
08548f4a75
Merge.
2013-08-31 17:32:30 +02:00
Charles-François Natali
fcfb324e81
Use the recent support.HOSTv6 addition.
2013-08-31 14:40:49 +02:00
Antoine Pitrou
267964c837
Forward port new tests from Issue #18851 .
2013-08-31 00:12:37 +02:00
Antoine Pitrou
a8392717f1
Forward port new tests from Issue #18851 .
2013-08-30 23:38:13 +02:00
Charles-François Natali
79a53ea7d7
Issue #18418 : After fork(), reinit all threads states, not only active ones.
...
Patch by A. Jesse Jiryu Davis.
2013-08-30 23:34:26 +02:00
Charles-François Natali
9939cc89a4
Issue #18418 : After fork(), reinit all threads states, not only active ones.
...
Patch by A. Jesse Jiryu Davis.
2013-08-30 23:32:53 +02:00
Eli Bendersky
b586934f0e
Issue #17741 : Rename IncrementalParser and its methods.
...
The new names are hopefully more descriptive and consistent. If you feel you
don't agree with this change, *please* read issue 17741 first - there's a lot of
discussion in there.
2013-08-30 05:51:20 -07:00
Gregory P. Smith
6cc50391a6
Fixes Issue #15507 : test_subprocess's test_send_signal could fail if the test
...
runner were run in an environment where the process inherited an ignore
setting for SIGINT. Restore the SIGINT handler to the desired
KeyboardInterrupt raising one during that test.
2013-08-29 13:39:44 -07:00
Gregory P. Smith
dee0434e2f
Fixes issue #15507 : test_subprocess's test_send_signal could fail if the test
...
runner were run in an environment where the process inherited an ignore
setting for SIGINT. Restore the SIGINT handler to the desired
KeyboardInterrupt raising one during that test.
2013-08-29 13:35:27 -07:00
Charles-François Natali
f25f80c839
Merge.
2013-08-29 19:27:17 +02:00
Charles-François Natali
e33d5b0bc8
Merge.
2013-08-29 19:26:37 +02:00
Charles-François Natali
74b7408604
Issue #18643 : Fix some test_socket failures due to large default socket buffer
...
sizes.
2013-08-29 19:02:23 +02:00
Charles-François Natali
5fd2642adb
Issue #18643 : Fix some test_socket failures due to large default socket buffer
...
sizes.
2013-08-29 19:01:40 +02:00
Richard Oudkerk
e0d25ce1fe
Issue #8713 : Print dangling processes/threads, if any.
2013-08-29 14:37:47 +01:00
Richard Oudkerk
83d7dea6aa
Issue #8713 : Cleanup before saving process._dangling.
2013-08-29 12:51:11 +01:00
Richard Oudkerk
968d05594e
Issue #8713 : Test should not print message about start method.
2013-08-29 12:41:19 +01:00
Serhiy Storchaka
64f7c4e4ca
Issue #16799 : Switched from getopt to argparse style in regrtest's argument
...
parsing. Added more tests for regrtest's argument parsing.
2013-08-29 12:26:23 +03:00
Serhiy Storchaka
48e6a8c88a
Issue #18743 : Fix references to non-existant "StringIO" module
...
in docstrings and comments.
2013-08-29 11:39:48 +03:00
Serhiy Storchaka
50254c57cd
Issue #18743 : Fix references to non-existant "StringIO" module
...
in docstrings and comments.
2013-08-29 11:35:43 +03:00
Andrew Svetlov
7c1017bfee
Fix tests for #11798
2013-08-29 01:24:39 +03:00
Richard Oudkerk
6a53af893a
Issue #18786 : Don't reinstall old SIGUSR1 handler prematurely.
2013-08-28 13:50:19 +01:00
Victor Stinner
d98af985d0
(Merge 3.3) Fix @requires_freebsd_version and @requires_linux_version
...
decorators of test.support, run the test if the platform matchs!
2013-08-28 12:34:16 +02:00
Victor Stinner
d39dca9e33
Fix test_socket.test_SOCK_CLOEXEC(), the test was wrong
2013-08-28 12:28:18 +02:00
Victor Stinner
3b44a409de
Fix @requires_freebsd_version and @requires_linux_version decorators of
...
test.support, run the test if the platform matchs!
2013-08-28 12:26:28 +02:00
Victor Stinner
bff989ed20
test_posix.test_pipe2() now checks that the O_NONBLOCK flag is set
...
Use also os.get_inheritable() instead of fcntl() to check the inheritable flag
(FD_CLOEXEC).
2013-08-28 12:25:40 +02:00
Victor Stinner
daf455554b
Issue #18571 : Implementation of the PEP 446: file descriptors and file handles
...
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
2013-08-28 00:53:59 +02:00
Serhiy Storchaka
46e1ce214b
Issue #18783 : Removed existing mentions of Python long type in docstrings,
...
error messages and comments.
2013-08-27 20:17:03 +03:00
Serhiy Storchaka
9594942716
Issue #18783 : Removed existing mentions of Python long type in docstrings,
...
error messages and comments.
2013-08-27 19:40:23 +03:00
Victor Stinner
14e461d5b9
Close #11619 : The parser and the import machinery do not encode Unicode
...
filenames anymore on Windows.
2013-08-26 22:28:21 +02:00
Ezio Melotti
ec42975bc6
#18833 : merge with 3.3.
2013-08-26 00:17:21 +03:00
Ezio Melotti
4f1353ab10
#18833 : add a test for test_telnetlib. Patch by Alex Volkov.
2013-08-25 23:56:43 +03:00
Antoine Pitrou
7eaf3f7080
Issue #18808 : Non-daemon threads are now automatically joined when a sub-interpreter is shutdown (it would previously dump a fatal error).
2013-08-25 19:48:18 +02:00
Charles-François Natali
a439b32cf0
Merge.
2013-08-25 18:28:44 +02:00
Charles-François Natali
c20a7b977e
Merge.
2013-08-25 18:27:59 +02:00
Charles-François Natali
249cdc39fc
Issue #18763 : subprocess: The file descriptors are now closed after calling the
...
preexec_fn callback, which may open file descriptors.
2013-08-25 18:24:45 +02:00
R David Murray
0cb8e5131d
Merge #16611 : BaseCookie now parses 'secure' and 'httponly' flags.
2013-08-25 11:09:45 -04:00
R David Murray
cd0f74b1e0
#16611 : BaseCookie now parses 'secure' and 'httponly' flags.
...
Previously it generated them if they were given a value, but completely
ignored them if they were present in the string passed in to be parsed. Now
if the flag appears on a cookie, the corresponding Morsel key will reference a
True value. Other pre-existing behavior is retained in this maintenance
patch: if the source contains something like 'secure=foo', morsel['secure']
will return 'foo'. Since such a value doesn't round trip and never did (and
would be a surprising occurrence) a subsequent non-bug-fix patch may change
this behavior.
Inspired by a patch from Julien Phalip, who reviewed this one.
2013-08-25 11:09:02 -04:00
Christian Heimes
2769d44827
Issue #18709 : Fix issue with IPv6 address in subjectAltName on Mac OS X Tiger
2013-08-25 14:12:50 +02:00
Christian Heimes
157c9834b4
Issue #18709 : Fix issue with IPv6 address in subjectAltName on Mac OS X Tiger
2013-08-25 14:12:41 +02:00
Antoine Pitrou
f5e30d8b54
Issue #18756 : make test_urandom_failure more robust by executing its code in a subprocess
2013-08-24 20:52:45 +02:00
Antoine Pitrou
eba25bafc7
Issue #18756 : make test_urandom_failure more robust by executing its code in a subprocess
2013-08-24 20:52:27 +02:00
Victor Stinner
e726ce1f3e
(Merge 3.3) test_socket: cancel scheduled alarm on test failure
2013-08-24 15:53:39 +02:00
Victor Stinner
71fe8c00f6
test_socket: cancel scheduled alarm on test failure
2013-08-24 15:52:47 +02:00
Benjamin Peterson
3a7dffa4ce
remove support for compiling on systems without getcwd()
...
Do we need a fallback implementation of getcwd() from 1991 that claims to
support "really old Unix systems"? I don't think so.
2013-08-23 21:01:48 -05:00
Ezio Melotti
892584e091
#18798 : merge typo fix from 3.3 and also use two unused variables.
2013-08-23 23:09:32 +03:00
Ezio Melotti
78ede7c96d
#18798 : fix typo in test_fcntl. Patch by Vajrasky Kok.
2013-08-23 23:06:31 +03:00
Brett Cannon
9c7eb55570
Stop using assertEquals.
2013-08-23 14:38:11 -04:00
Brett Cannon
7e0a18158f
Make test_import more robust and stop using assertRaisesRegexp().
2013-08-23 14:31:27 -04:00
Victor Stinner
a93c6db68b
(Merge 3.3) Close #17702 : On error, os.environb now removes suppress the except
...
context when raising a new KeyError with the original key.
2013-08-23 19:23:42 +02:00
Victor Stinner
0c2dd0c0a9
Close #17702 : On error, os.environb now removes suppress the except context
...
when raising a new KeyError with the original key.
2013-08-23 19:19:15 +02:00
Brett Cannon
330cc52c99
Delete merge markers
2013-08-23 12:10:09 -04:00
Brett Cannon
16ababc213
merge for issue #18755
2013-08-23 11:52:19 -04:00
Brett Cannon
a4975a911d
Issue #18755 : Allow imp.load_*() loaders to have get_data() called
...
multiple times.
2013-08-23 11:45:57 -04:00
Richard Oudkerk
67e5198dbf
Make test for semaphore tracker capture and check the debug output.
2013-08-22 23:37:23 +01:00
Serhiy Storchaka
254954aacd
Issue #16809 : Tkinter's splitlist() and split() methods now accept Tcl_Obj
...
argument.
This is needed for support Tcl/Tk 8.6.
2013-08-22 17:42:05 +03:00
Serhiy Storchaka
203eb317d2
Issue #16809 : Tkinter's splitlist() and split() methods now accept Tcl_Obj
...
argument.
This is needed for support Tcl/Tk 8.6.
2013-08-22 17:40:31 +03:00
R David Murray
b8c537094d
Merge #18324 : set_payload now correctly handles binary input.
2013-08-21 21:13:51 -04:00
R David Murray
00ae435dee
#18324 : set_payload now correctly handles binary input.
...
This also backs out the previous fixes for for #14360 , #1717 , and #16564 .
Those bugs were actually caused by the fact that set_payload didn't decode to
str, thus rendering the model inconsistent. This fix does mean the data
processed by the encoder functions goes through an extra encode/decode cycle,
but it means the model is always consistent. Future API updates will provide
a better way to encode payloads, which will bypass this minor de-optimization.
Tests by Vajrasky Kok.
2013-08-21 21:10:31 -04:00
Victor Stinner
82fb71d662
Cleanup test_builtin
2013-08-22 01:58:12 +02:00
Victor Stinner
0f24b879c9
Use new new stat.S_ISDOOR() function, instead of hardcoded mask
2013-08-22 01:58:04 +02:00
Antoine Pitrou
1e440cf5a2
Issue #18792 : Use "127.0.0.1" or "::1" instead of "localhost" as much as possible, since "localhost" goes through a DNS lookup under recent Windows versions.
2013-08-22 00:39:46 +02:00
Antoine Pitrou
f6fbf56071
Issue #18792 : Use "127.0.0.1" or "::1" instead of "localhost" as much as possible, since "localhost" goes through a DNS lookup under recent Windows versions.
2013-08-22 00:39:46 +02:00
Victor Stinner
13423c3726
Close #18794 : Add a fileno() method and a closed attribute to select.devpoll
...
objects.
Add also tests on fileno() method and closed attribute of select.epoll and select.kqueue.
2013-08-22 00:19:50 +02:00
Serhiy Storchaka
43f80e6c1f
Merge heads
2013-08-21 21:52:50 +03:00
Richard Oudkerk
a01fb39877
Issue #18762 : Print debug info on failure to create new forkserver process.
...
Also modify test code to hopefully avoid deadlock on failure.
2013-08-21 19:45:19 +01:00
Serhiy Storchaka
4e4088d273
Issue #17119 : Fixed integer overflows when processing large strings and tuples
...
in the tkinter module.
2013-08-21 21:43:08 +03:00
Serhiy Storchaka
9e6b97502f
Issue #17119 : Fixed integer overflows when processing large strings and tuples
...
in the tkinter module.
2013-08-21 21:38:21 +03:00
Christian Heimes
6acbe2aaa3
Issue #18747 : Re-seed OpenSSL's pseudo-random number generator after fork.
...
A pthread_atfork() child handler is used to seeded the PRNG with pid, time
and some stack data.
2013-08-21 13:26:34 +02:00
Christian Heimes
f77b4b20e9
Issue #18747 : Re-seed OpenSSL's pseudo-random number generator after fork.
...
A pthread_atfork() child handler is used to seeded the PRNG with pid, time
and some stack data.
2013-08-21 13:26:05 +02:00
Christian Heimes
0688897f05
Fix rev85282, add missing import of subprocess module
2013-08-20 22:09:41 +02:00
Serhiy Storchaka
5617df1be6
Issue #8865 : Concurrent invocation of select.poll.poll() now raises a
...
RuntimeError exception. Patch by Christian Schubert.
2013-08-20 20:50:32 +03:00
Serhiy Storchaka
b1973c252c
Issue #8865 : Concurrent invocation of select.poll.poll() now raises a
...
RuntimeError exception. Patch by Christian Schubert.
2013-08-20 20:38:21 +03:00
Antoine Pitrou
bb2c45e7a4
Issue #7732 : try to fix test_bug7732's flakiness on Windows by executing it in a fresh temporary directory.
2013-08-19 23:31:18 +02:00
Serhiy Storchaka
228c194596
Issue #2537 : Remove breaked check which prevented valid regular expressions.
...
Patch by Meador Inge.
See also issue #18647 .
2013-08-19 23:19:49 +03:00
Serhiy Storchaka
98985a1980
Issue #2537 : Remove breaked check which prevented valid regular expressions.
...
Patch by Meador Inge.
See also issue #18647 .
2013-08-19 23:18:23 +03:00
Antoine Pitrou
8f0bddad30
Make test_wakeup_write_error more robust
...
(trying to fix a failure on the FreeBSD 9.0 buildbot)
2013-08-17 21:43:47 +02:00
Antoine Pitrou
6f6ec37838
Issue #16105 : When a signal handler fails to write to the file descriptor registered with ``signal.set_wakeup_fd()``, report an exception instead of ignoring the error.
2013-08-17 20:27:56 +02:00
Ezio Melotti
a7e7497d88
#18466 : merge with 3.3.
2013-08-17 16:58:13 +03:00
Ezio Melotti
85a8629d21
#18466 : fix more typos. Patch by Févry Thibault.
2013-08-17 16:57:41 +03:00
Ezio Melotti
e0c69161bc
#18741 : merge with 3.3.
2013-08-17 16:13:22 +03:00
Ezio Melotti
b5bc353b88
#18741 : fix more typos. Patch by Févry Thibault.
2013-08-17 16:11:40 +03:00
Christian Heimes
e06d47c70c
Issue #18709 : Fix CVE-2013-4238. The SSL module now handles NULL bytes
...
inside subjectAltName correctly. Formerly the module has used OpenSSL's
GENERAL_NAME_print() function to get the string represention of ASN.1
strings for rfc822Name (email), dNSName (DNS) and
uniformResourceIdentifier (URI).
2013-08-17 00:58:00 +02:00
Christian Heimes
a3811e4b8f
merge
2013-08-17 00:55:39 +02:00
Christian Heimes
824f7f366d
Issue #18709 : Fix CVE-2013-4238. The SSL module now handles NULL bytes
...
inside subjectAltName correctly. Formerly the module has used OpenSSL's
GENERAL_NAME_print() function to get the string represention of ASN.1
strings for rfc822Name (email), dNSName (DNS) and
uniformResourceIdentifier (URI).
2013-08-17 00:54:47 +02:00
Charles-François Natali
5c03d20757
Issue #16463 : Fix a transient test_timeout failure.
2013-08-16 23:19:56 +02:00
Charles-François Natali
7bf1125e9f
Issue #16463 : Fix a transient test_timeout failure.
2013-08-16 23:19:22 +02:00
Antoine Pitrou
c593056744
Fix the default placeholder in textwrap.shorten() to be " [...]".
...
For some reason I forgot to do it before committing the patch in issue #18585 .
2013-08-16 22:31:12 +02:00
Antoine Pitrou
05eafa887b
Make test.support.reap_threads() faster
2013-08-16 21:02:02 +02:00
Antoine Pitrou
95b21460ee
Issue #18756 : Improve error reporting in os.urandom() when the failure is due to something else than /dev/urandom not existing.
2013-08-16 20:49:32 +02:00
Antoine Pitrou
ec34ab5010
Issue #18756 : Improve error reporting in os.urandom() when the failure is due to something else than /dev/urandom not existing.
2013-08-16 20:44:38 +02:00
Antoine Pitrou
566c470e3e
Issue #1666318 : Add a test that shutil.copytree() retains directory permissions.
...
Patch by Catherine Devlin.
2013-08-16 19:36:18 +02:00
Antoine Pitrou
ac601601ce
Issue #1666318 : Add a test that shutil.copytree() retains directory permissions.
...
Patch by Catherine Devlin.
2013-08-16 19:35:02 +02:00
Christian Heimes
37d5cebb48
Change the builtin hash algorithms' names to lower case names
...
as promised by hashlib's documentation.
2013-08-15 18:31:48 +02:00
Victor Stinner
f0e521036c
(Merge 3.3) Issue #18296 : Try to fix TestSendfile.test_trailers() of test_os on FreeBSD
2013-08-15 11:57:19 +02:00
Victor Stinner
5e4d6398a1
Issue #18296 : Try to fix TestSendfile.test_trailers() of test_os on FreeBSD
2013-08-15 11:57:02 +02:00
Eric Snow
8e4554027b
Closes issue #18698 : ensure importlib.reload() returns the module out of sys.modules.
2013-08-14 18:11:09 -06:00
Eric Snow
7491f1726b
issue #18698 : ensure importlib.reload() returns the module out of sys.modules.
2013-08-14 18:03:34 -06:00
Richard Oudkerk
84ed9a68bd
Issue #8713 : Support alternative start methods in multiprocessing on Unix.
...
See http://hg.python.org/sandbox/sbt#spawn
2013-08-14 15:35:41 +01:00
Victor Stinner
97869103ba
Close #12015 : The tempfile module now uses a suffix of 8 random characters
...
instead of 6, to reduce the risk of filename collision. The entropy was reduced
when uppercase letters were removed from the charset used to generate random
characters.
2013-08-14 01:28:28 +02:00
Ezio Melotti
9eaa3e6732
#18687 : merge with 3.3.
2013-08-13 12:54:29 +03:00
Ezio Melotti
4bfa6c54ca
#18687 : remove obsolete comment. Patch by Févry Thibault.
2013-08-13 12:53:40 +03:00
Senthil Kumaran
07abe7aedb
merge from 3.3
...
Increasing test coverage of ftplib. Patch by Muhammad Jehanzeb
2013-08-12 22:26:14 -07:00
Senthil Kumaran
0d53860e2c
Increasing test coverage of ftplib. Patch by Muhammad Jehanzeb
2013-08-12 22:25:27 -07:00
Antoine Pitrou
389dec8bcf
Issue #18585 : Add :func:`textwrap.shorten` to collapse and truncate a piece of text to a given length.
2013-08-12 22:39:09 +02:00
Ethan Furman
388a3921cf
Issue 18693: Put custom __dir__ back in place. Will instead look at fixing `help()`.
2013-08-12 06:51:41 -07:00
Eli Bendersky
8f2c2bcc9d
Add some docstrings, clarify others, and fix formatting.
2013-08-11 16:48:44 -07:00
Eli Bendersky
01ea326a8e
Close #12645 : Clarify and reformat the documentation of import_fresh_module
2013-08-11 15:43:30 -07:00
Eli Bendersky
ba5517d4c0
Issue #12645 : Clarify and reformat the documentation of import_fresh_module
2013-08-11 15:38:08 -07:00
Serhiy Storchaka
3ee11407f8
Issue #18706 : Fix a test for issue #18681 so it no longer breaks test_codeccallbacks*.
2013-08-11 20:13:36 +03:00
Serhiy Storchaka
b212291b08
Issue #18706 : Fix a test for issue #18681 so it no longer breaks test_codeccallbacks*.
2013-08-11 20:12:20 +03:00
Terry Jan Reedy
4a0b6f70f6
Issue #15301 : skip new test method so Windows builtbots stop failing.
2013-08-10 20:58:59 -04:00
Ethan Furman
53f58dbd12
Close #18693 : __dir__ removed from Enum; help() now helpful.
2013-08-10 13:07:49 -07:00
Ethan Furman
a4998a7041
Close #18264 : int- and float-derived enums now converted to int or float.
2013-08-10 13:01:45 -07:00
Ezio Melotti
fbcf4d78c8
#18681 : merge with 3.3.
2013-08-10 20:01:43 +03:00
Ezio Melotti
056bafe7a6
#18681 : Fix a NameError in imp.reload() (noticed by Weizhao Li).
2013-08-10 19:59:36 +03:00
R David Murray
13f4cd6c10
Merge heads.
2013-08-10 12:13:44 -04:00
R David Murray
a9e67ad993
Merge heads.
2013-08-10 12:08:41 -04:00
R David Murray
2bb2f6acd0
Merge #8112 : Update the documenting xmlrpc server to use getfullargspec.
2013-08-10 12:03:54 -04:00
R David Murray
f22b62e261
#8112 : Update the documenting xmlrpc server to use getfullargspec.
...
Before this patch it would raise an error when trying to display
documentation for a method that used annotations.
Patch by Claudiu Popa.
2013-08-10 12:01:47 -04:00
Ezio Melotti
a1e639a0f4
#18505 : merge with 3.3.
2013-08-10 18:57:52 +03:00
Ezio Melotti
1c4810b57b
#18505 : fix duplicate name and remove duplicate test. Patch by Vajrasky Kok.
2013-08-10 18:57:12 +03:00
Ezio Melotti
8281e7c24c
#18453 : merge with 3.3.
2013-08-10 18:37:36 +03:00
Ezio Melotti
319163244a
#18453 : fix unused variables in test_xmlrpc. Patch by Vajrasky Kok.
2013-08-10 18:37:05 +03:00
Ezio Melotti
06c9ab5666
#18465 : merge with 3.3.
2013-08-10 18:30:57 +03:00
Ezio Melotti
0f12be15c6
#18465 : fix unused variables in test_minidom. Patch by Vajrasky Kok.
2013-08-10 18:30:29 +03:00
Ezio Melotti
490eef9a60
#18484 : merge with 3.3.
2013-08-10 18:20:59 +03:00
Ezio Melotti
1d237e5356
#18484 : improve test coverage of http.cookiejar. Patch by Vajrasky Kok.
2013-08-10 18:20:09 +03:00
Ezio Melotti
7f5218a07f
#18483 : merge with 3.3.
2013-08-10 18:08:13 +03:00
Ezio Melotti
7ac17f85d3
#18483 : add one more date format in test_http2time_formats. Patch by Vajrasky Kok.
2013-08-10 18:07:25 +03:00
Christian Heimes
ad73a9cf97
Issue #16400 : Add command line option for isolated mode.
...
-I
Run Python in isolated mode. This also implies -E and -s. In isolated mode
sys.path contains neither the script’s directory nor the user’s
site-packages directory. All PYTHON* environment variables are ignored,
too. Further restrictions may be imposed to prevent the user from
injecting malicious code.
2013-08-10 16:36:18 +02:00
R David Murray
bb17d2b857
#18600 : add policy to add_string, and as_bytes and __bytes__ methods.
...
This was triggered by wanting to make the doctest in email.policy.rst pass;
as_bytes and __bytes__ are clearly useful now that we have BytesGenerator.
Also updated the Message docs to document the policy keyword that was
added in 3.3.
2013-08-09 16:15:28 -04:00
Ezio Melotti
d119b7beba
#18357 : merge with 3.3.
2013-08-08 20:12:57 +03:00
Ezio Melotti
2532635fcd
#18357 : add tests for dictview set difference. Patch by Fraser Tweedale.
2013-08-08 20:12:28 +03:00
Ezio Melotti
e1a6edcebe
#18581 : merge with 3.3.
2013-08-08 19:37:52 +03:00
Ezio Melotti
4e4f3b8d35
#18581 : remove duplicate test and run a test class that was skipped. Initial patch by Vajrasky Kok.
2013-08-08 19:36:36 +03:00
Ezio Melotti
5cc06fde43
#18273 : merge with 3.3.
2013-08-08 15:18:26 +03:00
Ezio Melotti
66f2ea042a
#18273 : move the tests in Lib/test/json_tests to Lib/test/test_json and make them discoverable by unittest. Patch by Zachary Ware.
2013-08-08 15:03:45 +03:00
Larry Hastings
a27b83ad2d
Issue #15301 : Parsing fd, uid, and gid parameters for builtins
...
in Modules/posixmodule.c is now far more robust.
2013-08-08 00:19:50 -07:00
Antoine Pitrou
236a547b3e
Issue #18665 : fix typos. Patch by Vajrasky Kok.
2013-08-06 23:06:59 +02:00
Antoine Pitrou
dbfc129cc8
Issue #18666 : improve test_frame a bit. Patch by Vajrasky Kok.
2013-08-06 23:05:23 +02:00
Serhiy Storchaka
9b855de8d2
Issue #14323 : Expanded the number of digits in the coefficients for the
...
RGB -- YIQ conversions so that they match the FCC NTSC versions.
2013-08-06 11:51:23 +03:00
Antoine Pitrou
9e3d27b574
Followup to 862ab99ab570: I forgot to add the magnificent test_frame.py.
2013-08-05 23:35:43 +02:00
Antoine Pitrou
58720d6145
Issue #17934 : Add a clear() method to frame objects, to help clean up expensive details (local variables) and break reference cycles.
2013-08-05 23:26:40 +02:00
Antoine Pitrou
c53204b947
Issue #4885 : Add weakref support to mmap objects. Patch by Valerie Lambert.
2013-08-05 23:17:30 +02:00
Gregory P. Smith
914061ab15
* Fix the assertions in hashlib to use unittest assertion methods instead of
...
evil assert statements.
* Add an additional assert to the new test_name_attribute test that actually
confirms that a hash created using each h.name results in a new hash sharing
the same name.
2013-08-05 13:14:37 -07:00
Mark Dickinson
f3e4b62d02
Issue #18659 : Backed out changeset cfd875bcbe41 after buildbot failures.
2013-08-05 10:59:36 +01:00
Mark Dickinson
a9e626f704
Issue #18659 : fix test_format test that wasn't being executed. Thanks Vajrasky Kok for the patch.
2013-08-05 10:30:14 +01:00
Jason R. Coombs
b2aa6f4055
Issue 18532: Added tests and documentation to formally specify the .name attribute on hashlib objects.
2013-08-03 11:39:39 +02:00
Alexander Belopolsky
790d269d39
Fixes #8860 : Round half-microseconds to even in the timedelta constructor.
...
(Original patch by Mark Dickinson.)
2013-08-04 14:51:35 -04:00
Ethan Furman
5e5a8230c2
Close #18635 : Move class level private attribute from instance to class.
2013-08-04 08:42:23 -07:00
Eli Bendersky
b9b6ce6f2c
Merge fix for Issue #17011 from 3.3
2013-08-03 17:48:41 -07:00
Eli Bendersky
2acc525a97
Issue #17011 : Fix caching of xpath path when namespaces are present.
...
Thanks to Stefan Behnel for the report and proposed solution & test.
2013-08-03 17:47:47 -07:00
Serhiy Storchaka
739e75000f
Issue #16741 : Remove testing of implementation artifact.
2013-08-04 01:05:02 +03:00
Serhiy Storchaka
3ceaff0777
Issue #16741 : Remove testing of implementation artifact.
2013-08-04 01:04:15 +03:00
Serhiy Storchaka
579ddc2fd4
Issue #16741 : Fix an error reporting in int().
2013-08-03 21:14:05 +03:00
Serhiy Storchaka
f6d0aeeadc
Issue #16741 : Fix an error reporting in int().
2013-08-03 20:55:06 +03:00
Serhiy Storchaka
e633bed44a
Merge heads
2013-08-03 19:28:28 +03:00
Serhiy Storchaka
b94f61b6fb
Issue #17998 : Fix an internal error in regular expression engine.
2013-08-03 19:22:28 +03:00
Serhiy Storchaka
1f35ae0a3c
Issue #17998 : Fix an internal error in regular expression engine.
2013-08-03 19:18:38 +03:00
Mark Dickinson
d41102dac8
Remove debugging print.
2013-08-03 17:14:50 +01:00
doko@ubuntu.com
fb0ffa12fc
- Fix a fcntl test case on KFreeBSD, Debian #708653 (Petr Salinger).
2013-08-03 16:18:55 +02:00
doko@ubuntu.com
1dfb9180a7
- Fix a fcntl test case on KFreeBSD, Debian #708653 (Petr Salinger).
2013-08-03 16:12:33 +02:00
Nick Coghlan
1337130335
Merge #18396 from 3.3
2013-08-03 23:03:27 +10:00
Nick Coghlan
60b3ac7482
Close #18396 : fix spurious test_signal failure on Windows
...
signal.getsignal returns None for some signals if faulthandler
is enabled (Patch by Jeremy Kloth)
2013-08-03 22:56:30 +10:00
Ned Deily
582583bc41
Issue #17046 : merge from 3.3
2013-08-02 18:05:31 -07:00
Ned Deily
e92dfbfec8
Issue #17046 : Fix test_subprocess test_executable_without_cwd broken test case.
2013-08-02 18:02:21 -07:00
Charles-François Natali
1d7ec8f26c
Issue #18325 : Fix a test_kqueue failure on OpenBSD: kevent's data and event
...
members are integers.
2013-08-02 10:22:07 +02:00
Charles-François Natali
6ddd2653ab
Issue #18325 : Fix a test_kqueue failure on OpenBSD: kevent's data and event
...
members are integers.
2013-08-02 10:21:20 +02:00
Antoine Pitrou
284e5ce67e
Fix the RLIMIT_CORE resource lowering logic in test_subprocess.
...
We must only lower the soft limit, since lowering the hard limit makes it impossible to raise it back at the end.
(this could prevent core dumps from being generated when the test suite crashes)
2013-08-02 00:08:51 +02:00
Antoine Pitrou
2d350fd8af
Issue #18619 : Fix atexit leaking callbacks registered from sub-interpreters, and make it GC-aware.
2013-08-01 20:56:12 +02:00
Antoine Pitrou
7a2572cb49
test_capi: make a specific test case for the subinterpreter test
...
(it was wrongly classified in the pending calls test case)
2013-08-01 20:43:26 +02:00
Antoine Pitrou
4ed328c4d7
Add a test for module weakrefability
2013-08-01 19:20:31 +02:00
Tim Golden
b2fcebb018
issue9035: Prevent Windows-specific tests from running on non-Windows platforms
2013-08-01 13:58:58 +01:00
Tim Golden
6b528067c5
Issue #9035 : os.path.ismount now recognises volumes mounted below
...
a drive root on Windows. Original patch by Atsuo Ishimoto.
2013-08-01 12:44:00 +01:00
R David Murray
536ffe161c
#17616 : Improve context manager tests, fix bugs in close method and mode docs.
...
'mode' docs fix: the file must always be opened in binary in Python3.
Bug in Wave_write.close: when the close method calls the check that the header
exists and it raises an error, the _file attribute never gets set to None, so
the next close tries to close the file again and we get an ignored traceback
in the __del__ method. The fix is to set _file to None in a finally clause.
This represents a behavior change...in theory a program could be checking for
the error on close and then doing a recovery action on the still open file and
closing it again. But this change will only go into 3.4, so I think that
behavior change is acceptable given that it would be pretty weird and unlikely
logic to begin with.
2013-07-31 20:48:26 -04:00
Antoine Pitrou
dcedaf6e53
Issue #18214 : Improve finalization of Python modules to avoid setting their globals to None, in most cases.
2013-07-31 23:14:08 +02:00
R David Murray
c91d5eea10
#17616 : wave.open now supports the 'with' statement.
...
Feature and tests by ClClaudiu.Popa, I added the doc changes.
2013-07-31 13:46:08 -04:00
Antoine Pitrou
796564c27b
Issue #18112 : PEP 442 implementation (safe object finalization).
2013-07-30 19:59:21 +02:00
Christian Heimes
c5d95b17ac
Add simple test for repr(lock)
2013-07-30 15:54:39 +02:00
Christian Heimes
8ad91cc354
Add simple test for resource.getpagesize()
2013-07-30 15:44:24 +02:00
Christian Heimes
4ebc9295d1
Add simple test for resource.getpagesize()
2013-07-30 15:44:13 +02:00
Christian Heimes
d49a371e91
Issue #18599 : Fix name attribute of _sha1.sha1() object. It now returns
...
'SHA1' instead of 'SHA'.
Add more tests for hashlib and hash object attributes
2013-07-30 15:35:54 +02:00
Christian Heimes
65aa573082
Add more tests for hashlib and hash object attributes
2013-07-30 15:33:30 +02:00
Nick Coghlan
00dc61cd73
Merge #15415 from 3.3 (again)
2013-07-29 17:52:21 +10:00
Nick Coghlan
c06c0aed58
Third attempt to fix #15415 on Windows
...
With help from jkloth on IRC, so it will hopefully work
this time :)
2013-07-29 17:51:16 +10:00
Nick Coghlan
4bcb1ec539
Merge #15415 Windows buildbot change from 3.3
2013-07-29 15:19:29 +10:00
Nick Coghlan
2f253e8e62
Attempt to fix #15415 on Windows
2013-07-29 15:18:09 +10:00
Nick Coghlan
cf67b2a891
Merge #15415 from 3.3
2013-07-28 22:25:25 +10:00
Nick Coghlan
5517596c04
Close #15415 : Factor out temp dir helpers to test.support
...
Patch by Chris Jerdonek
2013-07-28 22:11:50 +10:00
Nick Coghlan
69e3bda310
Issue #15494 : test.support is now a package rather than a module
...
Also including this change in 3.3 to help avoid spurious conflicts
between the two most active branches.
(Initial patch by Indra Talip)
2013-07-28 21:06:50 +10:00
Nick Coghlan
fb15aa1e08
Close #15494 : test.support is now a package rather than a module
...
Initial patch by Indra Talip
2013-07-28 20:56:19 +10:00
Nick Coghlan
e8c45d6d0e
Close #13266 : Add inspect.unwrap
...
Initial patch by Daniel Urban and Aaron Iles
2013-07-28 20:00:01 +10:00
Raymond Hettinger
77578204d6
Restore the data block size to 62.
...
The former block size traded away good fit within cache lines in
order to gain faster division in deque_item(). However, compilers
are getting smarter and can now replace the slow division operation
with a fast integer multiply and right shift. Accordingly, it makes
sense to go back to a size that lets blocks neatly fill entire
cache-lines.
GCC-4.8 and CLANG 4.0 both compute "x // 62" with something
roughly equivalent to "x * 9520900167075897609 >> 69".
2013-07-28 02:39:49 -07:00
Terry Jan Reedy
1f1d0a57fa
Merge with 3.3
2013-07-28 00:00:47 -04:00
Terry Jan Reedy
725d9dd1a7
Issue #18441 : Make test.support.requires('gui') skip when it should.
2013-07-28 00:00:20 -04:00
Benjamin Peterson
290371dadc
merge 3.3 ( #18565 )
2013-07-27 14:07:19 -07:00
Benjamin Peterson
d979c72160
add a test for issue #17669 ( closes #18565 )
...
Patch from Phil Connell.
2013-07-27 14:06:56 -07:00
Ethan Furman
b41803e3ef
Close #18545 : now only executes member_type if no _value_ is assigned in __new__.
2013-07-25 13:50:45 -07:00
R David Murray
4d35e75ca0
#17818 : aifc.getparams now returns a namedtuple.
...
Patch by Claudiu Popa.
2013-07-25 16:12:01 -04:00
R David Murray
4d0f808c24
#18503 : small cleanups in test_email.
...
Patch by Vajrasky Kok.
2013-07-25 12:15:28 -04:00
R David Murray
271ade87ac
#18503 : small cleanups in test_email.
...
Patch by Vajrasky Kok.
2013-07-25 12:11:55 -04:00
Ezio Melotti
99f969e7c7
#14853 : merge with 3.3.
2013-07-25 05:24:47 +02:00
Ezio Melotti
b042daa5a7
#14853 : remove test that was making too many assumptions about stdin. Patch by Elena Oat.
2013-07-25 05:21:00 +02:00
Serhiy Storchaka
9068e4d642
Issue #17944 : test_zipfile now discoverable and uses subclassing to
...
generate tests for different compression types. Fixed a bug with skipping
some tests due to use of exhausted iterators.
2013-07-22 21:02:14 +03:00
Serhiy Storchaka
fa6bc29987
Issue #17944 : test_zipfile now discoverable and uses subclassing to
...
generate tests for different compression types. Fixed a bug with skipping
some tests due to use of exhausted iterators.
2013-07-22 21:00:11 +03:00
Antoine Pitrou
2894073e1a
test_ssl: use a bytestring here
2013-07-20 19:36:15 +02:00
Antoine Pitrou
60a26e0516
Issue #9177 : Calling read() or write() now raises ValueError, not AttributeError, on a closed SSL socket.
...
Patch by Senko Rasic.
2013-07-20 19:35:16 +02:00
Ethan Furman
520ad57916
Change _names to _names_ since the latter is reserved for Enum use.
...
Before this change only the methods were _single_underscored_; now
the attributes are as well.
2013-07-19 19:47:21 -07:00
Ethan Furman
2aa2732eaf
Close #18508 -- fix _value2member_map to always have the member's value
2013-07-19 19:35:56 -07:00
Richard Oudkerk
e410f267f1
Merge.
2013-07-19 22:54:37 +01:00
Richard Oudkerk
14f5ee0a62
Prevent dangling threads/process warning for test_multiprocessing.
2013-07-19 22:53:42 +01:00
Ethan Furman
f24bb35a69
closes issue18042 -- a `unique` decorator is added to enum.py
...
The docs also clarify the 'Interesting Example' duplicate-free enum is for
demonstration purposes.
2013-07-18 17:05:39 -07:00
Serhiy Storchaka
e5553142d4
Issue #18266 : test_largefile now works with unittest test discovery and
...
supports running only selected tests. Patch by Zachary Ware.
2013-07-17 13:44:17 +03:00
Serhiy Storchaka
c406a121f7
Issue #18266 : test_largefile now works with unittest test discovery and
...
supports running only selected tests. Patch by Zachary Ware.
2013-07-17 13:42:24 +03:00
Serhiy Storchaka
cb478b72a3
Issue #17767 : test_locale now works with unittest test discovery.
...
Original patch by Zachary Ware.
2013-07-17 13:26:48 +03:00
Serhiy Storchaka
880254e222
Issue #17767 : test_locale now works with unittest test discovery.
...
Original patch by Zachary Ware.
2013-07-17 13:23:45 +03:00
R David Murray
743e3d5139
Merge: Closes #18475 : add unittest.main() to test_email/test_inversions.
2013-07-16 11:46:00 -04:00
R David Murray
b5c9dfdab3
Closes #18475 : add unittest.main() to test_email/test_inversions.
...
Patch by Vajrasky Kok.
2013-07-16 11:45:31 -04:00
Richard Oudkerk
a84a7cb06b
Issue #17778 : Fix test discovery for test_multiprocessing. (Patch by
...
Zachary Ware.)
2013-07-16 15:57:16 +01:00
Richard Oudkerk
d15642e428
Issue #17778 : Fix test discovery for test_multiprocessing. (Patch by
...
Zachary Ware.)
2013-07-16 15:33:41 +01:00
Ronald Oussoren
e6f2175afb
Also remove a (broken) leaker test for the code removed in issue #18393 .
2013-07-16 08:32:05 +02:00
Victor Stinner
775b2dd778
test_io: check_interrupted_write() now cancels the alarm if ZeroDivisionError
...
exception was not raised.
Before the process was killed by SIGALRM in another random test (1 second later)
2013-07-15 19:53:13 +02:00
R David Murray
48830035e5
Closes #18464 : fix typo in test name.
2013-07-15 12:09:47 -04:00
R David Murray
7f93b36e73
Merge: Closes #18464 : fix typo in test name.
2013-07-15 12:10:29 -04:00
Nick Coghlan
24c05bc154
Close issue 17482: don't overwrite __wrapped__
2013-07-15 21:13:08 +10:00
Raymond Hettinger
468bcaffd6
merge
2013-07-13 22:48:49 -07:00
Raymond Hettinger
889b92d3aa
Issue #18432 : Fix unintended API change in the sched module
2013-07-13 22:42:09 -07:00
R David Murray
1f9d24a18d
Merge: #18431 : Decode encoded words in atoms in new email parser.
2013-07-12 16:01:10 -04:00
R David Murray
923512f327
#18431 : Decode encoded words in atoms in new email parser.
...
There is more to be done here in terms of accepting RFC invalid
input that some mailers accept, but this covers the valid
RFC places where encoded words can occur in structured headers.
2013-07-12 16:00:28 -04:00
Brett Cannon
a79e4fb38d
Issue #18342 : Use the repr of a module name for ``from ... import
...
...`` when an ImportError occurs.
Other cases had already been switched over to using the repr.
Thanks to Tomasz Maćkowiak for the patch.
2013-07-12 11:22:26 -04:00
R David Murray
63194a774e
Merge: #18044 : Fix parsing of encoded words of the form =?utf8?q?=XX...?=
2013-07-11 15:58:07 -04:00
R David Murray
65171b28e7
#18044 : Fix parsing of encoded words of the form =?utf8?q?=XX...?=
...
The problem was I was only checking for decimal digits after the third '?',
not for *hex* digits :(.
This changeset also fixes a couple of comment typos, deletes an unused
function relating to encoded word parsing, and removed an invalid
'if' test from the folding function that was revealed by the tests
written to validate this issue.
2013-07-11 15:52:57 -04:00
Serhiy Storchaka
f9e6672ae8
Issue #17872 : Fix a segfault in marshal.load() when input stream returns
...
more bytes than requested.
2013-07-11 22:28:18 +03:00
Serhiy Storchaka
3641a74e1c
Issue #17872 : Fix a segfault in marshal.load() when input stream returns
...
more bytes than requested.
2013-07-11 22:20:47 +03:00
Serhiy Storchaka
50ae3f680b
Issue #18101 : Tcl.split() now process strings nested in a tuple as it
...
do with byte strings.
Added tests for Tcl.split() and Tcl.splitline().
2013-07-11 20:36:00 +03:00
Serhiy Storchaka
275d5fdbe4
Issue #18101 : Tcl.split() now process strings nested in a tuple as it
...
do with byte strings.
Added tests for Tcl.split() and Tcl.splitline().
2013-07-11 20:34:47 +03:00
Serhiy Storchaka
e3ed4edb94
Issue #18338 : `python --version` now prints version string to stdout, and
...
not to stderr. Patch by Berker Peksag and Michael Dickens.
2013-07-11 20:01:17 +03:00
R David Murray
e173d01231
Merge #17987 : properly document support.captured_xxx.
2013-07-11 12:29:31 -04:00
R David Murray
5a33f81348
#17987 : properly document support.captured_xxx.
...
Patch by Dmi Baranov.
2013-07-11 12:28:40 -04:00
R David Murray
16dbbae298
#18116 : getpass no longer always falls back to stdin.
...
Also fixes a resource warning that occurred when the fallback is taken.
Patch by Serhiy Storchaka.
(We couldn't figure out how to write tests for this.)
2013-07-10 17:02:24 -04:00
Charles-François Natali
19361a2046
Issue #18308 : don't take the scope ID into account when comparing IPv6
...
addresses.
2013-07-09 19:16:32 +02:00
Charles-François Natali
37114bb548
Issue #18308 : don't take the scope ID into account when comparing IPv6
...
addresses.
2013-07-09 19:15:43 +02:00
Raymond Hettinger
d9c116ca40
Add a spacing saving heuristic to deque's extend methods
2013-07-09 00:13:21 -07:00
Ezio Melotti
bf5af5d5bc
Merge str.center tests from 3.3.
2013-07-08 17:49:59 +02:00
Ezio Melotti
f84e01df31
Add a couple of tests for str.center with non-ASCII chars.
2013-07-08 17:48:29 +02:00
Ezio Melotti
0cb2aafb36
#18106 : refactor tests to use subtests and proper assert methods. Patch by Vajrasky Kok.
2013-07-07 13:37:20 +02:00
Ezio Melotti
9f96789cdc
#17198 : merge with 3.3.
2013-07-07 13:16:05 +02:00
Ezio Melotti
b08495bbcf
#17198 : Fix a NameError in the dbm module. Patch by Valentina Mukhamedzhanova.
2013-07-07 13:15:08 +02:00
Florent Xicluna
74a146d3ac
Merge #18013 : Fix cgi.FieldStorage to parse the W3C sample form.
2013-07-07 12:46:28 +02:00
Florent Xicluna
331c3fd874
Issue #18013 : Fix cgi.FieldStorage to parse the W3C sample form.
2013-07-07 12:44:28 +02:00
Brett Cannon
7e5d55705c
merge for issue #18351 .
2013-07-06 18:04:41 -04:00
Brett Cannon
a53cca3fea
Issue #18351 : Fix various issues with
...
importlib._bootstrap._get_sourcefile().
Thanks to its only use by the C API, it was never properly tested
until now.
Thanks to Neal Norwitz for discovering the bug and Madison May for the patch.
2013-07-06 17:56:43 -04:00
Ezio Melotti
e0a39de647
#18380 : merge with 3.3.
2013-07-06 17:17:45 +02:00
Ezio Melotti
2a99d5df63
#18380 : pass regex flags to the right argument. Patch by Valentina Mukhamedzhanova.
2013-07-06 17:16:04 +02:00