Commit Graph

6722 Commits

Author SHA1 Message Date
Gregory P. Smith fcdf04becc Fixes Issue #14331: Use significantly less stack space when importing modules by
allocating path buffers on the heap instead of the stack.
2012-03-18 16:07:10 -07:00
Benjamin Peterson dbc52f8a0d check for string attribute names in old-style classes (closes #14334) 2012-03-16 10:58:46 -05:00
Benjamin Peterson 6e7832b04c check to make sure the attribute is a string (#14334) 2012-03-16 09:32:59 -05:00
Senthil Kumaran 51a65c9161 2.7 - Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem 2012-03-16 01:07:16 -07:00
Senthil Kumaran 4c59211bd5 Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199 2012-03-15 13:24:40 -07:00
Benjamin Peterson f1acd0ab38 merge from 2.7 release branch 2012-03-15 13:01:04 -05:00
Benjamin Peterson ee933eccc9 bump to 2.7.3rc2 2012-03-15 12:25:54 -05:00
Matthias Klose 3cef2a931c - rename configure.in to configure.ac
- change references from configure.in to configure.ac
2012-03-14 23:39:33 +01:00
Gregory P. Smith d0e1a5b241 Fixes Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 15:28:10 -07:00
Gregory P. Smith c8ff46032f Fixes Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 15:28:10 -07:00
Martin v. Löwis f163efd736 Issue #5219: Prevent event handler cascade in IDLE.
Patch by Roger Serwy.
2012-03-13 14:46:22 -07:00
Ezio Melotti b56b6fff1f #14179: add tests for re.compile. Patch by Florian Mladitsch. 2012-03-13 01:25:40 +02:00
Ezio Melotti 11f8b6872a #14161: fix the __repr__ of file objects to escape the file name. 2012-03-12 01:17:02 +02:00
Antoine Pitrou f60845b70a Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under Windows when the child process has already exited. 2012-03-11 19:29:12 +01:00
Éric Araujo 021eddfff6 Fix long-standing bugs with MANIFEST.in parsing on Windows (#6884).
These regex changes fix a number of issues for distutils on Windows:
- #6884: impossible to include a file starting with 'build'
- #9691 and #14004: sdist includes too many files
- #13193: test_filelist failures

This commit replaces the incorrect changes done in 557a973709de,
c566a3447ba1 and 3925081a7ca0 to fix #13193; we were too eager to fix
the test failures and I did not study the code enough before
greenlighting patches.  This time we have unit tests from the problems
reported by users to be sure we have the right fix.

Thanks to Nadeem Vawda for his help.
2012-02-25 16:13:53 +01:00
Benjamin Peterson a2aa2ef313 bump to 2.7.3rc1 2012-02-23 10:52:17 -05:00
Nadeem Vawda f00011aff4 Issue #14053: Fix "make patchcheck" to work with MQ.
Patch by Francisco Martín Brugué
2012-02-22 11:40:09 +02:00
Georg Brandl 66e565ee48 merge with 2.6 2012-02-21 22:38:31 +01:00
Georg Brandl 3aec568e6e Remove reST markup from --help output. Also: O(n**2) is dict construction, not single insertion. 2012-02-21 22:36:27 +01:00
Martin v. Löwis a1b2af8034 Issue #6807: Run msisupport.mak earlier. 2012-02-21 18:12:02 +01:00
Martin v. Löwis ef281bdddb Issue #10580: Minor grammar change in Windows installer. 2012-02-21 17:07:32 +01:00
Petri Lehtinen 4ab701b2d3 sqlite3: Fix 64-bit integer handling in user functions on 32-bit architectures
Closes #8033.
2012-02-21 14:04:46 +02:00
Ezio Melotti 36b7361fe7 HTMLParser is now able to handle slashes in the start tag. 2012-02-21 09:22:16 +02:00
Benjamin Peterson aee9dfba4a merge 2.6 with hash randomization fix 2012-02-20 21:44:56 -05:00
Barry Warsaw 1e13eb084f - Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEED
environment variable, to provide an opt-in way to protect against denial of
  service attacks due to hash collisions within the dict and set types.  Patch
  by David Malcolm, based on work by Victor Stinner.
2012-02-20 20:42:21 -05:00
Ned Deily c5df563041 Issue #12627: Implement PEP 394 for OS X framework builds.
OS X framework builds already created versioned symlinks for all
executables and scripts installed in the framework bin directory,
of the general form ${cmd} - ${cmd}2.7.  The changes here add a
hierarchy of ${cmd} -> ${cmd}2 -> ${cmd}2.7.  Per previous
practice, all of the links are created in the framework bin
directory for both the install and altinstall targets.  This is
consistent with the long-standing recommendation to manage multiple
framework versions by adding and ordering framework bin directories
on $PATH.  Also, per past practice, symlinks to all framework bin
entries are created in $prefix/bin (by default, /usr/local/bin)
for the install target and only versioned links are created for
altinstall, although the use of these links is not recommended
for framework builds and their installation is optional with
the standard OS X installers.
2012-02-19 02:19:12 +01:00
Charles-François Natali e062466480 Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
2012-02-18 14:30:34 +01:00
Charles-François Natali 66f3cc6f8d Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
2012-02-18 14:15:38 +01:00
Petri Lehtinen 437b149b0c Fix a variable scoping error in an sqlite3 test
Initial patch by Torsten Landschoff.

Closes #11689.
2012-02-17 21:34:45 +02:00
Petri Lehtinen 002b202009 Fix errors in sqlite3's Cursor.rowcount documentation
Closes #13995.
2012-02-16 21:42:34 +02:00
Gregory P. Smith 14dc510395 news entry for previous commit 2012-02-16 00:44:50 -08:00
Antoine Pitrou dd7e071b23 Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert(). 2012-02-15 22:25:27 +01:00
Éric Araujo e897a7472d Fix parsing of build_ext --libraries option (#1326113) 2012-02-15 16:28:20 +01:00
Ezio Melotti 65d36dab4d #13987: HTMLParser is now able to handle malformed start tags. 2012-02-15 13:19:10 +02:00
Ezio Melotti d2307cb48a #13987: HTMLParser is now able to handle EOFs in the middle of a construct. 2012-02-15 12:44:23 +02:00
Antoine Pitrou c66ed457ef Issue #13020: Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.
2012-02-15 02:51:43 +01:00
Antoine Pitrou c39cd783fb Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
Patch by Suman Saha.
2012-02-15 02:42:46 +01:00
Meador Inge ff337ccd4b Issue #13979: Fix ctypes.util.find_library ldconfig regex 2012-02-13 22:22:06 -06:00
Ezio Melotti f117443cb8 #13993: HTMLParser is now able to handle broken end tags. 2012-02-13 16:28:54 +02:00
Ezio Melotti 4b92cc3f79 #13960: HTMLParser is now able to handle broken comments. 2012-02-13 16:10:44 +02:00
Gregory P. Smith 12426998ce Issue #13930: Adds ability for 2to3 to write its output to a different
directory tree instead of overwriting the input files.  Adds three command
line options: -o/--output-dir, -W/--write-unchanged-files and --add-suffix.

Feature backports into stable release branches for 2to3 are allowed by
a special exemption:
 http://mail.python.org/pipermail/python-dev/2011-December/115089.html
2012-02-12 15:51:21 -08:00
Petri Lehtinen 3c990e02c6 Add myself to Misc/ACKS 2012-02-12 21:11:38 +02:00
Petri Lehtinen 587209f089 Fix sqlite3.Connection.iterdump on tables/fields with reserved names or quotes
Closes #9750
2012-02-12 21:03:02 +02:00
Florent Xicluna c227965cbd Typo in Misc/NEWS. 2012-02-12 14:49:03 +01:00
Éric Araujo 6faad8de7f Fix distutils.filelist.FileList under Windows (#13193).
The code used to call os.path.join to build a regex but without escaping
the backslash, which lead to test failures on Windows.  Antoine Pitrou
fixed it in 557a973709de by enhancing the code to accept both / and \,
with proper escaping, but in my opinion this goes against the distutils
feature freeze, hence this change.
2012-02-12 04:41:36 +01:00
Ned Deily c47a459251 Issue #13994: Earler partial revert of Distutils enhancements in 2.7
has left two versions of customize_compiler, the original in
distutils.sysconfig and another copy in distutils.ccompiler, with some
parts of distutils calling one and others using the other.
Complete the revert back to only having one in distutils.sysconfig as
is the case in 3.x.
2012-02-11 20:40:24 +01:00
Ned Deily 0d0ea48709 Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
Distutils-based packages with C extension modules may fail because
Apple has removed gcc-4.2, the version used to build python.org
64-bit/32-bit Pythons.  If the user does not explicitly override
the default C compiler by setting the CC environment variable,
Distutils will now attempt to compile extension modules with clang
if gcc-4.2 is required but not found. Also as a convenience, if
the user does explicitly set CC, substitute its value as the default
compiler in the Distutils LDSHARED configuration variable for OS X.
(Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
SDK, neither of which are available in Xcode 4.  This change does not
attempt to override settings to support their use with Xcode 4.)
2012-02-10 12:59:06 +01:00
Senthil Kumaran 59e7c8f177 Issue #9021: Add an introduction to the copy module. Doc changes suggested by Terry Reedy. 2012-02-09 18:22:01 +08:00
Senthil Kumaran 607e31eddf Fix Issue #6005: Examples in the socket library documentation use sendall,
where relevant, instead send method. Patch contributed by Brian Brazil.
2012-02-09 17:43:31 +08:00
Petri Lehtinen c7fd523ac5 Issue #10811: Fix recursive usage of cursors. Instead of crashing, raise a ProgrammingError now. 2012-02-06 22:04:00 +02:00
Ned Deily 2c8bf04308 Issue #10881: Fix test_site failures with OS X framework builds. 2012-02-06 00:55:50 +01:00
Terry Jan Reedy adb87e2677 Issue 964437 Make IDLE help window non-modal.
Patch by Guilherme Polo and Roger Serwy.
2012-02-05 15:10:55 -05:00
Ned Deily 61c9534363 Issue #13933: IDLE auto-complete did not work with some imported
module, like hashlib.  (Patch by Roger Serwy)
2012-02-04 18:35:23 +01:00
Ned Deily fbc56fde26 Issue #13901: Prevent test_distutils failures on OS X with --enable-shared. 2012-02-03 02:39:49 +01:00
Petri Lehtinen fe6f9d0edc Document absoluteness of sys.executable
Closes #13402.
2012-02-02 21:26:05 +02:00
Petri Lehtinen 0518f470b1 sqlite3: Handle strings with embedded zeros correctly
Closes #13676.
2012-02-01 22:20:13 +02:00
Terry Jan Reedy b98000ab5b #13506 Add '' to path for interactive interpreter by adding with_cwd parameter
to PyShell.PyShell.transfer_path() and changing elsewhere as needed.
Original patches by Marco Scataglini and Roger Serwy.
2012-01-31 02:09:25 -05:00
Antoine Pitrou 88c51e8cb1 Issue #13806: The size check in audioop decompression functions was too strict and could reject valid compressed data.
Patch by Oleg Plakhotnyuk.
2012-01-28 22:01:59 +01:00
Antoine Pitrou 374b4ea9da Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC IV attack countermeasure. 2012-01-27 09:44:08 +01:00
Antoine Pitrou d358e0554b Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC IV attack countermeasure. 2012-01-27 09:42:45 +01:00
Brett Cannon 64b2b6a84d Issue #13883: Document all platforms PYTHONCASEOK works on. 2012-01-26 18:32:24 -05:00
Florent Xicluna a1f948bdec Issue #12501: merge the discordant NEWS entries. 2012-01-24 21:05:10 +01:00
Antoine Pitrou d1c818a9c0 Issue #11235: Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp. 2012-01-24 17:44:06 +01:00
Senthil Kumaran b05f91d155 NEWS entry for Issue6631 2012-01-21 11:45:12 +08:00
Meador Inge da747c3d97 Issue #2134: Clarify token.OP handling rationale in tokenize documentation. 2012-01-19 00:17:44 -06:00
Nadeem Vawda d7664dee0c Issue #13781: Fix GzipFile to work with os.fdopen()'d file objects. 2012-01-19 00:40:46 +02:00
Jesus Cea 4a8ba19783 Closes #13803: Under Solaris, distutils doesn't include bitness in the directory name 2012-01-18 03:51:38 +01:00
Antoine Pitrou 3b6a31412f Issue #13589: Fix some serialization primitives in the aifc module.
Patch by Oleg Plakhotnyuk.
2012-01-17 17:13:04 +01:00
Jesus Cea 23fbd8ccb1 Berkeley DB: Erratic behaviour of "DBEnv->rep_elect()" because a typo 2012-01-17 00:17:10 +01:00
Benjamin Peterson a84f468cf1 move notes for 2.7.4 to the right place 2012-03-07 19:17:57 -06:00
Benjamin Peterson a8d458560e allow cycles throught the __dict__ slot to be cleared (closes #1469629)
Patch from Armin, test from me.
2012-03-07 18:41:11 -06:00
Éric Araujo ec17afdfda Backout buggy patch for #13719 2012-03-07 21:00:44 +01:00
Éric Araujo dcd280480f Make distutils’ upload command work with bdist_msi products (#13719).
Patch by Ralf Schmitt.
2012-03-05 16:47:33 +01:00
Meador Inge 104f18977f Issue #14195: Make WeakSet.__lt__ and WeakSet.__gt__ irreflexive. 2012-03-04 22:02:17 -06:00
Petri Lehtinen a15a8d2a0c sqlite3: Port relevant documentation changes from 3.2
Initial patch by Johannes Vogel. Issue #13491.
2012-03-01 21:48:30 +02:00
Antoine Pitrou c56bca31e9 Issue #14159: Fix the len() of weak sets to return a better approximation when some objects are dead or dying.
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
2012-03-01 16:26:35 +01:00
Antoine Pitrou 6a1cd1b3b1 Issue #13521: dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
Patch by Filip Gruszczyński.
2012-02-27 00:45:12 +01:00
Éric Araujo 8d4d74eefc Update lingering references to ex-parrot. I mean ex-devguide. 2012-02-26 01:28:34 +01:00
Éric Araujo d673b62bac Stop ignoring RPMs in distutils' upload command (#2945).
Bug reported by Hartmut Goebel and patch contributed by Carl Robben.
Untested backport of the fix committed and tested for 3.2.
2012-02-26 01:16:47 +01:00
Éric Araujo e84e263a84 Add test file for scripts in Tools (#13447).
When people find bugs in scripts such as reindent.py, msgfmt.py or
pygettext.py, we have to try to reproduce the bug manually, apply a fix
and test manually again.  The alternative is to only read the code and
trust that it works.  This test file is a way to stop that
unsatisfactory state of things and write proper unit tests instead.
2012-02-25 16:24:59 +01:00
Éric Araujo 31378df83a Fix long-standing bugs with MANIFEST.in parsing on Windows (#6884).
These regex changes fix a number of issues for distutils on Windows:
- #6884: impossible to include a file starting with 'build'
- #9691 and #14004: sdist includes too many files
- #13193: test_filelist failures

This commit replaces the incorrect changes done in 557a973709de,
c566a3447ba1 and 3925081a7ca0 to fix #13193; we were too eager to fix
the test failures and I did not study the code enough before
greenlighting patches.  This time we have unit tests from the problems
reported by users to be sure we have the right fix.

Thanks to Nadeem Vawda for his help.
2012-02-25 16:13:53 +01:00
Amaury Forgeot d'Arc dee76e627d Issue #13774: json: Fix a SystemError when a bogus encoding is passed to
json.loads().
2012-01-13 22:53:25 +01:00
Antoine Pitrou 44765e58b0 Issue #13764: remove outdated script Misc/build.sh 2012-01-13 19:41:42 +01:00
Senthil Kumaran bcd833f30f - Issue #13642: Unquote before b64encoding user:password during Basic
Authentication. Patch contributed by Joonas Kuorilehto and Michele Orrù.
2012-01-11 00:09:24 +08:00
Antoine Pitrou d76088d972 Issue #13636: Weak ciphers are now disabled by default in the ssl module
(except when SSLv2 is explicitly asked for).
2012-01-03 22:46:48 +01:00
Charles-François Natali 3aa59e327c Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
2012-01-02 15:38:27 +01:00
Jason R. Coombs 042370e750 Issue #11638: Adding test to ensure .tar.gz files can be generated by sdist command with unicode metadata, based on David Barnett's patch.
Issue #11638: Added tests to capture failures in make_tarball with various unicode strings.
Following fix for Issue #13639, these tests now pass.
2011-12-26 10:15:15 -05:00
Senthil Kumaran 84c18aaa4c Update News entry. 2011-12-23 11:14:56 +08:00
Lars Gustäbel 7d4d074c99 Issue #13639: Accept unicode filenames in tarfile.open(mode="w|gz").
Passing a unicode filename to tarfile.open() along with mode "w|gz" failed
with a UnicodeError because the filename was not encoded properly before being
written to the gzipped stream in the FNAME extra field.
2011-12-21 19:27:50 +01:00
Antoine Pitrou b8572a1673 Issue #1785: Fix inspect and pydoc with misbehaving descriptors.
Also fixes issue #13581: `help(type)` wouldn't display anything.
2011-12-21 10:16:14 +01:00
Victor Stinner 99cff3f182 Issue #13628: python-gdb.py is now able to retrieve more frames in the Python
traceback if Python is optimized.

 * delay the lookup of the size_t type, it is not available at startup
 * The second argument of the PyFrameObjectPtr constructor is optional, as
   done in other constructors
 * iter_builtins() and iter_globals() methods of PyFrameObjectPtr returns
   an empty tuple instead of None if Python is optimized
 * Fix py-bt to handle correctly "optimized" frames
 * Frame.get_pyop() tries to get the frame pointer from PyEval_EvalCodeEx()
   if the pointer is optimized out in PyEval_EvalFrameEx()
2011-12-19 13:59:58 +01:00
Antoine Pitrou 7a3d8aee8c Issue #7502: Fix equality comparison for DocTestCase instances.
Patch by Cédric Krier.
2011-12-18 19:27:45 +01:00
Charles-François Natali 41616300b1 Issue #11870: threading: Properly reinitialize threads internal locks and
condition variables to avoid deadlocks in child processes.
2011-12-18 18:22:24 +01:00
Charles-François Natali f3d35f0efe Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
2011-12-18 15:52:48 +01:00
Antoine Pitrou c9e180043c Issue #13522: document error return values of some float and complex C API functions. 2011-12-18 01:25:27 +01:00
Antoine Pitrou 5b4b2da55d Fix the fix for issue #12149: it was incorrect, although it had the side
effect of appearing to resolve the issue.  Thanks to Mark Shannon for
noticing.
2011-12-15 14:15:31 +01:00
Ned Deily d8fdbad881 Issue #4625: add NEWS entry. 2011-12-14 15:05:42 -08:00
Raymond Hettinger f537702732 Issue #13573: The csv.writer now uses the repr() for floats rather than str(). 2011-12-11 22:31:09 -08:00
Amaury Forgeot d'Arc 4bf21e28df Issue #13546: Fixed an overflow issue that could crash the intepreter when
calling sys.setrecursionlimit((1<<31)-1).

2.7 only.
2011-12-07 21:46:48 +01:00
Lars Gustäbel 9a38863d8c Correctly detect bzip2 compressed streams with blocksizes other than 900k. 2011-12-06 13:07:09 +01:00