Senthil Kumaran
c70a6ae49b
#17403 : urllib.parse.robotparser normalizes the urls before adding to ruleline.
...
This helps in handling certain types invalid urls in a conservative manner.
2013-05-29 05:54:31 -07:00
Terry Jan Reedy
eb4c9c77b8
Issue #15392 : Do not run tests if threading/_thread not available. Otherwise
...
touchup test_idle. Rename README.txt.
2013-05-28 22:21:53 -04:00
Ned Deily
97345680dc
Issue #18080 : When building a C extension module on OS X, if the compiler
...
is overriden with the CC environment variable, use the new compiler as
the default for linking if LDSHARED is not also overriden. This restores
Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0.
2013-05-28 16:35:30 -07:00
Serhiy Storchaka
37a79a12d1
Issue #18025 : Fixed a segfault in io.BufferedIOBase.readinto() when raw
...
stream's read() returns more bytes than requested.
2013-05-28 16:24:45 +03:00
Serhiy Storchaka
12516e2c1b
Issue #17746 : Skip test_shutil.test_non_matching_mode when run as root or
...
on unsuitable platform/environment.
2013-05-28 15:50:15 +03:00
Serhiy Storchaka
ea2b490f3d
Issue #18011 : base64.b32decode() now raises a binascii.Error if there are
...
non-alphabet characters present in the input string to conform a docstring.
Updated the module documentation.
2013-05-28 15:27:29 +03:00
Jason R. Coombs
b501b565c6
Use simple call to os.symlink for broken link (intended for previous commit)
2013-05-27 23:52:43 -04:00
Jason R. Coombs
3a09286790
Issue #13772 : Restored directory detection of targets in `os.symlink` on Windows, which was temporarily removed in Python 3.2.3 due to an incomplete implementation. The implementation now works even if the symlink is created in a location other than the current directory.
2013-05-27 23:21:28 -04:00
Terry Jan Reedy
db4e5c53c9
Issue #15392 : Create a unittest framework for IDLE.
...
Preliminary patch by Rajagopalasarma Jayakrishnan.
2013-05-27 21:32:03 -04:00
Antoine Pitrou
80bc00f582
Issue #18063 : fix some struct specifications in the tests for sys.getsizeof().
2013-05-25 23:47:29 +02:00
Eli Bendersky
4ace240fe5
Clean-up duplicated code in tests
2013-05-25 07:12:14 -07:00
Eli Bendersky
6dc32b34dd
Issue #13612 : handle unknown encodings without a buffer overflow.
...
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
2013-05-25 05:25:48 -07:00
Antoine Pitrou
6b5a38c728
Fix test_bad_address on Ubuntu 13.04
2013-05-25 13:08:13 +02:00
Ronald Oussoren
27a4ac535f
Issue #17269 : Workaround for a platform bug in getaddrinfo on OSX
...
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:47:37 +02:00
Ned Deily
7f0882c920
Issue #17532 : Always include Options menu for IDLE on OS X.
...
Patch by Guilherme Simões.
2013-05-22 15:19:40 -07:00
Benjamin Peterson
6724612755
add test for inequality
2013-05-22 13:27:25 -07:00
Serhiy Storchaka
66d53fa9ad
Issue #16986 : ElementTree now correctly parses a string input not only when
...
an internal XML encoding is UTF-8 or US-ASCII.
2013-05-22 17:07:51 +03:00
Roger Serwy
caf3024fa6
#14146 : Highlight source line while debugging on Windows.
2013-05-20 22:13:39 -05:00
Vinay Sajip
bfc8f26ec2
Issue #17743 : Now use extended syntax of set command in .bat files.
2013-05-20 15:38:12 -07:00
Vinay Sajip
e254751a63
Issue #17744 : Now unset VIRTUAL_ENV environment variable when deactivating.
2013-05-20 15:28:52 -07:00
Benjamin Peterson
611d901289
add recursive repr test
2013-05-19 19:39:38 -07:00
Antoine Pitrou
dc49b2b88c
Try to make test more reliable (saw some sporadic failures on buildbots)
2013-05-19 15:55:40 +02:00
Antoine Pitrou
916fc7bf28
Issue #11995 : test_pydoc doesn't import all sys.path modules anymore.
2013-05-19 15:44:54 +02:00
Serhiy Storchaka
2c3f2f19df
Issue #17812 : Fixed quadratic complexity of base64.b32encode().
2013-05-19 11:41:15 +03:00
Eli Bendersky
08231a9c6a
Issue #17901 : fix TreeBuilder construction for an explicit element_factory=None
...
Based on report and patch by Aaron Oakley.
2013-05-18 15:47:16 -07:00
Richard Oudkerk
90a24270f8
Close file before reopening to keep Windows happy in test_sax.
2013-05-18 18:11:30 +01:00
Antoine Pitrou
636f93c63b
Issue #17980 : Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099).
2013-05-18 17:56:42 +02:00
Raymond Hettinger
587d3bf78a
Update docstring for _asdict() to indicate it is obsolete.
...
Use the cleaner looking @property style for __dict__.
Move _replace() to be just after make() to indicate that
it is a core method on named tuples.
2013-05-17 16:43:14 -07:00
Benjamin Peterson
d2b58a9880
only recursively expand in the format spec ( closes #17644 )
2013-05-17 17:34:30 -05:00
Raymond Hettinger
b37706f306
Remove unnecessary exception handler.
2013-05-17 02:28:33 -07:00
Senthil Kumaran
5ccf2ff3e9
merge from 3.3
...
Fix #17967 - Fix related to regression on Windows.
os.path.join(*self.dirs) produces an invalid path on windows.
ftp paths are always forward-slash seperated like this. /pub/dir.
2013-06-02 12:00:45 -07:00
Senthil Kumaran
88249b80d7
merge from 3.3
...
Fix thishost helper funtion in urllib. Returns the ipaddress of localhost when
hostname is resolvable by socket.gethostname for local machine. This all fixes
certain freebsd builtbot failures.
2013-06-01 11:12:52 -07:00
Andrew Kuchling
edf33c0145
#18066 : remove vestigial code depending on the sgi module
2013-06-01 13:52:30 -04:00
Senthil Kumaran
e9ec2e173d
merge from 3.3
...
Fix #17967 : For ftp urls CWD to target instead of hopping to each directory
towards target. This fixes a bug where target is accessible, but parent
directories are restricted.
2013-06-01 08:27:53 -07:00
Benjamin Peterson
5cfbd2642c
frozen modules now apparently have empty __path__
2013-05-31 22:18:26 -07:00
Brett Cannon
3e0651b5fa
Issue #18065 : For frozen packages set __path__ to [].
...
Previously __path__ was set to [__name__], but that could lead to bad
results if someone managed to circumvent the frozen importer and
somehow ended up with a finder that thought __name__ was a legit
directory/location.
2013-05-31 23:18:39 -04:00
Brett Cannon
0e75c06886
fix whitespace
2013-05-31 18:57:45 -04:00
Brett Cannon
0dbb4c7f13
Issues #18088 , 18089: Introduce
...
importlib.abc.Loader.init_module_attrs() and implement
importlib.abc.InspectLoader.load_module().
The importlib.abc.Loader.init_module_attrs() method sets the various
attributes on the module being loaded. It is done unconditionally to
support reloading. Typically people used
importlib.util.module_for_loader, but since that's a decorator there
was no way to override it's actions, so init_module_attrs() came into
existence to allow for overriding. This is also why module_for_loader
is now pending deprecation (having its other use replaced by
importlib.util.module_to_load).
All of this allowed for importlib.abc.InspectLoader.load_module() to
be implemented. At this point you can now implement a loader with
nothing more than get_code() (which only requires get_source();
package support requires is_package()). Thanks to init_module_attrs()
the implementation of load_module() is basically a context manager
containing 2 methods calls, a call to exec(), and a return statement.
2013-05-31 18:56:47 -04:00
Brett Cannon
f1d7b11db9
Docstring cleanup
2013-05-31 18:39:07 -04:00
Brett Cannon
c29cb41822
Fix for last commit on adding reset_name to module_to_load
2013-05-31 18:37:44 -04:00
Brett Cannon
b60a43eabf
Add a reset_name argument to importlib.util.module_to_load in order to
...
control whether to reset the module's __name__ attribute in case a
reload is being done.
2013-05-31 18:11:17 -04:00
Serhiy Storchaka
c7a2825681
Issue #18094 : test_uuid no more reports skipped tests as passed.
2013-05-31 22:34:00 +03:00
Brett Cannon
357c9fb055
Rename importlib.util.ModuleManager to module_to_load so that the name
...
explains better what the context manager is providing.
2013-05-30 17:31:47 -04:00
Serhiy Storchaka
d739bda6b2
Issue #18084 : Use sys.byteorder in wave.py.
...
Original patch by Hideaki Takahashi.
2013-05-29 23:38:00 +03:00
Stefan Krah
2e537f9edc
test_decimal: add __sizeof__() tests for code coverage.
2013-05-29 18:50:06 +02:00
Stefan Krah
8d90e383a3
Merge 3.3.
2013-05-29 15:47:24 +02:00
Senthil Kumaran
6b3026ce72
merge from 3.3
...
#17403 : urllib.parse.robotparser normalizes the urls before adding to
ruleline. This helps in handling certain types invalid urls in a conservative
manner. Patch contributed by Mher Movsisyan.
2013-05-29 05:57:21 -07:00
Terry Jan Reedy
7b503965a0
Merge with 3.3
2013-05-28 22:22:14 -04:00
Ned Deily
6750282007
Issue #18080 : merge from 3.3
2013-05-28 16:45:06 -07:00
Brett Cannon
3dc48d6f69
Issue #18070 : importlib.util.module_for_loader() now sets __loader__
...
and __package__ unconditionally in order to do the right thing for
reloading.
2013-05-28 18:35:54 -04:00
Brett Cannon
a3687f0d68
Introduce importlib.util.ModuleManager which is a context manager to
...
handle providing (and cleaning up if needed) the module to be loaded.
A future commit will use the context manager in
Lib/importlib/_bootstrap.py and thus why the code is placed there
instead of in Lib/importlib/util.py.
2013-05-28 17:29:34 -04:00
Serhiy Storchaka
281945f427
Issue #18025 : Fixed a segfault in io.BufferedIOBase.readinto() when raw
...
stream's read() returns more bytes than requested.
2013-05-28 16:27:08 +03:00
Serhiy Storchaka
5758fa78d0
Issue #17746 : Skip test_shutil.test_non_matching_mode when run as root or
...
on unsuitable platform/environment.
2013-05-28 15:53:46 +03:00
Serhiy Storchaka
5cc9d32ee9
Issue #18011 : Silence an unrelated noise introduced in changeset 1b5ef05d6ced.
2013-05-28 15:42:34 +03:00
Serhiy Storchaka
77a3ad743f
Issue #18011 : base64.b32decode() now raises a binascii.Error if there are
...
non-alphabet characters present in the input string to conform a docstring.
Updated the module documentation.
2013-05-28 15:30:38 +03:00
Jason R. Coombs
fb1141cd55
Merge with 3.3
2013-05-27 23:53:02 -04:00
Jason R. Coombs
8f1a8e32b1
Merge with 3.3
2013-05-27 23:26:36 -04:00
Terry Jan Reedy
667a03b292
Merge with 3.3
2013-05-27 21:33:40 -04:00
Brett Cannon
3b62ca88e4
Issue #18072 : Implement get_code() for importlib.abc.InspectLoader and
...
ExecutionLoader.
2013-05-27 21:11:04 -04:00
Brett Cannon
9ffe85e1e8
Move importlib.abc.SourceLoader.source_to_code() to InspectLoader.
...
While the previous location was fine, it makes more sense to have the
method higher up in the inheritance chain, especially at a point where
get_source() is defined which is the earliest source_to_code() could
programmatically be used in the inheritance tree in importlib.abc.
2013-05-26 16:45:10 -04:00
Antoine Pitrou
1256f1f438
Issue #18063 : fix some struct specifications in the tests for sys.getsizeof().
2013-05-25 23:48:15 +02:00
Łukasz Langa
eadd8cf507
Fix #16832 - expose cache validity checking support in ABCMeta
2013-05-25 18:41:50 +02:00
Eli Bendersky
8be90396f2
Clean-up duplicated code in tests
2013-05-25 07:12:38 -07:00
Eli Bendersky
7b3022f24f
Issue #13612 : handle unknown encodings without a buffer overflow.
...
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
2013-05-25 05:27:10 -07:00
Antoine Pitrou
765f3cce48
Fix test_bad_address on Ubuntu 13.04
2013-05-25 13:08:34 +02:00
Vinay Sajip
3b84eae03e
Closes #18046 : Simplified logging internals relating to levels and their names. Thanks to Alex Gaynor for the patch.
2013-05-25 03:20:34 -07:00
Senthil Kumaran
8307075ce8
Fix #17272 - Make Request.full_url and Request.get_full_url return same result under all circumstances.
...
Document the change of Request.full_url to a property.
2013-05-24 09:14:12 -07:00
Ronald Oussoren
dc3e6cc452
(3.3->default) Issue #17269 : Workaround for a platform bug in getaddrinfo on OSX
...
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:51:21 +02:00
Ned Deily
6a00b6f4fd
Issue #17532 : merge
2013-05-22 15:24:44 -07:00
Benjamin Peterson
965efe9e5e
merge 3.3
2013-05-22 13:27:32 -07:00
Serhiy Storchaka
447b6e3c6e
Issue #16986 : ElementTree now correctly parses a string input not only when
...
an internal XML encoding is UTF-8 or US-ASCII.
2013-05-22 17:21:06 +03:00
Serhiy Storchaka
3ee6dabf5b
Issue #17900 : Allowed pickling of recursive OrderedDicts. Decreased pickled
...
size and pickling time.
2013-05-21 12:47:57 +03:00
Charles-François Natali
b10c71daa2
Backed out changeset c0f2b038fc12
2013-05-21 10:45:46 +02:00
Charles-François Natali
c7c333d25d
Issue #17683 : socket module: return AF_UNIX addresses in Linux abstract
...
namespace as string.
2013-05-21 09:49:18 +02:00
Roger Serwy
87ff387254
#14146 : merge with 3.3.
2013-05-20 22:16:53 -05:00
Vinay Sajip
067e48b7d8
Closes #17743 : Merged fix from 3.3.
2013-05-20 15:39:11 -07:00
Vinay Sajip
1eae2237e1
Closes #17744 : Merged fix from 3.3.
2013-05-20 15:30:10 -07:00
Charles-Francois Natali
d66b10e165
Issue #17684 : Fix some test_socket failures due to limited FD passing support
...
on OS-X. Patch by Jeff Ramnani.
2013-05-20 19:08:19 +02:00
Charles-Francois Natali
44feda3cd0
Issue #17914 : Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
...
initial patch by Trent Nelson.
2013-05-20 14:40:46 +02:00
Benjamin Peterson
d2cef8a204
merge 3.3
2013-05-19 19:39:46 -07:00
Eli Bendersky
a369923cab
Get rid of ugly code duplication for ElementTree.parse when the accelerator
...
is imported. Instead, ElementTree.parse can look for a special internal method
defined by the accelerator.
2013-05-19 18:47:23 -07:00
Eli Bendersky
e26fa1bdcb
Add some testing to verify which module was imported in ET tests.
...
This is useful when mucking with import_fresh_module to either force or block
importing of the _elementtree accelerator. These tests in place provide an
immediate indication whether the accelerator was actually imported and overrode
the classes it should have.
2013-05-19 17:49:54 -07:00
Eli Bendersky
8687245e27
normalize whitespace
2013-05-19 09:27:13 -07:00
Eli Bendersky
e6a951b83e
Cleanup even more dead code
2013-05-19 09:25:52 -07:00
Eli Bendersky
c4e98a6a9b
Cleanup more old ET library leftovers
2013-05-19 09:24:43 -07:00
Eli Bendersky
46955b2d30
Issue #17988 : remove unused alias for Element and rename the used one
...
Renaming to _Element_Py for clarity and moving it to a more logical location.
_ElementInterface OTOH is unused and is therefore removed.
Close #17988
2013-05-19 09:20:50 -07:00
Eli Bendersky
3a4fbd8241
_elementtree.XMLParser._setevents should support any sequence, not just tuples
...
Also clean up some code around this
2013-05-19 09:01:49 -07:00
Antoine Pitrou
5b6616dee3
Try to make test more reliable (saw some sporadic failures on buildbots)
2013-05-19 15:55:59 +02:00
Antoine Pitrou
c52d113e28
Issue #11995 : test_pydoc doesn't import all sys.path modules anymore.
2013-05-19 15:46:37 +02:00
Serhiy Storchaka
87aa7dc211
Issue #17812 : Fixed quadratic complexity of base64.b32encode().
...
Optimize base64.b32encode() and base64.b32decode() (speed up to 3x).
2013-05-19 11:49:32 +03:00
Eli Bendersky
20c1cdd64a
Issue #17901 : fix TreeBuilder construction for an explicit element_factory=None
...
Based on report and patch by Aaron Oakley.
2013-05-18 15:47:58 -07:00
Vinay Sajip
10e8c49a11
Re-enabled skipped test.
2013-05-18 10:19:54 -07:00
Richard Oudkerk
850800f15e
Merge.
2013-05-18 18:13:16 +01:00
Antoine Pitrou
31fb419908
Issue #17980 : Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099).
2013-05-18 17:59:12 +02:00
Raymond Hettinger
163e9821b4
Undo the deprecation of _asdict().
...
Backed out changeset c4ca39bece9d
2013-05-18 00:05:20 -07:00
Raymond Hettinger
4e0172fd9a
Deprecate nametuple._asdict()
2013-05-17 17:14:27 -07:00
Raymond Hettinger
8c03d832b3
merge
2013-05-17 16:43:58 -07:00
Benjamin Peterson
4d94474ba3
rewrite the parsing of field names to be more consistent wrt recursive expansion
2013-05-17 18:22:31 -05:00
Benjamin Peterson
48953632df
merge 3.3
2013-05-17 17:35:28 -05:00
Benjamin Peterson
a29ac45200
reset __class__, so multiple runs don't fail ( closes #17999 )
2013-05-17 11:33:26 -05:00