From: Senthil Kumaran Date: Sun, 8 Jul 2012 09:16:08 +0000 (-0700) Subject: issue 14826 - Address the buildbot failure quote of url is the required change (... X-Git-Tag: v3.3.0b2~284 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25bfb529bd08eff831a258e2dbd1fed70bfa40ae;p=python issue 14826 - Address the buildbot failure quote of url is the required change ( explanation msg164973) --- 25bfb529bd08eff831a258e2dbd1fed70bfa40ae diff --cc Lib/urllib/request.py index 3896aa0ecf,c77697c576..c206a8a5b2 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@@ -260,10 -178,9 +260,10 @@@ def request_host(request) class Request: def __init__(self, url, data=None, headers={}, - origin_req_host=None, unverifiable=False): + origin_req_host=None, unverifiable=False, + method=None): # unwrap('') --> 'type://host/path' - self.full_url = unwrap(to_bytes(url)) + self.full_url = unwrap(url) self.full_url = quote(self.full_url, safe="%/:=&?~#+!$,;'@()*[]|") self.full_url, self.fragment = splittag(self.full_url) self.data = data diff --cc Misc/NEWS index 3e856fc2b9,5c05e0257c..0d7f53e558 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -16,114 -16,6 +16,114 @@@ Core and Builtin - Issue #15033: Fix the exit status bug when modules invoked using -m swith, return the proper failure return value (1). Patch contributed by Jeff Knupp. +- Issue #15229: An OSError subclass whose __init__ doesn't call back + OSError.__init__ could produce incomplete instances, leading to crashes + when calling str() on them. + +Library +------- + - - Issue #14826: Quote urls in urllib.request.Request identically to how they ++- Issue #14826: Quote urls in urllib.request.Request similar to how they + are quoted by urllib.request.URLopener. Allows urls to spaces in them to work + transparently with urllib.request.urlopen(...). Patch contributed by Stephen + Thorne. + +- Issue #5931: wsgiref environ variable SERVER_SOFTWARE will specify an + implementation specific term like Cpython, Jython instead of generic "Python" + +- Issue #13248: Remove obsolete argument "max_buffer_size" of BufferedWriter + and BufferedRWPair, from the io module. + +- Issue #13248: Remove obsolete argument "version" of argparse.ArgumentParser. + +- Issue #14814: implement more consistent ordering and sorting behaviour + for ipaddress objects + +- Issue #14814: ipaddress network objects correctly return NotImplemented + when compared to arbitrary objects instead of raising TypeError + +- Issue #14990: Correctly fail with SyntaxError on invalid encoding + declaration. + +- Issue #14814: ipaddress now provides more informative error messages when + constructing instances directly (changes permitted during beta due to + provisional API status) + +- Issue #15247: FileIO now raises an error when given a file descriptor + pointing to a directory. + +- Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open. + +- Issue #15166: Implement imp.get_tag() using sys.implementation.cache_tag. + +- Issue #15210: Catch KeyError when imprortlib.__init__ can't find + _frozen_importlib in sys.modules, not ImportError. + +- Issue #15030: importlib.abc.PyPycLoader now supports the new source size + header field in .pyc files. + +- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox + files on flush(). + +- Issue #10571: Fix the "--sign" option of distutils' upload command. + Patch by Jakub Wilk. + +- Issue #9559: If messages were only added, a new file is no longer + created and renamed over the old file when flush() is called on an + mbox, MMDF or Babyl mailbox. + +- Issue 10924: Fixed mksalt() to use a RNG that is suitable for cryptographic + purpose. + +Extension Modules +----------------- + +- Issue #15194: Update libffi to the 3.0.11 release. + +Tools/Demos +----------- + +- Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have + been enhanced to show information on more C frames relevant to CPython within + the "py-bt" and "py-bt-full" commands: + * C frames that are waiting on the GIL + * C frames that are garbage-collecting + * C frames that are due to the invocation of a PyCFunction + +Tests +----- + +- Issue #15284: Skip {send,recv}msg tests in test_socket when IPv6 is not + enabled. Patch by Brian Brazil. + +- Issue #15277: Fix a resource leak in support.py when IPv6 is disabled. + Patch by Brian Brazil. + +Build +----- + +- Issue #14330: For cross builds, don't use host python, use host search paths + for host compiler. + +- Issue #15235: Allow Berkley DB versions up to 5.3 to build the dbm module. + +- Issue #15268: Search curses.h in /usr/include/ncursesw. + + +What's New in Python 3.3.0 Beta 1? +================================== + +*Release date: 27-Jun-2012* + +Core and Builtins +----------------- + +- Fix a (most likely) very rare memory leak when calling main() and not being + able to decode a command-line argument. + +- Issue #14815: Use Py_ssize_t instead of long for the object hash, to + preserve all 64 bits of hash on Win64. + - Issue #12268: File readline, readlines and read() or readall() methods no longer lose data when an underlying read system call is interrupted. IOError is no longer raised due to a read system call returning EINTR @@@ -142,110 -27,86 +142,110 @@@ - Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on the work by Hirokazu Yamamoto. -- Issue #14775: Fix a potential quadratic dict build-up due to the garbage - collector repeatedly trying to untrack dicts. +- Issue #15096: Removed support for ur'' as the raw notation isn't + compatible with Python 2.x's raw unicode strings. -- Issue #14494: Fix __future__.py and its documentation to note that - absolute imports are the default behavior in 3.0 instead of 2.7. - Patch by Sven Marnach. +- Issue #13783: Generator objects now use the identifier APIs internally -- Issue #14761: Fix potential leak on an error case in the import machinery. +- Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. + Patch by Serhiy Storchaka. -- Issue #14699: Fix calling the classmethod descriptor directly. +- Issue #15026: utf-16 encoding is now significantly faster (up to 10x). + Patch by Serhiy Storchaka. -- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin - is closed. +- Issue #11022: open() and io.TextIOWrapper are now calling + locale.getpreferredencoding(False) instead of locale.getpreferredencoding() + in text mode if the encoding is not specified. Don't change temporary the + locale encoding using locale.setlocale(), use the current locale encoding + instead of the user preferred encoding. -- Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError - when repr() or str() is called on such an object. +- Issue #14673: Add Eric Snow's sys.implementation implementation. -- Issue #14658: Fix binding a special method to a builtin implementation of a - special method with a different name. +- Issue #15038: Optimize python Locks on Windows. -- Issue #14630: Fix a memory access bug for instances of a subclass of int - with value 0. +Library +------- -- Issue #14612: Fix jumping around with blocks by setting f_lineno. +- Issue #15187: Bugfix: remove temporary directories test_shutil was leaving + behind. -- Issue #14607: Fix keyword-only arguments which started with ``__``. +- Issue #15177: Added dir_fd parameter to os.fwalk(). -- Issue #13889: Check and (if necessary) set FPU control word before calling - any of the dtoa.c string <-> float conversion functions, on MSVC builds of - Python. This fixes issues when embedding Python in a Delphi app. +- Issue #15176: Clarified behavior, documentation, and implementation + of os.listdir(). - + -- Issue #14474: Save and restore exception state in thread.start_new_thread() - while writing error message if the thread leaves a unhandled exception. +- Issue #15061: Re-implemented hmac.compare_digest() in C to prevent further + timing analysis and to support all buffer protocol aware objects as well as + ASCII only str instances safely. -- Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch - by Suman Saha. +- Issue #15164: Change return value of platform.uname() from a + plain tuple to a collections.namedtuple. -- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as - the module name that was not interned. +- Support Mageia Linux in the platform module. -- Issue #14331: Use significantly less stack space when importing modules by - allocating path buffers on the heap instead of the stack. +- Issue #11678: Support Arch linux in the platform module. -- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not - passed strings. +- Issue #15118: Change return value of os.uname() and os.times() from + plain tuples to immutable iterable objects with named attributes + (structseq objects). -- Issue #1469629: Allow cycles through an object's __dict__ slot to be - collected. (For example if ``x.__dict__ is x``). +- Speed up _decimal by another 10-15% by caching the thread local context + that was last accessed. In the pi benchmark (64-bit platform, prec=9), + _decimal is now only 1.5x slower than float. -- Issue #14172: Fix reference leak when marshalling a buffer-like object - (other than a bytes object). +- Remove the packaging module, which is not ready for prime time. -- Issue #13521: dict.setdefault() now does only one lookup for the given key, - making it "atomic" for many purposes. Patch by Filip Gruszczyński. +- Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir" + parameter from os.remove / os.unlink. -- Issue #14471: Fix a possible buffer overrun in the winreg module. +- Issue #4489: Add a shutil.rmtree that isn't susceptible to symlink attacks. + It is used automatically on platforms supporting the necessary os.openat() + and os.unlinkat() functions. Main code by Martin von Löwis. -Library -------- +- Issue #15156: HTMLParser now uses the new "html.entities.html5" dictionary. -- Issue #14826: Quote urls in urllib.request.Request similar to how they are - quoted by urllib.request.URLopener. Allows urls to spaces in them to work - transparently with urllib.request.urlopen(...). Patch contributed by Stephen - Thorne. +- Issue #11113: add a new "html5" dictionary containing the named character + references defined by the HTML5 standard and the equivalent Unicode + character(s) to the html.entities module. -- Issue #14990: Correctly fail with SyntaxError on invalid encoding - declaration. +- Issue #15114: the strict mode of HTMLParser and the HTMLParseError exception + are deprecated now that the parser is able to parse invalid markup. -- Issue #15247: FileIO now raises an error when given a file descriptor - pointing to a directory. +- Issue #3665: \u and \U escapes are now supported in unicode regular + expressions. Patch by Serhiy Storchaka. -- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox - files on flush(). +- Issue #15153: Added inspect.getgeneratorlocals to simplify white box + testing of generator state updates -- Issue #10571: Fix the "--sign" option of distutils' upload command. - Patch by Jakub Wilk. +- Issue #13062: Added inspect.getclosurevars to simplify testing stateful + closures -- Issue #9559: If messages were only added, a new file is no longer - created and renamed over the old file when flush() is called on an - mbox, MMDF or Babyl mailbox. +- Issue #11024: Fixes and additional tests for Time2Internaldate. + +- Issue #14626: Large refactoring of functions / parameters in the os module. + Many functions now support "dir_fd" and "follow_symlinks" parameters; + some also support accepting an open file descriptor in place of of a path + string. Added os.support_* collections as LBYL helpers. Removed many + functions only previously seen in 3.3 alpha releases (often starting with + "f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka; + implemented by Larry Hastings. + +- Issue #15008: Implement PEP 362 "Signature Objects". + Patch by Yury Selivanov. + +- Issue: #15138: base64.urlsafe_{en,de}code() are now 3-4x faster. + +- Issue #444582: Add shutil.which, for finding programs on the system path. + Original patch by Erik Demaine, with later iterations by Jan Killian + and Brian Curtin. + +- Issue #14837: SSL errors now have ``library`` and ``reason`` attributes + describing precisely what happened and in which OpenSSL submodule. The + str() of a SSLError is also enhanced accordingly. + +- Issue #9527: datetime.astimezone() method will now supply a class + timezone instance corresponding to the system local timezone when + called with no arguments. - Issue #14653: email.utils.mktime_tz() no longer relies on system mktime() when timezone offest is supplied.