Victor Stinner
b4ba986a71
Issue #9402 : pyexpat uses Py_DECREF() instead of PyObject_DEL()
...
Fix a crash if Python is compiled in pydebug mode.
2010-09-10 22:25:19 +00:00
Victor Stinner
3d75d0cc92
Issue #8603 : Environ.data is now protected -> Environ._data
...
os.environ.data was a str dict in Python 3.1. In Python 3.2 on UNIX/BSD,
os.environ.data is now a bytes dict: mark it as protected to avoid confusion.
2010-09-10 22:18:16 +00:00
Benjamin Peterson
00ebe2cdc4
use DISPATCH() instead of continue
2010-09-10 22:02:31 +00:00
Benjamin Peterson
d032532bb9
add newline
2010-09-10 21:59:21 +00:00
Victor Stinner
5b519e0201
Issue #9632 : Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
...
environment variable to set the filesystem encoding at Python startup.
sys.setfilesystemencoding() creates inconsistencies because it is unable to
reencode all filenames in all objects.
2010-09-10 21:57:59 +00:00
Benjamin Peterson
6246d6dcb0
bump magic number for DELETE_DEREF
2010-09-10 21:51:44 +00:00
Amaury Forgeot d'Arc
ba117ef7e9
#4617 : Previously it was illegal to delete a name from the local
...
namespace if it occurs as a free variable in a nested block. This limitation
of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
This sample was valid in 2.6, but fails to compile in 3.x without this change::
>>> def f():
... def print_error():
... print(e)
... try:
... something
... except Exception as e:
... print_error()
... # implicit "del e" here
This sample has always been invalid in Python, and now works::
>>> def outer(x):
... def inner():
... return x
... inner()
... del x
There is no need to bump the PYC magic number: the new opcode is used
for code that did not compile before.
2010-09-10 21:39:53 +00:00
Georg Brandl
4785916d62
release() is probably not the most important method
2010-09-10 20:43:53 +00:00
Amaury Forgeot d'Arc
fe7b40533c
The "if 1": trick seems cleaner that the one with regular expressions.
...
Use it here again.
2010-09-10 19:47:43 +00:00
Antoine Pitrou
8e6b407d6f
Issue #941346 : Improve the build process under AIX and allow Python to
...
be built as a shared library. Patch by Sébastien Sablé.
2010-09-10 19:44:44 +00:00
Amaury Forgeot d'Arc
dfa9b294fa
Use the "if 1:" prefix so that quoted code appears nicely
...
nested inside the test suite.
def test_me():
exec("""if 1:
...code...
""")
No other change here.
2010-09-10 19:40:52 +00:00
Benjamin Peterson
4f5e298075
add reference to file object
2010-09-10 18:50:38 +00:00
Antoine Pitrou
a4e4ae27fc
Followup to #4026 : better patch for flock detection.
2010-09-10 18:39:00 +00:00
Amaury Forgeot d'Arc
66d00ad2ea
Untabify file.
2010-09-10 18:11:45 +00:00
Nick Coghlan
e8814fbb32
As per python-dev discussion with Eli, properly document and publish dis.show_code
2010-09-10 14:08:04 +00:00
Nick Coghlan
c02adca999
Leave show_code out of __all__ and make it clear that its lack of documentation is deliberate
2010-09-10 12:32:58 +00:00
Nick Coghlan
7646f7ef4a
Fix dis.__all__ for new additions to module in 3.2(spotted by Eli Bendersky)
2010-09-10 12:24:24 +00:00
Victor Stinner
8ce7df67de
Issue #9819 : fix TESTFN_UNENCODABLE for japanese code page
2010-09-10 11:19:59 +00:00
Vinay Sajip
2314fc729b
logging: Added threading interlock in basicConfig().
2010-09-10 08:25:13 +00:00
Daniel Stutzbach
c7937791a1
Fix Issue #9752 : MSVC compiler warning due to undefined function
...
(Patch by Jon Anglin)
2010-09-09 21:18:04 +00:00
Daniel Stutzbach
460ff3dd1c
Skip socket tests that require the network, if the network resource is not enabled
2010-09-09 21:17:58 +00:00
Antoine Pitrou
4c7c421944
Remove workaround
2010-09-09 20:40:28 +00:00
Antoine Pitrou
e4a189274f
Issue #9804 : ascii() now always represents unicode surrogate pairs as
...
a single `\UXXXXXXXX`, regardless of whether the character is printable
or not. Also, the "backslashreplace" error handler now joins surrogate
pairs into a single character on UCS-2 builds.
2010-09-09 20:30:23 +00:00
Antoine Pitrou
ea99c5c949
Issue #9410 : Various optimizations to the pickle module, leading to
...
speedups up to 4x (depending on the benchmark). Mostly ported from
Unladen Swallow; initial patch by Alexandre Vassalotti.
2010-09-09 18:33:21 +00:00
Antoine Pitrou
350c7229be
Use transient_internet() where appropriate in test_ssl
...
(svn.python.org is sometimes unavailable)
2010-09-09 13:31:46 +00:00
Antoine Pitrou
6e6cc830c4
Issue #9757 : memoryview objects get a release() method to release the
...
underlying buffer (previously this was only done when deallocating the
memoryview), and gain support for the context management protocol.
2010-09-09 12:59:39 +00:00
Raymond Hettinger
bad3c88094
Have pprint() respect the order in an OrderedDict.
2010-09-09 12:31:00 +00:00
Raymond Hettinger
a0e79408bc
A little bit more readable repr method.
2010-09-09 08:29:05 +00:00
Raymond Hettinger
3fb79c747b
Experiment: Let collections.namedtuple() do the work. This should work now that _collections is pre-built. The buildbots will tell us shortly.
2010-09-09 07:15:18 +00:00
Hirokazu Yamamoto
3cfe2e3677
PCBuild cosmetic fixes.
...
* pythoncore.vcproj: Fixed indentation
* _multiprocessing.vcproj: Converted ProjectGUID to uppercase. Otherwise,
VS8 _multiprocessing.vcproj created by vs9to8.py was modified every time
loads it in VS8 IDE.
2010-09-09 06:24:43 +00:00
Hirokazu Yamamoto
d72461a7ed
Updated VS7.1 project file. (I cannot test this file because I don't have VS7.1)
2010-09-09 06:14:23 +00:00
Hirokazu Yamamoto
50e7cdb6b6
Updated VC6 files.
...
* pythoncore.dsp: updated project file
* readme.txt: removed dead link
* tcl852.patch: fixed patch. it was doubled.
2010-09-09 06:08:36 +00:00
Raymond Hettinger
6c60d099e5
Improve the repr for the TokenInfo named tuple.
2010-09-09 04:32:39 +00:00
Raymond Hettinger
44d7b6ad60
Add docstring to cmd.Cmd.do_help()
2010-09-09 03:53:22 +00:00
Raymond Hettinger
bd889e8c40
Add a working example for the cmd module.
2010-09-09 01:40:50 +00:00
Giampaolo Rodolà
b383dbb45e
Fix issue 9794: adds context manager protocol to socket.socket so that socket.create_connection() can be used with the 'with' statement.
2010-09-08 22:44:12 +00:00
Antoine Pitrou
7c9cf01238
gdb: fix representation of non-printable surrogate pairs, and workaround
...
a bug in ascii().
2010-09-08 21:57:37 +00:00
Antoine Pitrou
b1856d7fa7
Add a safety limit to the number of unicode characters we fetch
...
(followup to r84635, suggested by Dave Malcolm).
2010-09-08 21:07:40 +00:00
Antoine Pitrou
b41e128fe1
Issue #9188 : The gdb extension now handles correctly narrow (UCS2) as well
...
as wide (UCS4) unicode builds for both the host interpreter (embedded
inside gdb) and the interpreter under test.
2010-09-08 20:57:48 +00:00
Raymond Hettinger
63b17671f0
Improve variable name (don't shadow a builtin).
2010-09-08 19:27:59 +00:00
Raymond Hettinger
8ff1099684
One more conversion from pow() to **.
2010-09-08 18:58:33 +00:00
Raymond Hettinger
183cd1fae3
* Remove dependency on binascii.hexlify by using int.from_bytes().
...
* Use the new super() with no arguments.
* Replace pow() call with the ** operator.
* Increase urandom seeding from 16 bytes to 32 bytes.
* Clean-up docstring.
2010-09-08 18:48:21 +00:00
Matthias Klose
f69af1e959
PEP 3149: Try to load the extension with the SOABI before trying
...
to load the one without the SOABI in the name.
2010-09-08 16:22:10 +00:00
Senthil Kumaran
9a9dd1c140
Revert the doc change done in r83880. str.replace with negative count value is not a feature.
2010-09-08 12:50:29 +00:00
Antoine Pitrou
079ce54efe
Issue #9797 : pystate.c wrongly assumed that zero couldn't be a valid
...
thread-local storage key.
2010-09-08 12:37:10 +00:00
Vinay Sajip
121a1c4e11
logging: Added QueueHandler.
2010-09-08 10:46:15 +00:00
Georg Brandl
febeb00e41
Add Lukasz.
2010-09-08 10:43:45 +00:00
Raymond Hettinger
e4a3e99973
In the case where only a user supplied random() method is available,
...
adopt a strategy that makes the fewest calls to random().
2010-09-08 00:30:28 +00:00
Éric Araujo
51e01a6f7a
Follow-up to #9199 : Fix str.join use, add newlines.
...
Thanks to Konrad Delong for writing a test for upload_docs
--show-response in distutils2, letting me catch my mistake.
2010-09-08 00:00:45 +00:00
Éric Araujo
480504b150
Fix incorrect use of Command.announce ( #9199 )
2010-09-07 23:08:57 +00:00