Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c4fe6f3

Browse files
committed
Merged revisions 65780,65782,65785,65809,65812,65834,65846,65859,65861 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r65780 | antoine.pitrou | 2008-08-17 15:15:07 -0500 (Sun, 17 Aug 2008) | 3 lines #3580: fix a failure in test_os ........ r65782 | benjamin.peterson | 2008-08-17 15:33:45 -0500 (Sun, 17 Aug 2008) | 1 line set svn:executable on a script ........ r65785 | amaury.forgeotdarc | 2008-08-17 16:05:18 -0500 (Sun, 17 Aug 2008) | 3 lines Fix a refleak in bytearray.split and bytearray.rsplit, detected by regrtest.py -R:: test_bytes ........ r65809 | nick.coghlan | 2008-08-18 07:42:46 -0500 (Mon, 18 Aug 2008) | 1 line Belated NEWS entry for r65642 ........ r65812 | nick.coghlan | 2008-08-18 08:32:19 -0500 (Mon, 18 Aug 2008) | 1 line Fix typo ........ r65834 | amaury.forgeotdarc | 2008-08-18 14:23:47 -0500 (Mon, 18 Aug 2008) | 4 lines #2234 distutils failed with mingw binutils 2.18.50.20080109. Be less strict when parsing these version numbers, they don't necessarily follow the python numbering scheme. ........ r65846 | georg.brandl | 2008-08-18 18:09:49 -0500 (Mon, 18 Aug 2008) | 2 lines Fix grammar. ........ r65859 | thomas.heller | 2008-08-19 12:47:13 -0500 (Tue, 19 Aug 2008) | 2 lines Fix strange character in the docstring. ........ r65861 | benjamin.peterson | 2008-08-19 12:59:23 -0500 (Tue, 19 Aug 2008) | 1 line get unparse to at least unparse its self ........
1 parent ee58fa4 commit c4fe6f3

8 files changed

Lines changed: 20 additions & 14 deletions

File tree

Demo/parser/unparse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _TryFinally(self, t):
186186
self.dispatch(t.finalbody)
187187
self.leave()
188188

189-
def _excepthandler(self, t):
189+
def _ExceptHandler(self, t):
190190
self.fill("except")
191191
if t.type:
192192
self.write(" ")
@@ -213,7 +213,7 @@ def _ClassDef(self, t):
213213

214214
def _FunctionDef(self, t):
215215
self.write("\n")
216-
for deco in t.decorators:
216+
for deco in t.decorator_list:
217217
self.fill("@")
218218
self.dispatch(deco)
219219
self.fill("def "+t.name + "(")

Doc/c-api/object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ is considered sufficient for this determination.
261261

262262
Set a TypeError indicating that ``type(o)`` is not hashable and return ``-1``.
263263
This function receives special treatment when stored in a ``tp_hash`` slot,
264-
allowing a type to explicit indicate to the interpreter that it is not
264+
allowing a type to explicitly indicate to the interpreter that it is not
265265
hashable.
266266

267267
.. versionadded:: 2.6

Doc/library/threading.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The :mod:`dummy_threading` module is provided for situations where
1414

1515
.. note::
1616

17-
Some name ``camelCase`` names have been converted to their underscored
17+
Some ``camelCase`` names have been converted to their underscored
1818
equivalents. Others have been replaced by properties. Using the old methods
1919
in 2.6 will trigger a :exc:`DeprecationWarning` when Python is run with the
2020
:option:`-3` flag and a full :exc:`DeprecationWarning` in 3.0. The old names

Lib/distutils/cygwinccompiler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def get_versions():
400400
""" Try to find out the versions of gcc, ld and dllwrap.
401401
If not possible it returns None for it.
402402
"""
403-
from distutils.version import StrictVersion
403+
from distutils.version import LooseVersion
404404
from distutils.spawn import find_executable
405405
import re
406406

@@ -411,7 +411,7 @@ def get_versions():
411411
out.close()
412412
result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII)
413413
if result:
414-
gcc_version = StrictVersion(result.group(1))
414+
gcc_version = LooseVersion(result.group(1))
415415
else:
416416
gcc_version = None
417417
else:
@@ -423,7 +423,7 @@ def get_versions():
423423
out.close()
424424
result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII)
425425
if result:
426-
ld_version = StrictVersion(result.group(1))
426+
ld_version = LooseVersion(result.group(1))
427427
else:
428428
ld_version = None
429429
else:
@@ -435,7 +435,7 @@ def get_versions():
435435
out.close()
436436
result = re.search(' (\d+\.\d+(\.\d+)*)', out_string, re.ASCII)
437437
if result:
438-
dllwrap_version = StrictVersion(result.group(1))
438+
dllwrap_version = LooseVersion(result.group(1))
439439
else:
440440
dllwrap_version = None
441441
else:

Lib/test/test_os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def test_1686475(self):
318318
try:
319319
os.stat(r"c:\pagefile.sys")
320320
except WindowsError as e:
321-
if e == 2: # file does not exist; cannot run test
321+
if e.errno == 2: # file does not exist; cannot run test
322322
return
323323
self.fail("Could not stat pagefile.sys")
324324

Modules/mmapmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ and returns a mmap object. If length is 0, the maximum length of the map\n\
913913
will be the current size of the file when mmap is called.\n\
914914
flags specifies the nature of the mapping. MAP_PRIVATE creates a\n\
915915
private copy-on-write mapping, so changes to the contents of the mmap\n\
916-
object will be private to this process, and MAP_SHARED`creates a mapping\n\
916+
object will be private to this process, and MAP_SHARED creates a mapping\n\
917917
that's shared with all other processes mapping the same areas of the file.\n\
918918
The default value is MAP_SHARED.\n\
919919
\n\

Objects/bytearrayobject.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,8 +2215,11 @@ bytes_split(PyByteArrayObject *self, PyObject *args)
22152215
PyBuffer_Release(&vsub);
22162216
return NULL;
22172217
}
2218-
if (n == 1)
2219-
return split_char(s, len, sub[0], maxsplit);
2218+
if (n == 1) {
2219+
list = split_char(s, len, sub[0], maxsplit);
2220+
PyBuffer_Release(&vsub);
2221+
return list;
2222+
}
22202223

22212224
list = PyList_New(PREALLOC_SIZE(maxsplit));
22222225
if (list == NULL) {
@@ -2447,8 +2450,11 @@ bytes_rsplit(PyByteArrayObject *self, PyObject *args)
24472450
PyBuffer_Release(&vsub);
24482451
return NULL;
24492452
}
2450-
else if (n == 1)
2451-
return rsplit_char(s, len, sub[0], maxsplit);
2453+
else if (n == 1) {
2454+
list = rsplit_char(s, len, sub[0], maxsplit);
2455+
PyBuffer_Release(&vsub);
2456+
return list;
2457+
}
24522458

24532459
list = PyList_New(PREALLOC_SIZE(maxsplit));
24542460
if (list == NULL) {

Tools/scripts/idle

100644100755
File mode changed.

0 commit comments

Comments
 (0)