Commit Graph

32001 Commits

Author SHA1 Message Date
Brett Cannon 9c1334ef7d #17115: Remove what appears to be a useless chunk of code which broke
other tests.
2013-05-04 17:27:59 -04:00
Antoine Pitrou 1a6cb30a34 Issue #5845: Enable tab-completion in the interactive interpreter by default, thanks to a new sys.__interactivehook__.
(original patch by Éric Araujo)
2013-05-04 20:08:35 +02:00
Brett Cannon 4c14b5de1c #17115,17116: Have modules initialize the __package__ and __loader__
attributes to None.

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

This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
2013-05-04 13:56:58 -04:00
Ezio Melotti 4e59af7abd #7855: merge with 3.3. 2013-05-04 17:47:54 +03:00
Ezio Melotti 28faf03d44 #7855: Add tests for ctypes/winreg for issues found in IronPython. Initial patch by Dino Viehland. 2013-05-04 17:46:23 +03:00
Serhiy Storchaka 59115aa7c9 Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions. 2013-05-04 15:12:55 +03:00
Brett Cannon 95ea11fa31 add trailing newline to file 2013-05-03 10:57:08 -04:00
Brett Cannon 142685337f Move test_imp over to unittest.main() 2013-05-03 10:56:19 -04:00
Brett Cannon 130e48199a Guard more tests in test_imp requiring imp.load_dynamic() to exist. 2013-05-03 10:54:23 -04:00
Brett Cannon 2a9c653f38 #15902: merge w/ 3.3 2013-05-03 10:47:17 -04:00
Brett Cannon 9d0f772c51 Issue #15902: Fix imp.load_module() to accept None as a file when
trying to load an extension module.

