Raymond Hettinger
0515661314
Issues #7889 , #9025 and #9379 : Improvements to the random module.
2010-09-07 04:44:52 +00:00
Raymond Hettinger
f763a728ad
Document which part of the random module module are guaranteed.
2010-09-07 00:38:15 +00:00
Raymond Hettinger
435cb0f233
Document which part of the random module module are guaranteed.
2010-09-06 23:36:31 +00:00
Raymond Hettinger
f45abc97bf
Add method to OrderedDict for repositioning keys to the ends.
2010-09-06 21:26:09 +00:00
Antoine Pitrou
4bc12ef47d
Issue #9754 : Similarly to assertRaises and assertRaisesRegexp, unittest
...
test cases now also have assertWarns and assertWarnsRegexp methods to
check that a given warning type was triggered by the code under test.
2010-09-06 19:25:46 +00:00
Antoine Pitrou
972ee13e03
Issue #5506 : BytesIO objects now have a getbuffer() method exporting a
...
view of their contents without duplicating them. The view is both readable
and writable.
2010-09-06 18:48:21 +00:00
Brian Curtin
6285774f06
Implement #7566 - os.path.sameopenfile for Windows.
...
This uses the GetFileInformationByHandle function to return a tuple of values
to identify a file, then ntpath.sameopenfile compares file tuples, which
is exposed as os.path.sameopenfile.
2010-09-06 17:07:27 +00:00
Gregory P. Smith
13b55291ac
hashlib has two new constant attributes: algorithms_guaranteed and
...
algorithms_avaiable that respectively list the names of hash algorithms
guaranteed to exist in all Python implementations and the names of hash
algorithms available in the current process.
Renames the attribute new in 3.2a0 'algorithms' to 'algorithms_guaranteed'.
2010-09-06 08:30:23 +00:00
Antoine Pitrou
0d739d7047
Issue #9293 : I/O streams now raise `io.UnsupportedOperation` when an
...
unsupported operation is attempted (for example, writing to a file open
only for reading).
2010-09-05 23:01:12 +00:00
Georg Brandl
bad092556e
Post-release update.
2010-09-05 21:29:17 +00:00
Georg Brandl
65ce6ada7f
Fix reST in NEWS, and remove NEWS.help (all committers should now know reST anyway, and for those who do not, there is Documenting Python.)
2010-09-05 17:32:31 +00:00
Georg Brandl
649971e63b
Rewrap.
2010-09-05 17:06:50 +00:00
Georg Brandl
58a7b46075
Bump to 3.2a2.
2010-09-05 08:30:40 +00:00
Raymond Hettinger
4c7c9af542
Clean-up functools.total_ordering().
2010-09-05 05:57:35 +00:00
Raymond Hettinger
46462f3fb3
Typo
2010-09-05 00:36:26 +00:00
Antoine Pitrou
0049249d63
Issue #8734 : Avoid crash in msvcrt.get_osfhandle() when an invalid file
...
descriptor is provided. Patch by Pascal Chambon.
2010-09-04 20:53:29 +00:00
Antoine Pitrou
7d6e076f6d
Issue #7451 : Improve decoding performance of JSON objects, and reduce
...
the memory consumption of said decoded objects when they use the same
strings as keys.
2010-09-04 20:16:53 +00:00
Antoine Pitrou
74a69fa662
Issue #9225 : Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced
...
by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but
our bytecode is a bit simplified. Patch by Demur Rumed.
2010-09-04 18:43:52 +00:00
Brett Cannon
ef0e6c3b04
_warnings exposed two variables with the name 'default_action' and
...
'once_registry'. This is bad as the warnings module had variables named
'defaultaction' and 'onceregistry' which are what people should be looking at
(technically those variables shouldn't be mucked with as they are undocumented,
but we all know better than to believe that isn't happening). So the variables
from _warnings have been renamed to come off as private and to avoid confusion
over what variable should be used.
Closes issue #9766 . Thanks to Antoine Pitrou for the discovery.
2010-09-04 18:24:04 +00:00
Antoine Pitrou
3941a8fece
Issue #1100562 : Fix deep-copying of objects derived from the list and dict types.
...
Patch by Michele Orrù and Björn Lindqvist.
2010-09-04 17:40:21 +00:00
Antoine Pitrou
d3ccde8a21
Issue #7736 : Release the GIL around calls to opendir() and closedir()
...
in the posix module. Patch by Marcin Bachry.
2010-09-04 17:21:57 +00:00
Martin v. Löwis
a5e3109154
Issue #1303434 : Include PDBs in release.
...
Patch by James Lee and Daniel Stutzbach.
2010-09-04 14:38:09 +00:00
Fred Drake
cc645b9a59
add consistent support for the vars and default arguments on all
...
configuration parser classes
(http://bugs.python.org/issue9421 )
2010-09-04 04:35:34 +00:00
Barry Warsaw
aa44b2b5ca
NEWS for PEP 3149, and clean up a few other entries.
2010-09-03 18:36:11 +00:00
Antoine Pitrou
8b358e55db
Fix NEWS entry.
2010-09-03 16:12:14 +00:00
Daniel Stutzbach
6c765284a3
Fix Issue9753: socket.dup() does not always work right on Windows
2010-09-03 12:38:33 +00:00
Fred Drake
8844441ae6
fix output from RawConfigParser.write and ConfigParser.write for None
...
values (http://bugs.python.org/issue7005 )
(merged r84443 from the release27-mmaint branch, with changes to reflect
changes in Python 3)
2010-09-03 04:22:36 +00:00
Daniel Stutzbach
19e5a6fb4a
Credit where credit is due
2010-09-02 15:13:35 +00:00
Daniel Stutzbach
045b3ba184
Issue #9212 : Added the missing isdisjoint method to the dict_keys and
...
dict_items views. The method is required by the collections.Set ABC,
which the views register as supporting.
2010-09-02 15:06:06 +00:00
Antoine Pitrou
e0793ba992
Issue #9737 : Fix a crash when trying to delete a slice or an item from
...
a memoryview object.
2010-09-01 21:14:16 +00:00
Antoine Pitrou
1ce3eb5c5b
Issue #8990 : array.fromstring() and array.tostring() get renamed to
...
frombytes() and tobytes(), respectively, to avoid confusion. Furthermore,
array.frombytes(), array.extend() as well as the array.array()
constructor now accept bytearray objects. Patch by Thomas Jollans.
2010-09-01 20:29:34 +00:00
Antoine Pitrou
fce7fd6426
Issue #9549 : sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
...
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
2010-09-01 18:54:56 +00:00
Antoine Pitrou
b0fa831d1e
Issue #7415 : PyUnicode_FromEncodedObject() now uses the new buffer API
...
properly. Patch by Stefan Behnel.
2010-09-01 15:10:12 +00:00
Antoine Pitrou
f68c2a701b
Issue #3101 : Helper functions _add_one_to_C() and _add_one_to_F() become
...
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
2010-09-01 12:58:21 +00:00
Daniel Stutzbach
19d6a4fd49
Issue #808164 : Fixed socket.close to avoid references to globals, to
...
avoid issues when socket.close is called from a __del__ method.
2010-08-31 20:08:07 +00:00
Daniel Stutzbach
a606faa491
Issue 5553: Improved Py_LOCAL_INLINE to actually inline under compilers other than MSC
2010-08-31 19:51:07 +00:00
Antoine Pitrou
33a299428d
Issue #9700 : define HAVE_BROKEN_POSIX_SEMAPHORES under AIX 6.x. Patch by
...
Sébastien Sablé.
2010-08-30 14:52:00 +00:00
Benjamin Peterson
33856de84d
handle names starting with non-ascii characters correctly #9712
2010-08-30 14:41:20 +00:00
Giampaolo Rodolà
51078b1e5d
update Misc/NEWS to include issue #9706 changes
2010-08-29 19:31:49 +00:00
Antoine Pitrou
67c7ce4bef
Issue #4835 : make PyLong_FromSocket_t() and PyLong_AsSocket_t() private
...
to the socket module, and fix the width of socket descriptors to be
correctly detected under 64-bit Windows.
2010-08-28 20:42:55 +00:00
Antoine Pitrou
1a9a9d5433
Issue #1868 : Eliminate subtle timing issues in thread-local objects by
...
getting rid of the cached copy of thread-local attribute dictionary.
2010-08-28 18:17:03 +00:00
Mark Dickinson
64a38c0eb5
Issue #1512791 : In setframerate method of Wave_write, round non-integral
...
inputs to the nearest integer. Thanks Neil Tallim for the patch.
2010-08-28 17:22:16 +00:00
Senthil Kumaran
4bb5c273c6
Fix Issue8797 - Reset the basic auth retry count when response code is not 401.
2010-08-26 06:16:22 +00:00
Benjamin Peterson
0e10206f2c
basicsize and itemsize are Py_ssize_t #9688
2010-08-25 23:13:17 +00:00
Daniel Stutzbach
864078a5dd
Issue 8781: Define SIZEOF_WCHAR_T on Windows
2010-08-25 19:18:59 +00:00
Martin v. Löwis
112c0f3411
Issue #1027206 : getnameinfo is now restricted to numeric addresses as input.
2010-08-25 07:38:15 +00:00
R. David Murray
219d1c8ae3
#1194222 : make parsedate always return RFC2822 four character years.
...
Two character years are now converted to four character years using
the Posix standard rule (<68 == 2000, >=68==1900). This makes the
parsed date RFC2822 compliant even if the input is not.
Patch and test by Jeffrey Finkelstein.
2010-08-25 00:45:55 +00:00
Benjamin Peterson
f52c2c63cd
further clarify
2010-08-24 21:03:37 +00:00
Daniel Stutzbach
31da5b2f69
Issue 8750: Fixed MutableSet's methods to correctly handle reflexive operations, namely x -= x and x ^= x
2010-08-24 20:49:57 +00:00
Benjamin Peterson
17689991e6
only catch AttributeError in hasattr() #9666
2010-08-24 03:26:23 +00:00
Giampaolo Rodolà
9cf5ef4cc0
fix issue 9129: adds proper error handling on accept() when smtpd accepts new incoming connections.
2010-08-23 22:28:13 +00:00
Giampaolo Rodolà
bbc4782d77
fix issue 9601: ftplib now provides a workaround for invalid response code returned on MKD and PWD by non-compliant FTPserver implementations such as ISS shipped with Windows server 2003
2010-08-23 22:10:32 +00:00
Giampaolo Rodolà
76fc8c7098
fix issue 658749: correctly interprets asyncore's windows errors on connect()
2010-08-23 21:53:41 +00:00
Vinay Sajip
de6e9d615d
Issue #9501 : Fixed logging regressions in cleanup code.
2010-08-23 17:50:30 +00:00
Benjamin Peterson
06b8b10090
news note for last change
2010-08-23 17:47:43 +00:00
Brett Cannon
ee6d64773b
One of the joys of having test_multiprocessing occasionally execute after
...
test_importlib is that it discovers special little race conditions. For
instance, it turns out that importlib would throw an exception if two different
Python processes both tried to create the __pycache__ directory as one process
would succeed, causing the other process to fail as it didn't expect to get any
"help". So now importlib simply stays calm and just accepts someone else did
the work of creating the __pycache__ directory for it, moving on with life.
Closes issue #9572 .
2010-08-22 22:19:11 +00:00
Martin v. Löwis
56773cf0d2
Mention that gethostbyaddr now also supports IDNA.
2010-08-22 19:38:04 +00:00
Martin v. Löwis
fc0275a14a
Issue #1027206 : Support IDNA in gethostbyname, gethostbyname_ex and
...
getaddrinfo. Patch by David Watson.
2010-08-22 19:33:47 +00:00
Raymond Hettinger
9117c75148
Issue #9214 : Fix set operations on KeysView and ItemsView.
2010-08-22 07:44:24 +00:00
Antoine Pitrou
b46b9d59ef
Issue #9617 : Signals received during a low-level write operation aren't
...
ignored by the buffered IO layer anymore.
2010-08-21 19:09:32 +00:00
Giampaolo Rodolà
5fe9cd53b2
revert changes made in r84236 committed by accident
2010-08-21 18:47:59 +00:00
Giampaolo Rodolà
5c8c9a2c33
fix issue #9129 : added proper error handling when accepting new connections in SMTPServer.handle_accept
2010-08-21 18:35:05 +00:00
Benjamin Peterson
23110e7361
alias macintosh to mac_roman #843590
2010-08-21 02:54:44 +00:00
Martin v. Löwis
5ea823cf55
Decode NIS data to fs encoding, using the surrogate error handler.
2010-08-19 09:11:51 +00:00
Victor Stinner
e8d5145e18
Create os.fsdecode(): decode from the filesystem encoding with surrogateescape
...
error handler, or strict error handler on Windows.
* Rewrite os.fsencode() documentation
* Improve os.fsencode and os.fsdecode() tests using the new PYTHONFSENCODING
environment variable
2010-08-19 01:05:19 +00:00
Andrew M. Kuchling
4ea04a306f
#7647 : add ST_RDONLY, ST_NOSUID constants to os module.
...
(Also fix a name ordering in the ACKS file.)
2010-08-18 22:30:34 +00:00
Victor Stinner
94908bbc15
Issue #8622 : Add PYTHONFSENCODING environment variable to override the
...
filesystem encoding.
initfsencoding() displays also a better error message if get_codeset() failed.
2010-08-18 21:23:25 +00:00
Antoine Pitrou
b85e165635
Issue #5737 : Add Solaris-specific mnemonics in the errno module. Patch by
...
Matthew Ahrens.
2010-08-18 21:05:19 +00:00
Amaury Forgeot d'Arc
324ac65ceb
#5127 : Even on narrow unicode builds, the C functions that access the Unicode
...
Database (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others) now accept
and return characters from the full Unicode range (Py_UCS4).
The differences from Python code are few:
- unicodedata.numeric(), unicodedata.decimal() and unicodedata.digit()
now return the correct value for large code points
- repr() may consider more characters as printable.
2010-08-18 20:44:58 +00:00
Martin v. Löwis
dfaf9ec93a
Restore GIL in nis_cat in case of error.
2010-08-18 16:12:23 +00:00
Victor Stinner
6c00c1464f
Issue #9425 : Create PyModule_GetFilenameObject() function
...
... to get the filename as a unicode object, instead of a byte string. Function
needed to support unencodable filenames. Deprecate PyModule_GetFilename() in
favor on the new function.
2010-08-17 23:37:11 +00:00
Victor Stinner
6961bd690e
Issue #8063 : Call _PyGILState_Init() earlier in Py_InitializeEx().
2010-08-17 22:26:51 +00:00
Antoine Pitrou
79c5ef11d5
Issue #3488 : Provide convenient shorthand functions `gzip.compress`
...
and `gzip.decompress`. Original patch by Anand B. Pillai.
2010-08-17 21:10:05 +00:00
Antoine Pitrou
671b4d948e
Issue #9612 : The set object is now 64-bit clean under Windows.
2010-08-17 17:55:07 +00:00
Giampaolo Rodolà
42382fedcc
fix issue #8807 : adds a context parameter to POP3_SSL class.
2010-08-17 16:09:53 +00:00
Giampaolo Rodolà
ccfb91c89f
fix issue #8866 : parameters passed to socket.getaddrinfo can now be specified as single keyword arguments.
2010-08-17 15:30:23 +00:00
Nick Coghlan
d26c18adcc
Issue #8202 : Set sys.argv[0] to -m rather than -c while searching for the module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
2010-08-17 13:06:11 +00:00
Nick Coghlan
09c8123e6f
Address XXX comment in dis.py: inspect.py now attempts to reuse the dis.py compiler flag values before resorting to defining its own
2010-08-17 10:18:16 +00:00
Nick Coghlan
eae2da1da7
Issue 9147: Add dis.code_info()
2010-08-17 08:03:36 +00:00
Nick Coghlan
9887683f74
Document and test the resolution of issue 3445 (tolerate missing attributes in functools.update_wrapper, previously implemented as a side effect of the __annotations__ copying patch) and implement issue 9567 (add a __wrapped__ attribute when using update_wrapper)
2010-08-17 06:17:18 +00:00
Nick Coghlan
632a0c1476
Remove some lingering remnants of the short-lived functools.lfu_cache
2010-08-17 05:22:50 +00:00
Benjamin Peterson
45c257f193
add support for abstract class and static methods #5867
2010-08-17 00:52:52 +00:00
Alexander Belopolsky
e29e6bffb5
Issue #665761 : functools.reduce() will no longer mask exceptions other
...
than TypeError raised by the iterator argument. Also added a test to
check that zip() already behaves similarly.
2010-08-16 18:55:46 +00:00
Victor Stinner
79766636b6
Issue #9599 : Create PySys_FormatStdout() and PySys_FormatStderr()
...
Write a message formatted by PyUnicode_FromFormatV() to sys.stdout and
sys.stderr.
2010-08-16 17:36:42 +00:00
Martin v. Löwis
907229af87
Don't run pgen twice when using make -j.
2010-08-15 15:47:25 +00:00
Victor Stinner
d17f219759
Oops, fix a typo in NEWS: surrogateespace => surrogateescape
2010-08-15 09:56:07 +00:00
Victor Stinner
e039ffe41d
Issue #9605 : posix.getlogin() decodes the username with file filesystem
...
encoding and surrogateescape error handler. Patch written by David Watson.
Reindent also posix_getlogin(), and fix a typo in the NEWS file.
2010-08-15 09:33:08 +00:00
Victor Stinner
61ec5dca2b
Issue #9604 : posix.initgroups() encodes the username using the fileystem
...
encoding and surrogateescape error handler. Patch written by David Watson.
2010-08-15 09:22:44 +00:00
Victor Stinner
5fe6de8c72
Issue #9603 : posix.ttyname() and posix.ctermid() decode the terminal name
...
using the filesystem encoding and surrogateescape error handler. Patch
written by David Watson.
2010-08-15 09:12:51 +00:00
Florent Xicluna
09245d8682
List Misc/python-config.in in Misc/README. Fix few typos.
2010-08-14 16:56:27 +00:00
Giampaolo Rodolà
419f704d76
fix issue #8857 : provide a test case for socket.getaddrinfo
2010-08-14 16:45:41 +00:00
Georg Brandl
cc5943d36b
Fix format.
2010-08-14 15:57:20 +00:00
Georg Brandl
9427dcfc31
Typo fix.
2010-08-14 15:46:59 +00:00
Éric Araujo
a85e2175bb
Manually merge r83995: Fix version{added,changed} and spacing in NEWS
2010-08-14 03:59:54 +00:00
Éric Araujo
da668ff24f
Use a marker in generated MANIFEST files, don't touch files without it. Fixes #8688 .
2010-08-14 02:30:34 +00:00
Victor Stinner
47fcb5b4c3
Issue #9542 : Create PyUnicode_FSDecoder() function
...
It's a ParseTuple converter: decode bytes objects to unicode using
PyUnicode_DecodeFSDefaultAndSize(); str objects are output as-is.
* Don't specify surrogateescape error handler in the comments nor the
documentation, but PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_EncodeFSDefault() because these functions use strict error handler
for the mbcs encoding (on Windows).
* Remove PyUnicode_FSConverter() comment in unicodeobject.c to avoid
inconsistency with unicodeobject.h.
2010-08-13 23:59:58 +00:00
Antoine Pitrou
042b128f58
Issue #9203 : Computed gotos are now enabled by default on supported
...
compilers (which are detected by the configure script). They can still
be disable selectively by specifying --without-computed-gotos.
2010-08-13 21:15:58 +00:00
Antoine Pitrou
3060c4573f
Reapply r83877.
2010-08-13 16:27:38 +00:00
Victor Stinner
4a2b7a1b14
Issue #9425 : Create PyErr_WarnFormat() function
...
Similar to PyErr_WarnEx() but use PyUnicode_FromFormatV() to format the warning
message.
Strip also some trailing spaces.
2010-08-13 14:03:48 +00:00
Antoine Pitrou
3e2eab19b9
Typo.
2010-08-12 15:15:01 +00:00
Antoine Pitrou
7c8bcb6f92
Issue #7467 : when a file from a ZIP archive, its CRC is checked and a
...
BadZipfile error is raised if it doesn't match (as used to be the
case in Python 2.5 and earlier).
2010-08-12 15:11:50 +00:00
Benjamin Peterson
d4efbf90d2
use pep 383 decoding for mknod and mkfifo #9570
...
Patch by David Watson.
2010-08-11 19:20:42 +00:00
Alexander Belopolsky
f0f45142d5
Issue #2443 : Added a new macro, Py_VA_COPY, which is equivalent to C99
...
va_copy, but available on all python platforms. Untabified a few
unrelated files.
2010-08-11 17:31:17 +00:00
Antoine Pitrou
32cfedeb1c
Issue #9550 : a BufferedReader could issue an additional read when the
...
original read request had been satisfied, which can block indefinitely
when the underlying raw IO channel is e.g. a socket. Report and original
patch by Jason V. Miller.
2010-08-11 13:31:33 +00:00
Antoine Pitrou
b73caab436
Issue #6915 : Under Windows, os.listdir() didn't release the Global
...
Interpreter Lock around all system calls. Original patch by Ryan Kelly.
2010-08-09 23:39:31 +00:00
Antoine Pitrou
5af4f4b983
Issue #3757 : thread-local objects now support cyclic garbage collection.
...
Thread-local objects involved in reference cycles will be deallocated
timely by the cyclic GC, even if the underlying thread is still running.
2010-08-09 22:38:19 +00:00
Antoine Pitrou
6e451df800
Followup to r83869 and issue #8524 : rename socket.forget() to socket.detach()
...
and make it return the file descriptor.
2010-08-09 20:39:54 +00:00
Fred Drake
a492362f9a
issue #9452 :
...
Add read_file, read_string, and read_dict to the configparser API;
new source attribute to exceptions.
2010-08-09 12:52:45 +00:00
Florent Xicluna
c7eaede21e
Fix ``Tools/scripts/checkpyc.py`` after PEP 3147.
2010-08-09 12:26:44 +00:00
Antoine Pitrou
aba74bddd6
Revert r83877 in order to fix compilation
2010-08-09 10:47:46 +00:00
Senthil Kumaran
9f347ea545
reapply the revert made in r83875
...
Now the _collections is statically built, the build dependencies are in proper
order and build works fine.
Commit Log from r83874:
Issue 9396. Apply functools.lru_cache in the place of the
random flushing cache in the re module.
2010-08-09 07:30:53 +00:00
Raymond Hettinger
31022301b5
Revert 83784 adding functools.lru_cache() to the re module.
...
The problem is that the re module is imported by sysconfig
and re needs functools which uses collections.OrderedDict()
but the _collectionsmodule.c code is not yet constructed
at this point in the build.
The likely best solution will be to include _collections
as part of the static build before the rest of the
boot-strapping.
2010-08-09 05:56:50 +00:00
Raymond Hettinger
4f859ed9c7
Issue 9396. Apply functools.lru_cache in the place of the
...
random flushing cache in the re module.
2010-08-09 04:24:42 +00:00
Antoine Pitrou
e43f9d0ed6
Issue #8524 : Add a forget() method to socket objects, so as to put the
...
socket into the closed state without closing the underlying file
descriptor.
2010-08-08 23:24:50 +00:00
Florent Xicluna
ba8a98600e
Fix xml.etree.ElementInclude to include the tail of the current node. Issue #6231
2010-08-08 23:08:41 +00:00
Antoine Pitrou
696e03553b
Issue #477863 : Print a warning at shutdown if gc.garbage is not empty.
2010-08-08 22:18:46 +00:00
Florent Xicluna
eb6f3ead00
Fix #8530 : Prevent stringlib fastsearch from reading beyond the front of an array.
2010-08-08 22:07:16 +00:00
Antoine Pitrou
bddc9fe22b
Issue #5319 : Print an error if flushing stdout fails at interpreter
...
shutdown.
2010-08-08 20:46:42 +00:00
Florent Xicluna
c17f17294f
Issue #8047 : Fix the xml.etree serializer to return bytes by default.
...
Use ``encoding="unicode"`` to generate a Unicode string.
2010-08-08 19:48:29 +00:00
Thomas Heller
bf4cc5d469
Fix issue6869: refcount problem in the _ctypes extension.
2010-08-08 18:16:20 +00:00
Florent Xicluna
39d795d8c1
Issue #7564 : Skip test_ioctl if another process is attached to /dev/tty.
2010-08-08 18:06:13 +00:00
Florent Xicluna
e7eaec699e
Typo.
2010-08-08 18:03:44 +00:00
Thomas Heller
864cc6703a
Fix issue5504: ctypes does now work with systems where mmap can't be
...
PROT_WRITE and PROT_EXEC.
2010-08-08 17:58:53 +00:00
Senthil Kumaran
c41e1fad49
Add a news entry for Issue8280.
2010-08-08 11:50:22 +00:00
Raymond Hettinger
d331ce9e66
Issue #9507 : Named tuple repr will now automatically display the right
...
name in a tuple subclass.
2010-08-08 01:13:42 +00:00
Mark Dickinson
af43e9a288
Issue #8433 : Fix test_curses failure for platforms with recent versions of ncurses.
2010-08-07 12:33:36 +00:00
Brian Curtin
ef9efbd69c
Fix #9324 : Add parameter validation to signal.signal on Windows in order
...
to prevent crashes.
2010-08-06 19:27:32 +00:00
Mark Dickinson
e6fc7401a9
In PySlice_IndicesEx, clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] rather than [PY_SSIZE_T_MIN, PY_SSIZE_T_MAX].
2010-08-06 18:55:26 +00:00
Mark Dickinson
4f3086f264
Misc/NEWS entry for r83751.
2010-08-06 09:38:58 +00:00
Brian Curtin
f045d775fd
Issue #9524 : Document that two CTRL* signals are meant for use only
...
with os.kill.
2010-08-05 18:56:00 +00:00
Gerhard Häring
1c5471f319
Issue #6683 : For SMTP logins we now try all authentication methods advertised
...
by the server. Many servers are buggy and advertise authentication methods they
o not support in reality. This change makes smtplib.auth() work more often in
the real world, where we face misconfigured servers and servers that advertise
methods they don't support due to the madness that is SASL.
2010-08-05 14:08:44 +00:00
Mark Dickinson
388122d43b
Issue #9337 : Make float.__str__ identical to float.__repr__.
...
(And similarly for complex numbers.)
2010-08-04 20:56:28 +00:00
Antoine Pitrou
560f7647ce
Issue #8814 : function annotations (the `__annotations__` attribute)
...
are now included in the set of attributes copied by default by
functools.wraps and functools.update_wrapper. Patch by Terrence Cole.
2010-08-04 18:28:02 +00:00
Antoine Pitrou
482e66a58a
Issue #9496 : Provide a test suite for the rlcompleter module. Patch by
...
Michele Orrù.
2010-08-04 15:43:16 +00:00
Giampaolo Rodolà
f96482e91a
as per discussion with antoine revert changes made in 83708 as the user useing ftplib's readline methods is supposed to always use a binary file
2010-08-04 10:36:18 +00:00
Giampaolo Rodolà
b939235c6a
fix issue #6822 : ftplib's storline method doesn't work with text files
2010-08-04 10:12:00 +00:00
Giampaolo Rodolà
b5c23761d3
issue #8687 : provides a test suite for sched.py module
2010-08-04 09:28:05 +00:00
Giampaolo Rodolà
934abddaec
fix issue #2944 : asyncore doesn't handle connection refused correctly (patch by Alexander Shigin). Merged from 2.7 branch.
2010-08-04 09:02:27 +00:00
Richard Jones
dd24cf692c
note smtpd module changes in NEWS
2010-08-04 01:19:22 +00:00
R. David Murray
c4e69cc1d8
#3196 : if needed pad a short base64 encoded word before trying to decode.
...
The RFCs encourage following Postel's law: be liberal in what you accept.
So if someone forgot to pad the base64 encoded word payload to an
even four bytes, we add the padding before handing it to base64mime.decode.
Previously, missing padding resulted in a HeaderParseError.
Patch by Jason Williams.
2010-08-03 22:14:10 +00:00
Mark Dickinson
df7f2fd350
Misc/NEWS entry for r83677.
2010-08-03 18:44:16 +00:00
R. David Murray
88c49fe320
#9444 : use first of prefix_chars for help opt instead of raising error
...
An argparse option parser created with a prefix_chars that did not
include a '-' would happily add -h and --help options, and then throw
an error when it tried to format the help because the - was an invalid
prefix character. This patch makes it use the first character of
prefix_chars as the character for the help options if and only if '-'
is not one of the valid prefix_chars.
Fix by Theodore Turocy, unit tests by Catherine Devlin.
2010-08-03 17:56:09 +00:00
Antoine Pitrou
f767f08e29
Issue #8867 : Fix `Tools/scripts/serve.py` to work with files containing
...
non-ASCII content.
2010-08-03 17:09:36 +00:00
Mark Dickinson
6b54e1f782
Issue #8065 : Fix another memory leak in readline module, from failure to free
...
the result of a call to history_get_history_state.
2010-08-03 16:49:49 +00:00
Mark Dickinson
29b238e0dc
Issue #9450 : Fix memory leaks in readline.remove/replace_history_entry.
2010-08-03 16:08:16 +00:00
Georg Brandl
2d3c4e79a1
#7372 : fix regression in pstats: a previous fix to handle cProfile data in add_callers broke handling of profile data.
2010-08-02 17:24:49 +00:00
Georg Brandl
8e43fbfffa
#9428 : fix running scripts from profile/cProfile with their own name and the right namespace. Same fix as for trace.py in #1690103 .
2010-08-02 12:20:23 +00:00
Georg Brandl
b1a97afadb
#9209 and #7781 : fix two crashes in pstats interactive browser.
2010-08-02 12:06:18 +00:00
Georg Brandl
5f90d79473
Fix style of referring to issues.
2010-08-01 22:31:05 +00:00
Raymond Hettinger
5be21b7a5a
Update OrderedDict implementation to match that in Py2.7.
2010-08-01 22:10:57 +00:00
Antoine Pitrou
7ffa196dce
Issue #8397 : Raise an error when attempting to mix iteration and regular
...
reads on a BZ2File object, rather than returning incorrect results.
2010-08-01 20:08:46 +00:00
Antoine Pitrou
c881f1592f
Issue #9448 : Fix a leak of OS resources (mutexes or semaphores) when
...
re-initializing a buffered IO object by calling its `__init__` method.
2010-08-01 16:53:42 +00:00
Georg Brandl
e6c5950af0
#5551 : symbolic links never can be mount points. Fixes the fix for #1713 .
2010-08-01 15:30:56 +00:00
Brian Curtin
ea47eaa395
Fix #8105 . Add validation to mmap.mmap so invalid file descriptors
...
don't cause a crash on Windows.
2010-08-01 15:26:26 +00:00
Georg Brandl
0bccc185b4
#8046 : add context manager protocol support to mmap objects. Also add closed property.
2010-08-01 14:50:00 +00:00
Mark Dickinson
5b65df7ce2
Issue #9416 : Fix some issues with complex formatting where the
...
output with no type specifier failed to match the str output:
- format(complex(-0.0, 2.0), '-') omitted the real part from the output,
- format(complex(0.0, 2.0), '-') included a sign and parentheses.
2010-08-01 10:41:49 +00:00
Georg Brandl
b16e38b825
#8826 : the "expires" attribute value is a date string with spaces, but apparently not all user-agents put it in quotes. Handle that as a special case.
2010-08-01 09:06:34 +00:00
Georg Brandl
8f9f466505
#1690103 : fix initial namespace for code run with trace.main().
2010-08-01 08:35:29 +00:00
Georg Brandl
920bc0fd86
Add another news entry.
2010-08-01 08:10:08 +00:00
Georg Brandl
f325e03f48
#8230 : make Lib/test/sortperf.py run on Python 3.
2010-08-01 08:07:49 +00:00
R. David Murray
7905d61b2c
#8620 : Cmd no longer truncates last character if stdin ends without newline
...
Cmd used to blindly chop off the last character of every input line. If
the input reached EOF and there was no final new line, it would truncate
the last character of the last command. This fix instead strips trailing
\r\n from the input lines. While this is a small behavior change, it
should not break any working code, since feeding a '\r\n' terminated
file to Cmd would previously leave the \r's on the lines, resulting
in failed command execution.
I wrote the unit test in preparation for a PyOhio TeachMe session
run by Catherine Devlin, and we can thank Catherine and the PyOhio
session attendees for the fix. I've added Catherine to the Acks file
for organizing and leading the TeachMe session, out of which we will
hopefully get some new contributors.
2010-08-01 03:31:09 +00:00
Georg Brandl
05245f7487
#5146 : handle UID THREAD command correctly.
2010-07-31 22:32:52 +00:00
Georg Brandl
87a1564f24
#5147 : revert accidental indentation of header constant for MozillaCookieJar.
2010-07-31 22:11:11 +00:00
Georg Brandl
78aa396415
#8198 : the Helper class should not save the stdin and stdout objects
...
at import time, rather by default use the current streams like the
other APIs that output help.
2010-07-31 21:51:48 +00:00
Georg Brandl
bb1901529d
Fix "Berkeley" name.
2010-07-31 21:41:42 +00:00
Georg Brandl
cfb68218b7
#7909 : the prefixes \\.\ and \\?\ indicate special Windows paths, do not try to manipulate them. See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx for details.
2010-07-31 21:40:15 +00:00
Georg Brandl
6cb7b6593e
#1286 : allow using fileinput.FileInput as context manager.
2010-07-31 20:08:15 +00:00
Georg Brandl
ebb280cf90
Move news item to the correct position.
2010-07-31 18:09:46 +00:00
Georg Brandl
2e7346acc9
Re-commit r83327 now that the release is done.
2010-07-31 18:09:23 +00:00
Georg Brandl
ee449c41b4
Post-release updates.
2010-07-31 18:05:35 +00:00
Georg Brandl
014e0ca58e
Revert r83327. This will have to wait until after the alpha1 release.
2010-07-31 10:16:21 +00:00
Raymond Hettinger
9e46ef819c
Add functools.lfu_cache() and functools.lru_cache().
2010-07-31 10:11:39 +00:00
Georg Brandl
62069d3ce7
Bump versions and review NEWS file.
2010-07-31 08:56:11 +00:00
Georg Brandl
b90ffd88f1
Part of #7245 : when KeyboardInterrupt is raised while defining commands, restore the old commands instead of producing a traceback.
2010-07-30 22:20:16 +00:00
Matthias Klose
635edd1990
- Issue #7567 : PyCurses_setupterm: Don't call `setupterm' twice.
2010-07-30 21:40:57 +00:00
Georg Brandl
0a9c3e91dc
Show the traceback line numbers as well as the current line numbers if an exception is being debugged. Courtesy of pdb++ by Antonio Cuni. Also document -> and >> markers for "list".
2010-07-30 18:46:38 +00:00
Martin v. Löwis
e38de851eb
Use OpenSSL 1.0.0a on Windows.
2010-07-30 17:30:51 +00:00
Georg Brandl
e59ca2afe3
Add "longlist" and "source" commands, ideas borrowed from pdb++ by Antonio Cuni.
2010-07-30 17:04:28 +00:00
Georg Brandl
7410dd11ef
#809887 : improve pdb feedback for breakpoint-related actions. Also add a functional test for these commands.
2010-07-30 12:01:20 +00:00
Georg Brandl
3f94089a77
#5294 : Fix the behavior of pdb "continue" command when called in the top-level debugged frame.
2010-07-30 10:29:19 +00:00
Georg Brandl
d72e043bdd
#5727 : Restore the ability to use readline when calling into pdb in doctests.
2010-07-30 09:59:28 +00:00
Georg Brandl
34cc0f53be
#6719 : In pdb, do not stop somewhere in the encodings machinery if the source file to be debugged is in a non-builtin encoding.
2010-07-30 09:43:00 +00:00
Georg Brandl
25fbb891d8
Issue #8048 : Prevent doctests from failing when sys.displayhook has
...
been reassigned.
2010-07-30 09:23:23 +00:00
Georg Brandl
44f8bf9411
#8015 : fix crash when entering an empty line for breakpoint commands. Also restore environment properly when an exception occurs during the definition of commands.
2010-07-30 08:54:49 +00:00
Georg Brandl
2dfec552fe
Allow giving an explicit line number to "until".
2010-07-30 08:43:32 +00:00
Georg Brandl
e023091815
#1437051 : allow "continue"/"next"/etc. in .pdbrc, also add pdb -c option to give these commands. This allows to run a script until an exception occurs.
2010-07-30 08:29:39 +00:00
Georg Brandl
a91a94b7c0
#4179 : In pdb, allow "list ." as a command to return to the currently debugged line.
2010-07-30 07:14:01 +00:00
Mark Dickinson
cf28b95800
Issue #9422 : Fix memory leak when re-initializing a struct.Struct object.
2010-07-29 21:41:59 +00:00
Georg Brandl
0a0fc07d37
#4108 : the first default entry (User-agent: *) wins.
2010-07-29 17:55:01 +00:00
Georg Brandl
056cb93e7a
#6630 : allow customizing flags for compiling string.Template.idpattern.
2010-07-29 17:16:10 +00:00
Georg Brandl
8dcaa7396f
#9411 : allow selecting an encoding for configparser files. Also adds a new test config file to test special cases.
2010-07-29 12:17:40 +00:00
Georg Brandl
96a60ae90c
#1682942 : add some ConfigParser features: alternate delimiters, alternate comments, empty lines in values. Also enhance the docs with more examples and mention SafeConfigParser before ConfigParser. Patch by Lukas Langa, review by myself, Eric and Ezio.
2010-07-28 13:13:46 +00:00
Georg Brandl
cbb0ae4a42
#9354 : Provide getsockopt() in asyncore file_wrapper(). Patch by Lukas Langa.
2010-07-28 08:19:35 +00:00
Victor Stinner
8182b717db
Issue #8991 : convertbuffer() rejects discontigious buffers
2010-07-28 00:40:58 +00:00
Victor Stinner
cf448832eb
Issue #8966 : ctypes: Remove implicit bytes-unicode conversion
2010-07-28 00:15:03 +00:00
Alexander Belopolsky
455f7bdc05
Issue #9378 : python -m pickle <pickle file> will now load and display
...
the first object in the pickle file.
2010-07-27 23:02:38 +00:00
Florent Xicluna
f1046ca817
Issue #4770 : Restrict binascii module to accept only bytes (as specified).
...
And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` before ASCII-to-binary decoding.
2010-07-27 21:20:15 +00:00
Alexander Belopolsky
c02cc2707a
Issue #9384 : python -m tkinter will now display a simple demo applet.
2010-07-27 14:16:32 +00:00
Gregory P. Smith
5a63183a8b
The default size of the re module's compiled regular expression cache has
...
been increased from 100 to 500 and the cache replacement policy has changed
from simply clearing the entire cache on overflow to randomly forgetting 20%
of the existing cached compiled regular expressions. This is a performance
win for applications that use a lot of regular expressions and limits the
impact of the performance hit anytime the cache is exceeded.
2010-07-27 05:31:29 +00:00
Brian Curtin
0f0c3320ee
Add note about #7113 and add Łukasz Langa to ACKS
2010-07-26 02:36:32 +00:00
Victor Stinner
756f547b9a
#9032 : XML-RPC client: Transport.request() retries on EPIPE error
...
The EPIPE error occurs when the server closes the socket and the client sends a
"big" XML-RPC request (I don't know exactly the size threshold).
request() just have to ignore the error because single_request() closes the
socket on error, and so the next call to single_request() will open a new
socket.
Remove also a comment in the HTTP client because it's now wrong: see r70643
and issue #5542 .
2010-07-24 02:24:55 +00:00
Victor Stinner
eccc5facd3
Issue #4629 : getopt raises an error if an argument ends with = whereas getopt
...
doesn't except a value (eg. --help= is rejected if getopt uses ['help='] long
options).
2010-07-24 00:49:20 +00:00
Alexander Belopolsky
cf86e368eb
Issue #7989 : Added pure python implementation of the datetime module.
2010-07-23 19:25:47 +00:00
Ronald Oussoren
b6ee4f5bfc
This fixes issue7900 by adding code that deals
...
with the fact that getgroups(2) might return
more that MAX_GROUPS on OSX.
See the issue (and python-dev archives) for the
gory details. Summarized: OSX behaves rather oddly
and Apple says this is intentional.
2010-07-23 13:53:51 +00:00
Martin v. Löwis
c9e1c7d97f
Issue #6095 : Make directory argument to os.listdir optional.
...
Patch by Virgil Dupras.
2010-07-23 12:16:41 +00:00
Ronald Oussoren
e186e384f4
Fix for issue 7895. Avoid crashing the interpreter
...
when calling platform.mac_ver after calling os.fork by
reading from a system configuration file instead of
using OSX APIs.
2010-07-23 11:54:59 +00:00
Brett Cannon
3a4e50cb7e
Document the fact that the 'test' package is meant only for use by Python
...
itself and not by others.
Closes issue 9255.
2010-07-23 11:31:31 +00:00
Alexander Belopolsky
3f8ecab589
Issue #9323 : Fixed a bug in trace.py that resulted in loosing the name
...
of the script being traced. Patch by Eli Bendersky.
2010-07-21 17:43:42 +00:00
Alexander Belopolsky
533a167a71
Issue #9282 : Fixed --listfuncs option of trace.py. Thanks Eli
...
Bendersky for the patch.
2010-07-20 19:55:18 +00:00
Gregory P. Smith
41e6c3df8b
Fixes Issue #3704 : http.cookiejar was not properly handling URLs with a / in
...
the parameters. (This is jjlee's issue3704.patch ported to py3k)
2010-07-19 23:17:22 +00:00
Mark Dickinson
1b3c262027
Clarify Misc/NEWS entry.
2010-07-18 08:03:10 +00:00
Mark Dickinson
e26660f9f2
Misc/NEWS entry for r82941.
2010-07-18 07:48:20 +00:00
Alexander Belopolsky
d92f04062a
Issue #5180 : Fixed a bug that prevented loading 2.x pickles in 3.x
...
python when they contain instances of old-style classes.
2010-07-17 22:50:45 +00:00
Benjamin Peterson
bbda0c5fbc
sharedinstall should depend on sharedmods #9280
2010-07-17 20:39:23 +00:00
Alexander Belopolsky
929d384058
Issue #9268 : Add annotation option to pickletools.dis
2010-07-17 15:51:21 +00:00
R. David Murray
45bf773f60
#1555570 : correctly handle a \r\n that is split by the read buffer.
...
Patch and test by Tony Nelson.
2010-07-17 01:19:57 +00:00
Antoine Pitrou
1f9dea0b5f
Issue #9251 : test_threaded_import didn't fail when run through regrtest
...
if the import lock was disabled.
2010-07-14 11:52:38 +00:00
Victor Stinner
e9ebde48cf
Issue #9243 : Fix sndhdr module and add unit tests, contributed by James Lee.
2010-07-13 23:04:56 +00:00
Benjamin Peterson
5ef96e5fac
allow byte literals
2010-07-11 23:06:06 +00:00
Mark Dickinson
b214e90e01
Issue #9137 : Fix issue in MutableMapping.update, which incorrectly
...
treated keyword arguments called 'self' or 'other' specially.
2010-07-11 18:53:06 +00:00
Martin v. Löwis
25fcd392aa
Issue #8974 : fix print calls in msgfmt.py.
2010-07-11 17:39:46 +00:00
Mark Dickinson
8e0c996873
Issue #9165 : Add math.isfinite and cmath.isfinite.
2010-07-11 17:38:24 +00:00
Antoine Pitrou
1ac745b5c5
Issue #7616 : Fix copying of overlapping memoryview slices with the Intel
...
compiler.
2010-07-11 12:12:00 +00:00
Georg Brandl
492f3fc272
Allow set literals in literal_eval().
2010-07-11 09:41:21 +00:00
Ronald Oussoren
d3950527e7
Fix for issue 9164
2010-07-11 09:05:07 +00:00
Jeffrey Yasskin
d4fcdb1ea8
Issue #9189 : Allow users to set $CFLAGS, $CPPFLAGS, and $LDFLAGS when running
...
configure to append to Python's default values for those variables, and
similarly allow users to set $XXFLAGS on the make command line to append to the
values set by configure.
In the makefile, this renames the variables that used to be $XXFLAGS to
$PY_XXFLAGS, and renames the old $PY_CFLAGS to $PY_CORE_CFLAGS. To compensate,
sysconfig now aliases $XXFLAGS=$PY_XXFLAGS so that scripts using it keep
working. I see that as the right interface, not a backward-compatibility hack,
since these are logically the $XXFLAGS variables; we just use a different name
in the makefile to deal with make's semantics.
2010-07-09 16:30:58 +00:00
R. David Murray
ea340a317a
7846: limit fnmatch pattern cache to _MAXCACHE=100 entries.
...
Patch by Andrew Clegg.
2010-07-09 12:23:21 +00:00
Brian Curtin
d40e6f70a5
Implement #1578269 . Patch by Jason R. Coombs.
...
Added Windows support for os.symlink when run on Windows 6.0 or greater,
aka Vista. Previous Windows versions will raise NotImplementedError
when trying to symlink.
Includes numerous test updates and additions to test_os, including
a symlink_support module because of the fact that privilege escalation
is required in order to run the tests to ensure that the user is able
to create symlinks. By default, accounts do not have the required
privilege, so the escalation code will have to be exposed later (or
documented on how to do so). I'll be following up with that work next.
Note that the tests use ctypes, which was agreed on during the PyCon
language summit.
2010-07-08 21:39:08 +00:00
Mark Dickinson
0dd8f7890a
Issue #9136 : Profiling Decimal gave 'dictionary changed size during iteration'.
...
Remove the use of locals() that caused this error.
2010-07-08 21:15:36 +00:00
Mark Dickinson
a123631a5c
Fix a performance issue in Decimal.pow. Thanks Stefan Krah for finding this.
2010-07-08 19:03:34 +00:00
Antoine Pitrou
f48ea7c2a9
Issue #8605 : Skip test_gdb if Python is compiled with optimizations.
2010-07-08 18:51:30 +00:00
Benjamin Peterson
ccabcd4bd4
make struct sequences subclass tuple; kill lots of code
...
This fixes #8413 .
2010-07-07 20:54:01 +00:00
Benjamin Peterson
a9800a8d5b
add NEWS
2010-07-07 19:04:48 +00:00
Mark Dickinson
be64d95169
Issue #9186 : log1p(-1.0) should raise ValueError, not OverflowError.
2010-07-07 16:21:29 +00:00
Alexander Belopolsky
a11d8c03a4
Issue #9000 : datetime.timezone objects now have eval-friendly repr.
2010-07-06 23:19:45 +00:00
Mark Dickinson
2cc8a5e490
Issue #9130 : Fix validation of relative imports in parser module.
2010-07-04 18:11:51 +00:00
Mark Dickinson
2bd61a988f
Issue #9128 : Fix validation of class decorators in parser module.
2010-07-04 16:37:31 +00:00
Alexander Belopolsky
60c762b77a
Issue #9094 : Make python -m pickletools disassemble pickles given in
...
the command line.
2010-07-03 20:35:53 +00:00
Senthil Kumaran
df022da3d8
Fix Issue5468 - urlencode to handle bytes and other alternate encodings.
...
(Extensive tests provided). Patch by Dan Mahn.
2010-07-03 17:48:22 +00:00
Victor Stinner
bc5c54bca2
Merged revisions 82492 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82492 | victor.stinner | 2010-07-03 15:36:19 +0200 (sam., 03 juil. 2010) | 3 lines
Issue #7673 : Fix security vulnerability (CVE-2010-2089) in the audioop module,
ensure that the input string length is a multiple of the frame size
........
2010-07-03 13:44:22 +00:00
Nick Coghlan
e2a89737c0
Issue 6507: missing patch submitter from NEWS entry in previous checkin
2010-07-03 07:38:28 +00:00
Nick Coghlan
5c8b54eb04
Issue 6507: accept source strings directly in dis.dis(). Original patch by Daniel Urban
2010-07-03 07:36:51 +00:00
Brett Cannon
8315fd12a5
Some people have mistaken Python bytecode as being stable and unchanging. In
...
reality it's simply an implementation detail for CPython. This point is now
clearly documented in both the docs for dis and the glossary.
Closes issue #7829 . Thanks to Terry Reedy for some initial suggestions on
wording.
2010-07-02 22:03:00 +00:00
Benjamin Peterson
f751bc9c01
fix lookup of __ceil__
2010-07-02 13:46:42 +00:00
Benjamin Peterson
8bb9cde6c0
correctly lookup __trunc__ and __floor__
2010-07-01 15:16:55 +00:00
Ezio Melotti
57221d02ba
Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.
...
1) #8271 : when a byte sequence is invalid, only the start byte and all the
valid continuation bytes are now replaced by U+FFFD, instead of replacing
the number of bytes specified by the start byte.
See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95);
2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes
in behavior);
3) Change the error messages "unexpected code byte" to "invalid start byte"
and "invalid data" to "invalid continuation byte";
4) Add an extensive set of tests in test_unicode;
5) Fix test_codeccallbacks because it was failing after this change.
2010-07-01 07:32:02 +00:00
Giampaolo Rodolà
610aa4f07f
Merged revisions 82404 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82404 | giampaolo.rodola | 2010-06-30 19:38:28 +0200 (mer, 30 giu 2010) | 1 line
fix issue #6589 : cleanup asyncore.socket_map if smtpd.SMTPServer constructor raises an exception
........
2010-06-30 17:47:39 +00:00
Michael Foord
b3a8984488
Issue 9110. Adding ContextDecorator to contextlib. This enables the creation of APIs that act as decorators as well as context managers. contextlib.contextmanager changed to use ContextDecorator.
2010-06-30 12:17:50 +00:00
Mark Dickinson
50b79a80bd
Issue #9011 : Tests for Python 3.2's treatment of negated imaginary literals.
2010-06-30 11:13:36 +00:00
Brett Cannon
f23e374441
Implement importlib.abc.SourceLoader and deprecate PyLoader and PyPycLoader.
...
SourceLoader is a simplification of both PyLoader and PyPycLoader. If one only
wants to use source, then they need to only implement get_data and
get_filename. To also use bytecode -- sourceless loading is not supported --
then two abstract methods -- path_mtime and set_data -- need to be implemented.
Compared to PyLoader and PyPycLoader, there are less abstract methods
introduced and bytecode files become an optimization controlled by the ABC and
hidden from the user (this need came about as PEP 3147 showed that not treating
bytecode as an optimization can cause problems for compatibility).
PyLoader is deprecated in favor of SourceLoader. To be compatible from Python
3.1 onwards, a subclass need only use simple methods for source_path and
is_package. Otherwise conditional subclassing based on whether Python 3.1 or
Python 3.2 is being is the only change. The documentation and docstring for
PyLoader explain what is exactly needed.
PyPycLoader is deprecated also in favor of SourceLoader. Because PEP 3147
shifted bytecode path details so much, there is no foolproof way to provide
backwards-compatibility with SourceLoader. Because of this the class is simply
deprecated and users should move to SourceLoader (and optionally PyLoader for
Python 3.1). This does lead to a loss of support for sourceless loading
unfortunately.
At some point before Python 3.2 is released, SourceLoader will be moved over to
importlib._bootstrap so that the core code of importlib relies on the new code
instead of the old PyPycLoader code. This commit is being done now so that
there is no issue in having the API in Python 3.1a1.
2010-06-27 23:57:46 +00:00