Python 3.1 alpha 2 版本发布 - 开源中国社区
Python 3.1 alpha 2 版本发布
红薯 2009年04月06日

Python 3.1 alpha 2 版本发布

红薯 红薯 发布于2009年04月06日 收藏 0 评论 1

腾讯云 十分钟定制你的第一个小程序>>>  

这是 Python 3.1 的第二个 Alpha 测试版。



- Implement PEP 378, Format Specifier for Thousands Separator, for integers.
- Issue #5666: Py_BuildValue's 'c' code should create byte strings.
- Issue #5499: The 'c' code for argument parsing functions now only accepts a byte, and the 'C' code only accepts a unicode character.
- Issue #1665206: Remove the last eager import in _warnings.c and make it lazy.
- Fix a segfault when running test_exceptions with coverage, caused by insufficient checks in accessors of Exception.__context__.
- Issue #5604: non-ASCII characters in module name passed to imp.find_module() were converted to UTF-8 while the path is converted to the default filesystem encoding, causing nonsense.
- Issue #5126: str.isprintable() returned False for space characters.
- Issue #4865: On MacOSX /Library/Python/2.7/site-packages is added to the end sys.path, for compatibility with the system install of Python.
- Issue #4688: Add a heuristic so that tuples and dicts containing only untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes.
- Issue #5512: Rewrite PyLong long division algorithm (x_divrem) to improve its performance. Long divisions and remainder operations are now between 50% and 150% faster.
- Issue #4258: Make it possible to use base 2**30 instead of base 2**15 for the internal representation of integers, for performance reasons. Base 2**30 is enabled by default on 64-bit machines. Add --enable-big-digits option to configure, which overrides the default. Add sys.int_info structseq to provide information about the internal format.
- Issue #4474: PyUnicode_FromWideChar now converts characters outside the BMP to surrogate pairs, on systems with sizeof(wchar_t) == 4 and sizeof(Py_UNICODE) == 2.
- Issue #5237: Allow auto-numbered fields in str.format(). For example: '{} {}'.format(1, 2) == '1 2'.
- Issue #5392: when a very low recursion limit was set, the interpreter would abort with a fatal error after the recursion limit was hit twice.
- Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with short file names.
- Py_DECREF: Add `do { ... } while (0)' to avoid compiler warnings.

- Issue 2625: added missing items() call to the for loop in mailbox.MH.get_message().
- Issue #5640: Fix _multibytecodec so that CJK codecs don't repeat error substitutions from non-strict codec error callbacks in incrementalencoder and StreamWriter.
- Issue #5656: Fix the coverage reporting when running the test suite with the -T argument.
- Issue #5647: MutableSet.__iand__() no longer mutates self during iteration.
- Issue #5624: Fix the _winreg module name still used in several modules.
- Issue #5628: Fix with a unreadable buffer.
- Issue #5619: Multiprocessing children disobey the debug flag and causes popups on windows buildbots. Patch applied to work around this issue.
- Issue #5400: Added patch for multiprocessing on netbsd compilation/support
- Issue #5387: Fixed mmap.move crash by integer overflow.
- Issue #5261: Patch multiprocessing's semaphore.c to support context manager use: "with multiprocessing.Lock()" works now.
- Issue #5236: Change time.strptime() to only take strings. Didn't work with bytes already but the failure was non-obvious.
- Issue #5177: Multiprocessing's SocketListener class now uses socket.SO_REUSEADDR on all connections so that the user no longer needs to wait 120 seconds for the socket to expire.
- Issue #5595: Fix UnboundedLocalError in ntpath.ismount().
- Issue #1174606: Calling read() without arguments of an unbounded file (typically /dev/zero under Unix) could crash the interpreter.
- The max_buffer_size arguments of io.BufferedWriter, io.BufferedRWPair, and io.BufferedRandom have been deprecated for removal in Python 3.2.
- Issue #5068: Fixed the method that would loop forever on incomplete input. That caused to hang when used with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
partial bzip2 compressed data.
- Issue #2110: Add support for thousands separator and 'n' type specifier to Decimal.__format__
- Fix Decimal.__format__ bug that swapped the meanings of the '<' and '>' alignment characters.
- The error detection code in FileIO.close() could fail to reflect the `errno` value, and report it as -1 instead.
- Issue #5016: FileIO.seekable() could return False if the file position was negative when truncated to a C int. Patch by Victor Stinner.


- Issue #5391: mmap now deals exclusively with bytes.
- Issue #5463: In struct module, remove deprecated overflow wrapping when packing an integer: struct.pack('=L', -1) now raises struct.error instead of returning b'\xff\xff\xff\xff'. The _PY_STRUCT_RANGE_CHECKING and _PY_STRUCT_OVERFLOW_MASKING constants have been removed from the struct module.


转载请注明:文章转载自 开源中国社区 []
本文标题:Python 3.1 alpha 2 版本发布
I'm truly enjoying the design and layout of your website. It's a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a designer to create your theme? Superb work! クロエ 財布 http://chloe財布