While at it, also add a proper unittest.skipIf() guard to another test
involving imp.load_dynamic().
2013-05-03 10:37:08 -04:00
Raymond Hettinger 4072875dcb merge 2013-05-03 02:41:02 -07:00
Raymond Hettinger b98dcc1f53 Issue #15535: Fix pickling of named tuples. 2013-05-03 02:24:15 -07:00
Antoine Pitrou 242db728e2 Issue #13721: SSLSocket.getpeercert() and SSLSocket.do_handshake() now raise an OSError with ENOTCONN, instead of an AttributeError, when the SSLSocket is not connected. 2013-05-01 20:52:07 +02:00
Ezio Melotti f6ca26fbff #17802: merge with 3.3. 2013-05-01 16:20:00 +03:00
Ezio Melotti 8e596a765c #17802: Fix an UnboundLocalError in html.parser. Initial tests by Thomas Barlow. 2013-05-01 16:18:25 +03:00
Ezio Melotti 1698babd1b #14679: add an __all__ (that contains only HTMLParser) to html.parser. 2013-05-01 16:09:34 +03:00
Ezio Melotti ed52f6cb73 #11078: test___all__ now checks for duplicates in __all__. Initial patch by R. David Murray. 2013-05-01 14:58:09 +03:00
Antoine Pitrou 4c09c2cbd5 Issue #17712: Fix test_gdb failures on Ubuntu 13.04. 2013-05-01 00:17:45 +02:00
Antoine Pitrou 81641d6ebc Issue #17712: Fix test_gdb failures on Ubuntu 13.04. 2013-05-01 00:15:44 +02:00
Benjamin Peterson 3b0431dc60 check local class namespace before reaching for cells (closes #17853) 2013-04-30 09:41:40 -04:00
Benjamin Peterson d9fec15e9b refactor traceback.py to reduce code duplication (closes #17646)
Patch by Martin Morrison.
2013-04-29 16:09:39 -04:00
Benjamin Peterson 5c089314ef merge 3.3 2013-04-29 09:08:33 -04:00
Benjamin Peterson 7d110042c5 raise an ImportError (rather than fatal) when __import__ is not found in __builtins__ (closes #17867) 2013-04-29 09:08:14 -04:00
Brett Cannon e1d30f24ee merge for issue #17358 2013-04-28 11:58:31 -04:00
Brett Cannon 5a4c233a9e Issue #17358: imp.load_source() and load_compiled() should now return
modules which will typically work when reloaded.

A hack is used to support these functions as their API allowed them to
pass in a file object but then operate as if import had loaded them.
Unfortunately the hack kept a reference around for the file object
passed in which would be unusable on reload since it had been closed.
The solution is to simply use the hack for the initial load but then a
proper loader on the module so that imp.reload() at least has a chance
to work.
2013-04-28 11:53:26 -04:00
Serhiy Storchaka 337f9785fc Added base64 module tests for non-binary files. 2013-04-28 15:56:32 +03:00
Serhiy Storchaka abac0a7744 Added base64 module tests for non-binary files. 2013-04-28 15:56:11 +03:00
Serhiy Storchaka 1cda4535b5 Issue #17842. Added base64 module tests with bytearray arguments.
Original patch by Kushal Das.
2013-04-28 15:53:54 +03:00
Serhiy Storchaka 017523c4f4 Issue #17842. Added base64 module tests with bytearray arguments.
Original patch by Kushal Das.
2013-04-28 15:53:08 +03:00
Georg Brandl ba2f8be4c6 Issue #17843: Remove bz2 test data that triggers antivirus warnings. 2013-05-12 11:11:51 +02:00
Georg Brandl ce654f48aa Issue #15535: Fix pickling of named tuples. 2013-05-12 11:09:11 +02:00
Antoine Pitrou 9f14681959 Issue #17804: New function ``struct.iter_unpack`` allows for streaming struct unpacking. 2013-04-27 00:20:04 +02:00
Giampaolo Rodola' 3da670749a merge heads 2013-04-26 15:24:42 +02:00
Giampaolo Rodola' 11a9bd62b1 ftplib: update connect() docstring by mentioning 'timeout' argument 2013-04-26 15:23:43 +02:00
R David Murray f0f7ceae3c 17830: preserve line endings of original file when updating keywords.
This fixes the test failures on Windows from the new tests, and
includes test fixes as well as the module fix.
2013-04-25 12:01:36 -04:00
Senthil Kumaran 5238092592 Issue #17272: Making the urllib.request's Request.full_url a descriptor. Fixes
bugs with assignment to full_url. Patch by Demian Brecht.
2013-04-25 05:45:48 -07:00
Antoine Pitrou 34373b2252 Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes. 2013-04-24 23:33:20 +02:00
Antoine Pitrou e1a1674e1e Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes. 2013-04-24 23:31:38 +02:00
Brett Cannon 51460cc490 Issue #17244: Windows doesn't let you set permissions on directories. 2013-04-24 16:34:07 -04:00
Łukasz Langa 06d3abbff3 clean the environment from pre-existing PYTHONWARNINGS for test_warnings 2013-04-24 01:51:42 +02:00
Łukasz Langa 6ae466732c clean the environment from pre-existing PYTHONWARNINGS for test_warnings 2013-04-24 01:49:52 +02:00
Łukasz Langa 20ea96f29a backported rev 79713 from 3.4, test_recursion_limit skipped for -O0 2013-04-24 01:29:26 +02:00
Łukasz Langa f3d8fb142d fix character index in ExtendedInterpolation's exception message 2013-04-24 01:25:55 +02:00
Łukasz Langa fa608186b4 fix character index in ExtendedInterpolation's exception message 2013-04-24 01:25:18 +02:00
Ronald Oussoren a8a5c58a19 (3.3->default) Ensure that plistlib doesn't corrupt deeply nested datastructures
Without this changeset plistlib would write empty tags for plistlib.Data
objects in deeply nested datastructures.

Fixes #17353
2013-04-23 13:48:29 +02:00
Ronald Oussoren 326edfde56 Ensure that plistlib doesn't corrupt deeply nested datastructures
Without this changeset plistlib would write empty tags for plistlib.Data
objects in deeply nested datastructures.

Fixes #17353
2013-04-23 13:47:22 +02:00
Serhiy Storchaka b00b596c05 Issue #11714: Use 'with' statements to assure a Semaphore releases a
condition variable.  Original patch by Thomas Rachel.
2013-04-22 22:54:16 +03:00
Serhiy Storchaka 81a5855a27 Issue #11714: Use 'with' statements to assure a Semaphore releases a
condition variable.  Original patch by Thomas Rachel.
2013-04-22 22:51:43 +03:00
Serhiy Storchaka fcd9f22238 Issue #16624: `subprocess.check_output` now accepts an `input` argument,
allowing the subprocess's stdin to be provided as a (byte) string.
Patch by Zack Weinberg.
2013-04-22 20:20:54 +03:00
Vinay Sajip 40589f4b63 Closes #17795: Reverted backwards-incompatible change in SysLogHandler with Unix domain sockets. 2013-04-22 10:14:12 +01:00
Vinay Sajip e917052e1a Issue #17795: Reverted backwards-incompatible change in SysLogHandler with Unix domain sockets. 2013-04-22 10:07:40 +01:00
R David Murray 3927d802b6 Merge #17065: Use process-unique key for winreg test.
Patch by Jeremy Kloth.
2013-04-21 10:10:50 -04:00
R David Murray 4140fb5211 #17065: Use process-unique key for winreg test.
Patch by Jeremy Kloth.
2013-04-21 10:08:02 -04:00
Ezio Melotti 38bae2d7f1 Merge removal of duplicated tests from 3.3. 2013-04-21 03:55:49 +03:00
Ezio Melotti 65f7a9e3c0 Remove duplicated tests. 2013-04-21 03:55:17 +03:00
Alexandre Vassalotti f3bc946628 Merge 3.3 2013-04-20 13:25:55 -07:00
Alexandre Vassalotti 1f7492c28a Isuse #17720: Fix APPENDS handling in the Python implementation of Unpickler
to correctly process the opcode when it is used on non-list objects.
2013-04-20 13:19:46 -07:00
Antoine Pitrou a85017fbe3 Issue #16694: Add a pure Python implementation of the operator module.
Patch by Zachary Ware.
2013-04-20 19:21:44 +02:00
Eli Bendersky c9f5ca232a Remove superfluous try/except 2013-04-20 09:11:37 -07:00
Eli Bendersky bf05df2396 Make license notices more consistent and remove old changelog.
Also remove unused macro.
2013-04-20 05:44:01 -07:00
R David Murray 87e984c1ed #9607: restore keywords.kwlist after testing it. 2013-04-19 22:38:58 -04:00
R David Murray 32a23c36b4 #9607: Add tests for the keyword module.
Based on the testing ideas in a patch written by Greg Malcolm.
2013-04-19 22:15:26 -04:00
R David Murray f097f175dd Merge #17413: make sure settrace funcs get passed exception instances for 'value'.
Patch by Ingrid Cheung and Brendan McLoughlin.
2013-04-19 12:57:54 -04:00
R David Murray 3583761bcd #17413: make sure settrace funcs get passed exception instances for 'value'.
Patch by Ingrid Cheung and Brendan McLoughlin.
2013-04-19 12:56:57 -04:00
Ezio Melotti 77badf32c9 #17790: merge with 3.3. 2013-04-19 05:59:17 +03:00
Ezio Melotti ab5ba7918e #17790: test_set now works with unittest test discovery. Patch by Zachary Ware. 2013-04-19 05:58:44 +03:00
Ezio Melotti ba5da9437e #17789: merge with 3.3. 2013-04-19 05:46:08 +03:00
Ezio Melotti 3e4a98bd1c #17789: test_random now works with unittest test discovery. Patch by Zachary Ware. 2013-04-19 05:45:27 +03:00
Ezio Melotti a108112680 #17779: merge with 3.3. 2013-04-19 05:38:48 +03:00
Ezio Melotti aaa5d1c582 #17779: test_osx_env now works with unittest test discovery. Patch by Zachary Ware. 2013-04-19 05:38:18 +03:00
Ezio Melotti f7520dc0d7 Fix uploadTestCase to work even when HTTPSConnection is not available. 2013-04-19 04:23:09 +03:00
Ezio Melotti 72b8502992 #11182: remove the unused and undocumented pydoc.Scanner class. Patch by Martin Morrison. 2013-04-19 02:53:12 +03:00
Antoine Pitrou 5b235d0923 Issue #17741: Add ElementTree.IncrementalParser, an event-driven parser for non-blocking applications. 2013-04-18 19:37:06 +02:00
Richard Oudkerk b147f60a38 Issue #17555: Fix ForkAwareThreadLock so that size of after fork
registry does not grow exponentially with generation of process.
2013-04-17 21:09:38 +01:00
Richard Oudkerk 409c31390f Issue #17555: Fix ForkAwareThreadLock so that size of after fork
registry does not grow exponentially with generation of process.
2013-04-17 20:58:00 +01:00
Giampaolo Rodola' 308307190f Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts. 2013-04-17 13:12:27 +02:00
Giampaolo Rodola' b38897fc91 Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts. 2013-04-17 13:08:59 +02:00
Roger Serwy 22b9e651c2 #14735: merge with 3.3. 2013-04-17 00:27:31 -05:00
Roger Serwy 643ea53c14 #14735: Update IDLE docs to omit "Control-z on Windows". 2013-04-17 00:22:50 -05:00
Ezio Melotti abe46fd810 #17766: merge with 3.3. 2013-04-17 04:36:45 +03:00
Ezio Melotti d13c008bf4 #17766: test_iterlen now works with unittest test discovery. Patch by Zachary Ware. 2013-04-17 04:34:05 +03:00
Barry Warsaw 99c56e8f58 Remove unused import 2013-04-16 11:19:11 -04:00
Barry Warsaw 20c08c8041 Remove unused import. 2013-04-16 11:18:53 -04:00
Barry Warsaw ecaefcf44e - Issue #17012: shutil.which() no longer fallbacks to the PATH environment
variable if empty path argument is specified.  Patch by Serhiy Storchaka.
2013-04-16 11:18:18 -04:00
Barry Warsaw 618738b921 - Issue #17012: shutil.which() no longer fallbacks to the PATH environment
variable if empty path argument is specified.  Patch by Serhiy Storchaka.
2013-04-16 11:05:03 -04:00
Alexandre Vassalotti 7c5e094cbf Make C and Python implementations of pickle load STRING opcodes the same way.
The C version tried to remove trailing whitespace between the last quote and
the newline character. I am not sure why it had this because pickle never
generated such pickles---for this to happen repr(some_string) would need to
return trailing whitespace. It was maybe there to make it easier for people
to write pickles in text editors. Anyhow, the Python version doesn't do this
so there is no point keeping this around anymore.

Also, I've changed the exception raised when a bad pickle is encountered.
Again this unlikely to make much difference to anyone though it does make
testing slightly nicer for us.
2013-04-15 23:14:55 -07:00
Antoine Pitrou af94051a93 Issue #17710: Fix pickle raising a SystemError on bogus input. 2013-04-15 21:55:14 +02:00
Antoine Pitrou 3034efdd29 Issue #17710: Fix pickle raising a SystemError on bogus input. 2013-04-15 21:51:09 +02:00
Nick Coghlan d25e7de4a1 Merge fix for #17731 from 3.3 2013-04-15 22:57:57 +10:00
Nick Coghlan f1465f0535 Close #17731: Clean up properly in test_import 2013-04-15 22:56:51 +10:00
Vinay Sajip 66940a11f8 Issue #17713: Added failure diagnostics to test. 2013-04-15 11:59:35 +01:00
R David Murray 26dfaac9ac #17341: Include name in re error message about invalid group name.
Patch by Jason Michalski.
2013-04-14 13:00:54 -04:00
R David Murray bf71f7d654 Merge #17341: Include name in re error message about invalid group name.
Patch by Jason Michalski.
2013-04-14 13:03:14 -04:00
Brett Cannon 255fb3e9f3 add a newline 2013-04-14 12:51:36 -04:00
Brett Cannon edfd6ae79c Issue #17244: Don't mask exceptions raised during the creation of
bytecode files in py_compile.

Thanks to Arfrever Frehtes Taifersar Arahesis for the bug report.
2013-04-14 12:48:15 -04:00
Victor Stinner 672559fc4f (Merge 3.3) Issue #17702: use assertRaises() for the unit test 2013-04-14 16:43:38 +02:00
Victor Stinner 839e5eafcb Issue #17702: use assertRaises() for the unit test 2013-04-14 16:43:03 +02:00
Victor Stinner 43aa0d07e2 (Merge 3.3) Close #17702: os.environ now raises KeyError with the original
environment variable name (str on UNIX), instead of using the encoded name
(bytes on UNIX).
2013-04-14 16:38:35 +02:00
Victor Stinner 6d10139d70 Close #17702: os.environ now raises KeyError with the original environment
variable name (str on UNIX), instead of using the encoded name (bytes on UNIX).
2013-04-14 16:35:04 +02:00
Nick Coghlan 685bd4a37a Merge fix for #16163 from 3.3 2013-04-14 23:01:11 +10:00
Nick Coghlan c4e0d982f3 Close issue #16163: handle submodules in pkgutil.iter_importers 2013-04-14 22:30:42 +10:00
Vinay Sajip 8b4c7198db Issue #17713: additional tweak to test. 2013-04-14 12:25:25 +01:00
Vinay Sajip d86ac96fcf Closes #17713: Fixed bug in test_compute_rollover_weekly_attime. 2013-04-14 12:20:46 +01:00
R David Murray 8a34596bbe #2118: IOError is deprecated, use OSError. 2013-04-14 06:46:35 -04:00
Alexandre Vassalotti 96d6a78ce0 Merge 3.3 2013-04-14 03:44:47 -07:00
Serhiy Storchaka a3e32c92cf Closes #16551. Cleanup pickle.py. 2013-04-14 13:37:02 +03:00
Alexandre Vassalotti 8157459d6b Merge heads. 2013-04-14 03:31:40 -07:00
Alexandre Vassalotti 8db89ca56c Issue #16550: Update the opcode descriptions of pickletools to use unsigned
integers where appropriate.  Initial patch by Serhiy Storchaka.
2013-04-14 03:30:35 -07:00
Georg Brandl b979f10002 merge with 3.3 2013-04-14 11:40:27 +02:00
Georg Brandl 1d472b74cb Closes #14462: allow any valid Python identifier in sre group names, as documented. 2013-04-14 11:40:00 +02:00
Alexandre Vassalotti cc7571727f Style cleanups for pickle.py and _pickle. 2013-04-14 02:25:10 -07:00
Alexandre Vassalotti bdc3eb7623 Merge 3.3 2013-04-14 00:58:28 -07:00
Alexandre Vassalotti 6eea818423 Fix pickling test in test_memoryio.
The test was closing the orginal object instead the copy. This didn't result
in visible failures because the loop range was incorrect as well.
2013-04-14 00:56:39 -07:00
Meador Inge 2581bdb86a Issue #16804: Fix 'python -S -m site' failure.
This commit fixes a bug in the 'site' module that was causing an exception
to incorrectly be thrown when running 'python -S -m site'.  The problem was
that 'USER_BASE' and 'USER_SITE' were being accessed before they were properly
initialized.  The code has been changed to use 'getuserbase' and
'getusersitepackages' instead so that the initialization always happens.
2013-04-13 20:51:04 -05:00
Meador Inge 9a7a81195c Issue #16804: Fix 'python -S -m site' failure.
This commit fixes a bug in the 'site' module that was causing an exception
to incorrectly be thrown when running 'python -S -m site'.  The problem was
that 'USER_BASE' and 'USER_SITE' were being accessed before they were properly
initialized.  The code has been changed to use 'getuserbase' and
'getusersitepackages' instead so that the initialization always happens.
2013-04-13 20:29:49 -05:00
Benjamin Peterson 71557596b2 remove pointless change 2013-04-13 17:20:36 -04:00
Benjamin Peterson 214a7d2674 properly lookup the __round__ special method (closes #17722) 2013-04-13 17:19:01 -04:00
Antoine Pitrou c1ab0bd788 Fix misindent. This would test half less possibilities. 2013-04-13 22:46:33 +02:00
Antoine Pitrou e9bbe8b87b Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal.
Initial patch by Daniel Riti.
2013-04-13 22:41:09 +02:00
R David Murray a707f299cb #17719: fix incorrect version number in deprecation doc.
Patch by Kent Johnson.
2013-04-13 15:29:22 -04:00
R David Murray 8e37d5df95 #2118: Make SMTPException a subclass of IOError.
Initial patch by Ned Jackson Lovely.
2013-04-13 14:49:48 -04:00
R David Murray c1d3daf58b Merge #2118: clarify smtplib exception documentation. 2013-04-13 14:42:36 -04:00
R David Murray 14ee3cf244 #2118: clarify smtplib exception documentation. 2013-04-13 14:40:33 -04:00
Ezio Melotti d24abee463 #17571: merge with 3.3. 2013-04-13 20:12:53 +03:00
Ezio Melotti f756f947f9 #17571: remove broken links in datetime.py docstring. 2013-04-13 20:12:38 +03:00
Mark Dickinson 93196eb44f Issue #17715: Merge fix from 3.3. 2013-04-13 17:46:04 +01:00
Mark Dickinson c9734484ca Issue #17715: Add missing NULL Check to PyNumber_Long. 2013-04-13 17:44:44 +01:00
Vinay Sajip 171bb26b32 Issue #17713: Test temporarily skipped while failure investigated. 2013-04-13 17:35:14 +01:00
Andrew Svetlov 44e33f39bf Revert changes for #13355 by request from Raymond Hettinger 2013-04-13 18:04:19 +03:00
Andrew Svetlov b4fd468f12 Revert changes for #13355 by request from Raymond Hettinger 2013-04-13 18:00:04 +03:00
Mark Dickinson 556e94b8fe Issue #17643: Add __callback__ attribute to weakref.ref. 2013-04-13 15:45:44 +01:00
Mark Dickinson 548677bb8c Issue #16447: Merge fix from 3.3. 2013-04-13 15:30:16 +01:00
Mark Dickinson 64aafeb4de Issue #16447: Fix potential segfault when setting __name__ on a class. 2013-04-13 15:26:58 +01:00
Andrew Svetlov 4e7d3ab405 Fix whitespaces 2013-04-12 23:30:59 +03:00
Andrew Svetlov eff6444751 Fix whitespaces 2013-04-12 23:30:41 +03:00
Andrew Svetlov 730001163f Issue #13355: Raise ValueError on random.triangular call with invalid params.
Initial patch by Yuriy Senko.
2013-04-12 23:27:37 +03:00
Andrew Svetlov a2dfc35a13 Issue #13355: Raise ValueError on random.triangular call with invalid params.
Initial patch by Yuriy Senko.
2013-04-12 23:21:01 +03:00
Andrew Svetlov 3042b5ebf4 Issue #16658: add missing return to HTTPConnection.send().
Patch by Jeff Knupp
2013-04-12 22:50:42 +03:00
Andrew Svetlov 7b2c8bb833 Issue #16658: add missing return to HTTPConnection.send().
Patch by Jeff Knupp
2013-04-12 22:49:19 +03:00
Giampaolo Rodola' 7ca4936113 attempt to fix bb failure as per http://bugs.python.org/issue17675#msg186595 2013-04-12 18:28:15 +02:00
Vinay Sajip a713079ed8 Closed #9556: Allowed specifying a time-of-day for a TimedRotatingFileHandler to rotate. 2013-04-12 17:04:23 +01:00
Ezio Melotti 7ec97f415c #17692: merge with 3.3. 2013-04-12 14:14:22 +03:00
Ezio Melotti c2ecac4787 #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware. 2013-04-12 14:13:47 +03:00
Roger Serwy 663a390454 #17585: merge with 3.3. 2013-04-11 19:18:22 -05:00
Roger Serwy 1eafd1076e #17585: Fixed IDLE regression. Now closes when using exit() or quit(). 2013-04-11 19:16:44 -05:00
R David Murray f1c42538e4 #17699: Fix the new getpass test failures on windows.
Patch by Zachary Ware.
2013-04-11 17:45:32 -04:00
Victor Stinner eae41af356 Issue #13056: Reenable test_multibytecodec.Test_StreamWriter tests 2013-04-11 22:41:11 +02:00
Antoine Pitrou 50b24d0d7c Fix a crash when setting a servername callback on a SSL server socket and the client doesn't send a server name.
Patch by Kazuhiro Yoshida.
(originally issue #8109)
2013-04-11 20:48:42 +02:00
Ezio Melotti 85b2afb1b1 #17690: merge with 3.3. 2013-04-11 20:30:48 +03:00
Ezio Melotti 3836d70ed5 #17690: test_time now works with unittest test discovery. Patch by Zachary Ware. 2013-04-11 20:29:42 +03:00
R David Murray c601dc1639 Merge #14971: Use class method name, not function.__name__, during unittest discovery. 2013-04-11 08:58:11 -04:00
R David Murray 5e2f593145 #14971: Use class method name, not function.__name__, during unittest discovery. 2013-04-11 08:55:45 -04:00
Senthil Kumaran f49581c2a1 normalize whitespace 2013-04-10 20:55:58 -07:00
Senthil Kumaran c7e0980259 normalize whitespace. caught by hook 2013-04-10 20:54:23 -07:00
Senthil Kumaran 8b081b7ba1 merge from 3.3
#5609 - test_urllib coverage for url2pathname and pathname2url. Patch
contribution by Thomas Fenzl & Maksim Kozyarchuk
2013-04-10 20:53:12 -07:00
Senthil Kumaran 277e9090b0 #5609 - test_urllib coverage for url2pathname and pathname2url. Patch
contribution by Thomas Fenzl & Maksim Kozyarchuk
2013-04-10 20:51:19 -07:00
Ezio Melotti fe2d27d068 Merge heads. 2013-04-10 19:35:31 +03:00
Ezio Melotti 161194a5d0 #12820: merge with 3.3. 2013-04-10 19:34:05 +03:00
R David Murray 671cd3290b #17487: wave.getparams now returns a namedtuple.
Patch by Claudiu Popa.
2013-04-10 12:31:43 -04:00
Ezio Melotti cd514cf175 #12820: add tests for the xml.dom.minicompat module. Patch by John Chandler and Phil Connell. 2013-04-10 19:30:11 +03:00
Giampaolo Rodola' 50331cbf08 Fix issue #17675: make socket repr() provide local and remote addresses (if any). 2013-04-10 15:49:47 +02:00
Brett Cannon 2a4df127c7 merge 2013-04-09 17:03:27 -04:00
Brett Cannon 100883f0cb Issue #17093,17566,17567: Methods from classes in importlib.abc now raise/return
the default exception/value when called instead of raising/returning
NotimplementedError/NotImplemented (except where appropriate).
This should allow for the ABCs to act as the bottom/end of the MRO with expected
default results.

As part of this work, also make importlib.abc.Loader.module_repr()
optional instead of an abstractmethod.
2013-04-09 16:59:39 -04:00
Victor Stinner 03c3e35d42 Add fast-path in PyUnicode_DecodeCharmap() for pure 8 bit encodings:
cp037, cp500 and iso8859_1 codecs
2013-04-09 21:53:09 +02:00
Giampaolo Rodola' 0f344b6e05 merge heads 2013-04-09 17:23:27 +02:00
Giampaolo Rodola' a4c377cde9 Do not raise exception on close() on account of socket attribute still being None:
>>> import asyncore
>>> d = asyncore.dispatcher()
>>> d.close()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/asyncore.py", line 401, in close
    self.socket.close()
AttributeError: 'NoneType' object has no attribute 'close'
>>>
2013-04-09 17:21:25 +02:00
Senthil Kumaran 7005b1f90a #17678: Remove the use of a deprecated method http/cookiejar.py. Changing the
usage of get_origin_req_host() to origin_req_host.

Patch by Wei-Cheng Pan
2013-04-09 07:11:07 -07:00
Senthil Kumaran d9fbf36bbd #17678: Fix DeprecationWarning in the http/cookiejar.py by changing the usage
of get_origin_req_host() to origin_req_host.

Patch by Wei-Cheng Pan
2013-04-09 07:07:59 -07:00
Senthil Kumaran d281c73536 #17648 - convert test_urllib2.py doctests to unittests 2013-04-09 06:00:16 -07:00
Senthil Kumaran fa1b02a126 #17648 - Clean up test_urllib2.py. Converted doctests to unittest for
expansion.
2013-04-08 22:24:17 -07:00
Roger Serwy cb31d1fe1b #17657: merge with 3.3. 2013-04-08 20:59:11 -05:00
Roger Serwy 0803a39561 #17657: Show full Tk version in IDLE's about dialog.
Patch by Todd Rovito.
2013-04-08 20:57:13 -05:00
Victor Stinner 9fc5981ea2 Issue #17615: Add tests comparing Unicode strings of different kinds
Kinds: ascii, latin, bmp, astral.
2013-04-08 22:34:43 +02:00
Serhiy Storchaka ffcd339aac Close #17666: Fix reading gzip files with an extra field. 2013-04-08 22:37:15 +03:00
Serhiy Storchaka a6df938fef Close #17666: Fix reading gzip files with an extra field. 2013-04-08 22:35:02 +03:00
Serhiy Storchaka 7e69f0085e Close #17666: Fix reading gzip files with an extra field. 2013-04-08 22:35:02 +03:00
R David Murray c137f7c065 #17484: Actually add the getpass tests this time. 2013-04-08 08:48:03 -04:00
R David Murray 319d58d599 #17484: add tests for getpass.
Patch by Thomas Fenzl.
2013-04-08 01:48:22 -04:00
Roger Serwy d673ed9b43 #17613: merge with 3.3. 2013-04-07 12:42:13 -05:00
Roger Serwy 7733be8f26 #17613: Prevent traceback when removing syntax colorizer in IDLE. 2013-04-07 12:41:16 -05:00
Roger Serwy 4687cf795c #1207589: merge with 3.3. 2013-04-07 12:17:17 -05:00
Roger Serwy 6b2918ae75 #1207589: Backwards-compatibility patch for right-click menu in IDLE. 2013-04-07 12:15:52 -05:00
Andrew Svetlov 8ab1e513c1 Process DEFAULT values in mock side_effect that returns iterator.
Patch by Michael Ford.
2013-04-07 16:44:07 +03:00
Andrew Svetlov 8b2cd75bdd Process DEFAULT values in mock side_effect that returns iterator.
Patch by Michael Ford.
2013-04-07 16:42:24 +03:00
Raymond Hettinger 56b0a3d89a Remove redundant imports 2013-04-06 20:53:12 -07:00
Roger Serwy cdbb06c15c #16887: merge with 3.3. 2013-04-06 20:31:26 -05:00
Roger Serwy 0ef392cde7 #16887: IDLE now accepts Cancel in tabify/untabify dialog box. 2013-04-06 20:26:53 -05:00
Serhiy Storchaka ee57f159af Revert a premature patch for issue #14010 (changeset 846bd418aee5). 2013-04-06 22:55:12 +03:00
Serhiy Storchaka 278d03bd66 Revert a premature patch for issue #14010 (changeset aaaf36026511). 2013-04-06 22:52:34 +03:00
Serhiy Storchaka aac81e2780 Issue #14010: Fix a crash when iterating or deleting deeply nested filters
(builting and in itertools module, i.e. map(), itertools.chain(), etc).
2013-04-06 21:20:30 +03:00
Serhiy Storchaka e8f706eda7 Issue #14010: Fix a crash when iterating or deleting deeply nested filters
(builting and in itertools module, i.e. map(), itertools.chain(), etc).
2013-04-06 21:14:43 +03:00
Georg Brandl 98297f4807 merge with 3.3 2013-04-06 16:47:34 +02:00
Georg Brandl cca5548159 merge with 3.3.1 release clone 2013-04-06 16:42:43 +02:00
Georg Brandl 2fd4abe6a1 merge with 3.2 branch 2013-04-06 16:39:49 +02:00
Georg Brandl 9aa23c5671 Bump to 3.3.1. 2013-04-06 09:40:02 +02:00
Georg Brandl 8bc7e31529 Bump to 3.2.4. 2013-04-06 09:36:20 +02:00
Senthil Kumaran 4a2ab120f3 Issue #17483: 3.3 Branch - Remove unreachable code in urllib.request 2013-04-04 19:34:02 -07:00
Andrew Svetlov ace34dda0a #17365: Remove Python 2 code from test_print
Patch by Berker Peksag
2013-04-04 22:32:28 +03:00
Benjamin Peterson 4d34bae217 merge 3.3 (#17625) 2013-04-03 22:38:00 -04:00
Benjamin Peterson 38546ee51c close search and replace dialog after it is used (closes #17625) 2013-04-03 22:35:12 -04:00
Benjamin Peterson 7684fa8a38 close search and replace dialog after it is used (closes #17625) 2013-04-03 22:35:12 -04:00
Benjamin Peterson cf658c2833 close search and replace dialog after it is used (closes #17625) 2013-04-03 22:35:12 -04:00
Ezio Melotti d57f047665 #17572: merge with 3.3. 2013-04-04 02:16:27 +03:00
Ezio Melotti 0f38908684 #17572: Avoid chained exceptions while passing bad directives to time.strptime(). Initial patch by Claudiu Popa. 2013-04-04 02:09:20 +03:00
R David Murray c616604a15 Merge: Use repr when printing unknown url type in urlopen. 2013-04-03 07:01:07 -04:00
R David Murray d8a46969f7 Use repr when printing unknown url type in urlopen. 2013-04-03 06:58:34 -04:00
Giampaolo Rodola' 06d0c1e72c remove uneffective 'while True' clause 2013-04-03 12:01:44 +02:00
Roger Serwy 1be94cea0f #14254: merge with 3.3. 2013-04-03 00:43:31 -05:00
Roger Serwy 6b7a5ae2c1 #14254: IDLE now handles readline correctly across shell restarts. 2013-04-03 00:42:24 -05:00
Roger Serwy a64a084670 #17614: merge with 3.3. 2013-04-02 22:40:39 -05:00
Roger Serwy 0d28a61d23 #17614: IDLE no longer raises exception when quickly closing a file. 2013-04-02 22:39:39 -05:00
Roger Serwy d7c9d9cdcd #17614: IDLE no longer raises exception when quickly closing a file. 2013-04-02 22:37:12 -05:00
Victor Stinner cfc4c13b04 Add _PyUnicodeWriter_WriteSubstring() function
Write a function to enable more optimizations:

 * If the substring is the whole string and overallocation is disabled, just
   keep a reference to the string, don't copy characters
 * Avoid a call to the expensive _PyUnicode_FindMaxChar() function when
   possible
2013-04-03 01:48:39 +02:00
Victor Stinner 4489e927a6 (Merge 3.3) Close #6822: ftplib.FTP.storlines() expects a binary file, not a text file
Add an unit test to ensure that text files are rejectect (with TypeError)
2013-04-02 22:13:49 +02:00
Victor Stinner ed3a303548 Close #6822: ftplib.FTP.storlines() expects a binary file, not a text file
Add an unit test to ensure that text files are rejectect (with TypeError)
2013-04-02 22:13:27 +02:00
R David Murray d9ebf4dc1f #17489: Add explanatory comment that __getstate__ is not called.
We don't put coverage directives in the stdlib, but anyone looking at a
coverage report for Random should see the comment and understand why the lines
aren't covered.
2013-04-02 13:10:52 -04:00
R David Murray e3e1c17e08 #17492: Additional tests for random module.
Patch by Victor Terrón.
2013-04-02 12:47:23 -04:00
R David Murray c993a19480 #13163: fix names of _get_socket args
This was already done in Python3, but having it wrong leads to
incorrect debug output, so it seems worth fixing in 2.7 as well.

Patch by Victor Terrón.
2013-04-02 12:15:07 -04:00
Brett Cannon 49e835bec6 Issue #14135: Let's try this again. 2013-04-01 14:11:37 -04:00
Brett Cannon a495b498af merge 2013-04-01 13:26:21 -04:00
Brett Cannon daf4daa295 merge 2013-04-01 13:25:40 -04:00
Brett Cannon f8ffec0617 Issue #17357: Add missing verbosity messages when running under
-v/-vv that were lost in the transition to importlib.
2013-04-01 13:10:51 -04:00
Antoine Pitrou 9a8d6934df Issue #17483: remove unreachable code in urlopen(). 2013-04-01 18:55:35 +02:00
Antoine Pitrou 7d197de987 Backed out changeset 4fcd50a6dca7 as it totally breaks the test suite here. 2013-04-01 18:54:45 +02:00
Brett Cannon 2d556f56db Issue #14135: Make sure tests don't leave the locale changed for any
category.

Thanks to Westley Martinez for trying to fix the issue and Atsuo
Ishimoto for an initial patch.
2013-04-01 12:53:13 -04:00
Roger Serwy af504ca017 #6698: merge with 3.3. 2013-03-31 23:31:32 -05:00
Roger Serwy 34d0c66ef2 #6698: IDLE now opens just an editor window when configured to do so. 2013-03-31 23:28:55 -05:00
Roger Serwy c35151cf41 #6698: IDLE now opens just an editor window when configured to do so. 2013-03-31 23:28:55 -05:00
Roger Serwy 6d5bfad545 #8900: merge with 3.3. 2013-03-31 15:56:02 -05:00
Roger Serwy cadd7864d8 #8900: Using keyboard shortcuts in IDLE to open a file no longer raises an exception. 2013-03-31 15:53:08 -05:00
Roger Serwy 420e2d8e39 #8900: Using keyboard shortcuts in IDLE to open a file no longer raises an exception. 2013-03-31 15:53:08 -05:00
Charles-Francois Natali f61d07903e Issue #6419: Fix a test_kqueue failure on some BSD flavors. 2013-03-31 20:37:34 +02:00
Charles-Francois Natali 7a03e2d377 Issue #6419: Fix a test_kqueue failure on some BSD flavors. 2013-03-31 20:36:57 +02:00
Charles-Francois Natali e4059462f2 Issue #6419: Fix a test_kqueue failure on some BSD flavors. 2013-03-31 20:35:59 +02:00
Gregory P. Smith 2b3a35b5dd skip a fcntl test on ARM Linux that isn't supported there. 2013-03-31 10:25:42 -07:00
Gregory P. Smith e5aefa452b Skip a test of an old API on ARM Linux that isn't supported by the OS. 2013-03-31 10:10:50 -07:00
Roger Serwy 3aaf5dab8a #6649: merge with 3.3. 2013-03-31 01:11:26 -05:00
Roger Serwy 71c9e1a5c3 #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo. 2013-03-31 01:00:15 -05:00
Roger Serwy 6e4e4abf16 #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo. 2013-03-31 00:57:16 -05:00
Terry Jan Reedy d676a3a221 Issue #17390: Display Python version on Idle title bar. Patch by Edmond Burnett. 2013-03-30 18:50:43 -04:00
Terry Jan Reedy 42a83201a0 Merge from 3.3: Issue #17390 2013-03-30 18:39:14 -04:00
Terry Jan Reedy 32622236d5 Issue #17390: Display Python version on Idle title bar. Patch by Edmond Burnett. 2013-03-30 18:32:19 -04:00
R David Murray 5cbf3a0d6e Merge #17435: Don't use mutable default values in Timer.
Patch by Denver Coneybeare with some test modifications by me.
2013-03-30 17:22:30 -04:00
R David Murray 19aeb439c6 Issue #17435: Don't use mutable default values in Timer.
Patch by Denver Coneybeare with some test modifications by me.
2013-03-30 17:19:38 -04:00
Benjamin Peterson 472f77daa5 merge 2.7.4 release branch 2013-03-30 15:31:31 -04:00
Benjamin Peterson f3ad030a74 G -> M (closes #17533) 2013-03-30 15:30:28 -04:00
Benjamin Peterson 337b1737df merge 2.7.4 release branch 2013-03-30 10:37:25 -04:00
Benjamin Peterson d627e122d7 fall back when an old test_support doesn't have various data and functions (closes #17533) 2013-03-30 10:36:31 -04:00
Ezio Melotti 0503de9c83 #17526: merge with 3.3. 2013-03-30 05:19:06 +02:00