Commit Graph

16451 Commits

Author SHA1 Message Date
Nick Coghlan c216c48699 Close #19494: add urrlib.request.HTTPBasicPriorAuthHandler
This auth handler adds the Authorization header to the first
HTTP request rather than waiting for a HTTP 401 Unauthorized
response from the server as the default HTTPBasicAuthHandler
does.

This allows working with websites like https://api.github.com which do
not follow the strict interpretation of RFC, but more the dicta in the
end of section 2 of RFC 2617:

    > A client MAY preemptively send the corresponding Authorization
    > header with requests for resources in that space without receipt
    > of another challenge from the server.  Similarly, when a client
    > sends a request to a proxy, it may reuse a userid and password in
    > the Proxy-Authorization header field without receiving another
    > challenge from the proxy server. See section 4 for security
    > considerations associated with Basic authentication.

Patch by Matej Cepl.
2014-11-12 23:33:50 +10:00
Serhiy Storchaka ad446d57a9 Issue #22578: Added attributes to the re.error class. 2014-11-10 13:49:00 +02:00
Serhiy Storchaka 5619ab926b Issue #12728: Different Unicode characters having the same uppercase but
different lowercase are now matched in case-insensitive regular expressions.
2014-11-10 12:43:14 +02:00
Serhiy Storchaka 0c938f6d24 Issue #12728: Different Unicode characters having the same uppercase but
different lowercase are now matched in case-insensitive regular expressions.
2014-11-10 12:37:16 +02:00
Serhiy Storchaka 5a8dacf9c6 Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
platforms.
2014-11-10 11:25:50 +02:00
Serhiy Storchaka d915b0847d Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
platforms.
2014-11-10 10:42:26 +02:00
Berker Peksag 39e4c4d873 Issue #21650: Add an `--sort-keys` option to json.tool CLI. 2014-11-10 09:56:54 +02:00
Raymond Hettinger ffd842e1d6 Issue #22824: Updated reprlib output format for sets to use set literals. 2014-11-09 22:30:36 -08:00
Serhiy Storchaka 6276b32799 Issues #814253, #9179: Group references and conditional group references now
work in lookbehind assertions in regular expressions.
2014-11-07 21:45:17 +02:00
Serhiy Storchaka 84df7fe6a2 Issues #814253, #9179: Group references and conditional group references now
work in lookbehind assertions in regular expressions.
2014-11-07 21:43:57 +02:00
Serhiy Storchaka 85e7066278 Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.
Based on patch by Martin Panter.
2014-11-07 14:06:19 +02:00
Serhiy Storchaka 519114df42 Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.
Based on patch by Martin Panter.
2014-11-07 14:04:37 +02:00
Serhiy Storchaka 57b967791a Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
Based on patch by Aivars Kalvāns.
2014-11-07 12:23:30 +02:00
Serhiy Storchaka e66bb96929 Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
Based on patch by Aivars Kalvāns.
2014-11-07 12:19:40 +02:00
Serhiy Storchaka 7c28999cb2 Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments. 2014-11-07 12:03:09 +02:00
Serhiy Storchaka 8e92f57274 Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments. 2014-11-07 12:02:31 +02:00
Robert Collins bf2bda3c97 Close #22457: Honour load_tests in the start_dir of discovery.
We were not honouring load_tests in a package/__init__.py when that was the
start_dir parameter, though we do when it is a child package. The fix required
a little care since it introduces the possibility of infinite recursion.
2014-11-05 03:09:01 +13:00
Benjamin Peterson 1cca273669 merge 3.4 (#22417) 2014-11-03 14:36:48 -05:00
Benjamin Peterson 4ffb075271 PEP 476: enable HTTPS certificate verification by default (#22417)
Patch by Alex Gaynor with some modifications by me.
2014-11-03 14:29:33 -05:00
Serhiy Storchaka 2cb0e73a89 Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
and above.  Patch by Tim Graham.
2014-11-02 22:19:56 +02:00
Serhiy Storchaka 8cf7c1cff0 Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
and above.  Patch by Tim Graham.
2014-11-02 22:18:25 +02:00
Antoine Pitrou 8a03896cac Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff bytes on a 32-bit platform. 2014-11-02 18:41:56 +01:00
Antoine Pitrou cc23154d02 Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff bytes on a 32-bit platform. 2014-11-02 18:40:09 +01:00
Ezio Melotti 6e2db04345 #22751: merge with 3.4. 2014-11-02 19:14:54 +02:00
Ezio Melotti 8b23f5cc7a #22751: fix test___all__ warning about modified environment in the tests. Patch by Michael Cetrulo. 2014-11-02 19:08:35 +02:00
Zachary Ware 740e1dcdc2 Issue #17896: Move Windows external lib sources from .. to externals. 2014-11-01 22:48:24 -05:00
Zachary Ware 4b2b1de0bd Issue #17896: Move Windows external lib sources from .. to externals. 2014-11-01 22:39:21 -05:00
Ned Deily 048345d417 Issue #22770: merge from 3.4 2014-11-01 19:33:25 -07:00
Ned Deily 91f01e175a Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
When running tests in subprocesses with the regrtest -j option, a bug
in Cocoa Tk can result in a Tcl segfault.  Avoid the problem by forcing
Tk to fully initialize as an OS X gui process before destroying the
Tcl instance and creating another. (Original patch by Serhiy Storchaka)
2014-11-01 19:29:22 -07:00
Zachary Ware e470d092cb Issue #17717: Pull NASM from svn.python.org for OpenSSL build. 2014-11-01 18:42:46 -05:00
Zachary Ware aa3ea7ee78 Issue #17717: Pull NASM from svn.python.org for OpenSSL build. 2014-11-01 17:11:08 -05:00
Vinay Sajip 1be0c61882 Closes #22776: Merged fix from 3.4. 2014-11-01 20:00:56 +00:00
Vinay Sajip c33a0cc61e Brought excluded code into the scope of a try block in SysLogHandler.emit(). 2014-11-01 19:58:47 +00:00
Berker Peksag 8912270629 Issue #22665: Add missing get_terminal_size and SameFileError to shutil.__all__. 2014-11-01 11:05:36 +02:00
Berker Peksag 8083cd6c3b Issue #22665: Add missing get_terminal_size and SameFileError to shutil.__all__. 2014-11-01 11:04:06 +02:00
Berker Peksag 8f791d358b Issue #6623: Remove deprecated Netrc class in the ftplib module.
Patch by Matt Chaput.
2014-11-01 10:45:57 +02:00
Serhiy Storchaka b1847e7541 Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:37:50 +02:00
Serhiy Storchaka 4b8f8949b4 Issue #17381: Fixed handling of case-insensitive ranges in regular expressions.
Added new opcode RANGE_IGNORE.
2014-10-31 12:36:56 +02:00
Serhiy Storchaka d9b8dc272a Merge heads 2014-10-31 00:57:57 +02:00
Serhiy Storchaka 7cc0a1f7cb Issue #22410: Module level functions in the re module now cache compiled
locale-dependent regular expressions taking into account the locale.
2014-10-31 00:56:45 +02:00
Serhiy Storchaka 4659cc0756 Issue #22410: Module level functions in the re module now cache compiled
locale-dependent regular expressions taking into account the locale.
2014-10-31 00:53:49 +02:00
Antoine Pitrou c689101a5e Issue #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now return False when the underlying stat call raises NotADirectoryError. 2014-10-30 23:15:25 +01:00
Antoine Pitrou 2b2852b1b4 Issue #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now return False when the underlying stat call raises NotADirectoryError. 2014-10-30 23:14:03 +01:00
Antoine Pitrou aea7f4a8e2 Issue #8876: distutils now falls back to copying files when hard linking doesn't work.
This allows use with special filesystems such as VirtualBox shared folders.
2014-10-30 19:38:33 +01:00
Antoine Pitrou ed14c86fac Issue #8876: distutils now falls back to copying files when hard linking doesn't work.
This allows use with special filesystems such as VirtualBox shared folders.
2014-10-30 19:37:07 +01:00
Serhiy Storchaka 51a43703af Issue #22217: Implemented reprs of classes in the zipfile module. 2014-10-29 22:42:06 +02:00
Robert Collins 659dd625b4 Close #7559: ImportError when loading a test now shown as ImportError.
Previously the ImportError was only shown if the top level containing
package failed to import, with other ImportErrors showing up as
AttributeError - hiding the real cause. As part of this,
`TestLoader.loadTestsFromNames` now captures errors to self.errors.
2014-10-30 08:27:27 +13:00
Zachary Ware 3b6bd64520 Merge two Tests sections of the current NEWS. 2014-10-29 12:29:36 -05:00
Zachary Ware 0f26a3a8c9 Closes #22173: Merge with 3.4 2014-10-29 12:28:13 -05:00
Zachary Ware 2acbae8016 Issue #22173: Update lib2to3 tests to use unittest test discovery. 2014-10-29 12:24:59 -05:00
Antoine Pitrou be8d06f523 Issue #18216: gettext now raises an error when a .mo file has an unsupported major version number. Patch by Aaron Hill. 2014-10-28 20:17:51 +01:00
Georg Brandl b7374d0271 merge with 3.4 2014-10-28 17:15:26 +01:00
Georg Brandl 75f7490843 PYTHONY2K is long gone. Remove traces from the docs and manpage. 2014-10-28 17:15:10 +01:00
Ezio Melotti 788f2adeae #22196: link to Enum in the nametuple documentation. Patch by Karmen Dykstra. 2014-10-28 15:07:14 +01:00
Ezio Melotti 993c782565 #22196: link to Enum in the nametuple documentation. Patch by Karmen Dykstra. 2014-10-28 15:07:14 +01:00
Ezio Melotti 85f16bf5e5 #22237: merge patch attribution fix. 2014-10-28 13:59:01 +01:00
Ezio Melotti 670e8ff06c #22237: fix patch attribution. 2014-10-28 13:58:36 +01:00
Zachary Ware b6f8fec80b Issue #22261: Add a note to PCbuild\readme.txt about MSBuild switches.
Specifically, that they can be passed at the end of a build.bat invocation.

Initial patch by Shorya Raj.
2014-10-25 22:57:05 -05:00
Antoine Pitrou b64bca9852 Issue #13918: Provide a locale.delocalize() function which can remove
locale-specific number formatting from a string representing a number,
without then converting it to a specific type.  Patch by Cédric Krier.
2014-10-23 22:52:31 +02:00
Antoine Pitrou fce60eaf15 Issue #22676: Make the pickling of global objects which don't have a __module__ attribute less slow. 2014-10-23 22:47:50 +02:00
Victor Stinner f427a14156 Issue #22592: Drop support of the Borland C compiler to build Python
The distutils module still supports it to build extensions.
2014-10-22 12:33:23 +02:00
Robert Collins f920c2122b Close #19746: expose unittest discovery errors on TestLoader.errors
This makes it possible to examine the errors from unittest discovery
without executing the test suite - important when the test suite may
be very large, or when enumerating the test ids from a test suite.
2014-10-20 13:24:05 +13:00
Robert Collins 933430ab69 Issue #17401: document closefd in io.FileIO docs and add to repr
closefd was documented in the open docs but not the matching FileIO
class documented. Further, closefd, part of the core state for the
object was not shown.

In review it was noted that the open docs are a little confusing about
the interaction between closefd and paths, so tweaked them at the same
time.
2014-10-18 13:32:43 +13:00
R David Murray d20ec1b921 Merge: #18853: Fix resource warning in shlex's __main__ section. 2014-10-17 20:30:16 -04:00
R David Murray 838f2c437d #18853: Fix resource warning in shlex's __main__ section.
Report and original fix by Vajrasky Kok.
2014-10-17 20:28:47 -04:00
R David Murray afce02ed38 Merge: #9351: set_defaults on subparser is no longer ignored if set on parent. 2014-10-17 19:58:03 -04:00
R David Murray 7570cbdc6b #9351: set_defaults on subparser is no longer ignored if set on parent.
Before, if a default was set on the parent parser, any default for that
variable set via set_defaults on a subparser would be ignored.  Now
the subparser set_defaults is honored.

Patch by Jyrki Pullianinen.
2014-10-17 19:55:11 -04:00
R David Murray d2ff243b38 Merge: #21991: make headerregistry params property MappingProxyType. 2014-10-17 19:32:08 -04:00
R David Murray 685b3495e1 #21991: make headerregistry params property MappingProxyType.
It is unlikely anyone is using the fact that the dictionary returned
by the 'params' attribute was previously writable, but even if someone
is the API is provisional so this kind of change is acceptable (and
needed, to get the API "right" before it becomes official).

Patch by Stéphane Wirtel.
2014-10-17 19:30:13 -04:00
Antoine Pitrou bc92bbd4d2 Issue #22653: Fix an assertion failure in debug mode when doing a reentrant dict insertion in debug mode. 2014-10-18 00:35:44 +02:00
Antoine Pitrou d696732025 Issue #22653: Fix an assertion failure in debug mode when doing a reentrant dict insertion in debug mode. 2014-10-18 00:35:00 +02:00
Zachary Ware 4dc7278546 Issue #22644: Update the Windows build to OpenSSL 1.0.1j 2014-10-17 16:31:57 -05:00
Zachary Ware baa6d3a01f Issue #22644: Update the Windows build to OpenSSL 1.0.1j 2014-10-17 16:26:30 -05:00
Zachary Ware 459c36490f Issue #16000: Convert test_curses to use unittest 2014-10-17 14:10:51 -05:00
Zachary Ware baf45c590c Issue #16000: Convert test_curses to use unittest 2014-10-17 13:59:18 -05:00
Antoine Pitrou a21de3d45e Issue #22638: SSLv3 is now disabled throughout the standard library.
It can still be enabled by instantiating a SSLContext manually.
2014-10-17 19:28:30 +02:00
Antoine Pitrou e4eda4d33f Issue #22638: SSLv3 is now disabled throughout the standard library.
It can still be enabled by instantiating a SSLContext manually.
2014-10-17 19:28:30 +02:00
Benjamin Peterson 6925264334 merge 3.4 (#22643) 2014-10-15 11:49:15 -04:00
Benjamin Peterson 1cbb3fe775 merge 3.3 (#22643) 2014-10-15 11:48:41 -04:00
Benjamin Peterson e1bd38c03c fix integer overflow in unicode case operations (closes #22643) 2014-10-15 11:47:36 -04:00
Antoine Pitrou 94522ebe38 Issue #22641: In asyncio, the default SSL context for client connections is now created using ssl.create_default_context(), for stronger security. 2014-10-15 16:59:58 +02:00
Antoine Pitrou fd39a89e0e Issue #22641: In asyncio, the default SSL context for client connections is now created using ssl.create_default_context(), for stronger security. 2014-10-15 16:58:21 +02:00
Berker Peksag 6554b86b1f Issue #21338: Add silent mode for compileall.
quiet parameters of compile_{dir, file, path} functions now have
a multilevel value.

Also, -q option of the CLI now have a multilevel value.

Patch by Thomas Kluyver.
2014-10-15 11:10:57 +03:00
Brett Cannon b0fc490307 Issue #20152: Convert the cmath module to Argument Clinic. 2014-10-14 17:37:02 -04:00
Charles-François Natali 98c745a773 Issue #18643: Add socket.socketpair() on Windows. 2014-10-14 21:22:44 +01:00
Charles-François Natali 4fa7a9fd1a Merge. 2014-10-13 19:32:38 +01:00
Charles-François Natali acbf5235b8 Issue #22435: Fix a file descriptor leak when SocketServer bind fails. 2014-10-13 19:28:50 +01:00
Antoine Pitrou 0373a106a1 Issue #17636: Circular imports involving relative imports are now supported. 2014-10-13 20:19:45 +02:00
Charles-François Natali 0f4f048fa5 Issue #22435: Fix a file descriptor leak when SocketServer bind fails. 2014-10-13 19:19:26 +01:00
Larry Hastings dfbeb160de Issue #22615: Argument Clinic now supports the "type" argument for the
int converter.  This permits using the int converter with enums and
typedefs.
2014-10-13 10:39:41 +01:00
R David Murray 9755174464 Merge: #13096: Fix segfault in CTypes POINTER handling of large values. 2014-10-12 13:56:37 -04:00
R David Murray 817905b239 #13096: Fix segfault in CTypes POINTER handling of large values.
Patch by Meador Inge.
2014-10-12 13:54:48 -04:00
Georg Brandl 18e897250a Bump to 3.3.6 2014-10-12 09:03:40 +02:00
Antoine Pitrou 759920c5cb Issue #22604: Fix assertion error in debug mode when dividing a complex number by (nan+0j). 2014-10-10 23:51:04 +02:00
Antoine Pitrou 9086f9260f Issue #22604: Fix assertion error in debug mode when dividing a complex number by (nan+0j). 2014-10-10 23:49:32 +02:00
Terry Jan Reedy 439da843e4 Merge with 3.4 2014-10-10 16:53:56 -04:00
Terry Jan Reedy 64138c438c Issue 22603: add Francisco Fernández Castaño to ACKS. 2014-10-10 16:53:41 -04:00
Brett Cannon 1eb32c2045 Issue #20152: Port the array module to Argument Clinic. 2014-10-10 16:26:45 -04:00
Petri Lehtinen 221439dd61 #11694: merge with 3.4 2014-10-10 21:29:43 +03:00
Petri Lehtinen 3894b2a24f Issue #11694: Raise ConversionError in xdrlib as documented 2014-10-10 21:21:52 +03:00