Commit Graph

5348 Commits

Author SHA1 Message Date
Ned Deily d8b1723965 Issue #12590: IDLE editor window now always displays the first line
when opening a long file.  With Tk 8.5, the first line was hidden.
2011-07-26 18:16:08 -07:00
Ross Lagerwall 528c4adc0b Issue #12102: Document that buffered files must be flushed before being used
with mmap. Patch by Steffen Daode Nurpmeso.
2011-07-25 07:23:58 +02:00
Charles-François Natali 3de8c73d90 Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling. 2011-07-24 22:33:35 +02:00
Antoine Pitrou 4cfae027b3 Issue #1813: Fix codec lookup and setting/getting locales under Turkish locales. 2011-07-24 02:51:01 +02:00
Nadeem Vawda 0d2889f56c Fix typo in NEWS entry for dbf1e1a27427. 2011-07-23 16:13:01 +02:00
Nadeem Vawda b42c53e442 Issue #10883: Fix socket leaks in urllib.request.
* ftpwrapper now uses reference counting to ensure that the underlying socket
  is closed when the ftpwrapper object is no longer in use
* ftplib.FTP.ntransfercmd() now closes the socket if an error occurs

Initial patch by Victor Stinner.
2011-07-23 15:51:16 +02:00
Charles-François Natali 97781b0b64 Issue #12592: Make Python build on OpenBSD 5 (and future major releases). 2011-07-22 23:43:42 +02:00
Benjamin Peterson 6c18ff0808 news note 2011-07-22 10:41:44 -05:00
Charles-François Natali 4929eb911b Issue #12372: POSIX semaphores are broken on AIX: don't use them. 2011-07-21 19:41:04 +02:00
Barry Warsaw a4c383b8b3 Upstream merge. 2011-07-19 19:28:16 -04:00
Antoine Pitrou 495ee8f563 Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2 directory,
so that "import DLFCN" and other similar imports work on Linux 3.0.
2011-07-20 00:26:23 +02:00
Barry Warsaw c56432804a - Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
signature.  Without this, architectures where sizeof void* != sizeof int are
  broken.  Patch given by Hallvard B Furuseth.
2011-07-19 17:06:30 -04:00
R David Murray 9522595d70 #7484: no more <> around addresses in VRFY or EXPN
The RFC doesn't say that they are allowed; apparently many mailers accept
them, but not postfix.  Contributions to this patch were made by Felipe Cruz
and Catalin Iacob.
2011-07-18 21:34:04 -04:00
Antoine Pitrou 304f0f952d Issue #11603: Fix a crash when __str__ is rebound as __repr__.
Patch by Andreas Stührk.
2011-07-15 21:22:50 +02:00
Benjamin Peterson c3349cd22e port 8d05f697acd4 (#11627) 2011-07-15 14:15:40 -05:00
Charles-François Natali 2659140a5d Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. 2011-07-14 19:49:02 +02:00
Ned Deily 0ab67ee79e Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
as the processor type on some Mac systems.  Also fix NameError in fallback
_mac_ver_gestalt function.  And remove out-of-date URL in docs.
2011-07-13 15:05:31 -07:00
Victor Stinner bf547fd3f2 Close #4376: ctypes now supports nested structures in a endian different than
the parent structure. Patch by Vlad Riscutia.
2011-07-13 21:47:31 +02:00
Antoine Pitrou 1616645a00 Issue #12149: Update the method cache after a type's dictionnary gets
cleared by the garbage collector.  This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).

Diagnosis and patch by Davide Rizzo.
2011-07-12 22:04:20 +02:00
Antoine Pitrou 4a4a0fed07 Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
failure in name resolution.

Should fix a buildbot failure.
2011-07-09 02:34:05 +02:00
Antoine Pitrou 2960308c0c Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
Web site.
2011-07-08 19:40:15 +02:00
Antoine Pitrou a4d58d26a1 Avoid failing in test_urllibnet.test_bad_address when some overzealous
DNS service (e.g. OpenDNS) resolves a non-existent domain name.  The test
is now skipped instead.
2011-07-08 19:14:19 +02:00
Victor Stinner ba8b3a2ca7 Close #12501: Adjust callable() warning: callable() is only not supported in
Python 3.1. callable() is again supported in Python 3.2.
2011-07-08 02:07:45 +02:00
Victor Stinner e790131dc6 Issue #12493: subprocess: communicate() handles EINTR
subprocess.Popen.communicate() now also handles EINTR errors if the process has
only one pipe.
2011-07-05 14:08:01 +02:00
Victor Stinner 59729ff609 Issue #9611, #9015: FileIO.read(), FileIO.readinto(), FileIO.write() and
os.write() clamp the length to INT_MAX on Windows.
2011-07-05 11:28:19 +02:00
Ned Deily 46268c49f6 Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run
test_tk or test_ttk_guionly under a username that is not currently logged
in to the console windowserver (as may be the case under buildbot or ssh).
2011-07-03 21:52:35 -07:00
Victor Stinner 65c153547b Issue #12467: warnings: fix a race condition if a warning is emitted at
shutdown, if globals()['__file__'] is None.
2011-07-04 03:05:37 +02:00
Charles-François Natali 414d0faedc Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
the garbage collector while the Heap lock is held.
2011-07-02 13:56:19 +02:00
Raymond Hettinger bf7a266074 Fixup repr for dict_proxy objects. 2011-06-30 00:44:36 +01:00
Ned Deily 87e82bb0e3 Issue #9516: Update Misc/NEWS. 2011-06-28 19:52:59 -07:00
Ned Deily 63144c6444 Issue #12141: Install a copy of template C module file so that
test_build_ext of test_distutils is no longer silently skipped when
run outside of a build directory.
2011-06-28 00:39:19 -07:00
Ned Deily 43e1054e38 Issue #8746: Correct faulty configure checks so that os.chflags() and
os.lchflags() are once again built on systems that support these
functions (*BSD and OS X).  Also add new stat file flags for OS X
(UF_HIDDEN and UF_COMPRESSED).  Also add additional tests for
os.chflags() and os.lchflags(). (Tests by Garrett Cooper)
2011-06-27 23:41:53 -07:00
Ned Deily 64e59959f2 Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
on Mac OS X.  (Patch by Ronald Oussoren)
2011-06-27 23:09:31 -07:00
Raymond Hettinger 2c316a3e29 Issue 11802: filecmp cache was growing without bound. 2011-06-25 17:14:53 +02:00
Ross Lagerwall ffa8e2fb56 Issue 12404: Remove C89 incompatible code from mmap module.
Patch by Akira Kitada.
2011-06-25 09:55:10 +02:00
Victor Stinner ecb863b29e Revert d370d609d09b as requested by Terry Jan Reedy:
"#3067: locale.setlocale() accepts a Unicode locale."
2011-06-20 22:07:06 +02:00
Victor Stinner c36c6ccb41 Close #3067: locale.setlocale() accepts a Unicode locale. 2011-06-20 16:14:48 +02:00
R David Murray f1138bb1b6 #11700: proxy object close methods can now be called multiple times
This makes them work like the close provided by regular file objects.  This
patch also backports the close-the-underlying-file code for _ProxyFile objects
that was introduced along with context manager support in the 3.x branch.
2011-06-17 22:23:04 -04:00
Victor Stinner c74a6ba2d6 Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
connection if its getresponse() method fails with a socket error. Patch written
by Ezio Melotti.
2011-06-17 14:06:27 +02:00
Benjamin Peterson 0eb4ac4c62 allow "fake" filenames in findsource (closes #9284)
This allows findsource() to work in doctests.

A patch from Dirkjan Ochtman.
2011-06-11 15:53:11 -05:00
Benjamin Peterson a573e0df36 merge 2.7.2 release branch 2011-06-11 09:51:21 -05:00
Benjamin Peterson 9843ba5e54 bump to 2.7.2 final 2011-06-11 09:42:44 -05:00
Benjamin Peterson b30d5c711e merge heads 2011-06-10 11:33:58 -05:00
Benjamin Peterson 8b8162d868 merge 2.7.2 release branch with fix for #12009 2011-06-10 11:33:41 -05:00
Benjamin Peterson 43ee1a5d90 fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
R David Murray 873c583244 #10694: zipfile now ignores garbage at the end of a zipfile.
Original fix by 'rep', final patch (with tests) by Xuanji Li.
2011-06-09 16:01:09 -04:00
Brian Curtin caea7e8d23 Merge 2011-06-08 19:29:53 -05:00
Mark Dickinson a493ca3fae Issue #12080: Fix a performance issue in Decimal._power_exact that caused some corner-case Decimal.__pow__ calls to take an unreasonably long time. 2011-06-04 18:24:15 +01:00
Benjamin Peterson d571cf5ab0 merge 2.7.2 release branch 2011-06-03 16:17:48 -05:00
Benjamin Peterson ef1122cbd6 another benefit of this change 2011-06-03 16:17:22 -05:00
Raymond Hettinger 45b082935d Fix named tuples to work with vars(). 2011-06-02 20:40:35 -07:00
Raymond Hettinger 19b851d11b sys.checkinterval() now refreshes the current countdown ticker. 2011-06-01 18:21:42 -07:00
Benjamin Peterson 35a9b1ca13 merge 2.7.2 release branch 2011-05-31 19:01:23 -05:00
Benjamin Peterson 4ba009d8dc simply use the Python version for pyexpat.__version__ #12221 2011-05-31 18:59:49 -05:00
Benjamin Peterson f14e42077c add 2.7.2 header 2011-05-31 18:44:55 -05:00
Victor Stinner 776e69b5b3 Close #12085: Fix an attribute error in subprocess.Popen destructor if the
constructor has failed, e.g. because of an undeclared keyword argument. Patch
written by Oleg Oshmyan.
2011-06-01 01:03:00 +02:00
Victor Stinner d9f5292443 Issue #12057: Add tests for ISO 2022 codecs
iso2022_jp, iso2022_jp_2 and iso2022_kr
2011-05-30 23:58:21 +02:00
Victor Stinner d3c7e17a16 Issue #1195: fix the issue number of the NEWS entry 2011-05-30 23:49:13 +02:00
Victor Stinner 08563d904d Issue #12016: my_fgets() now always clears errors before calling fgets(). Fix
the following case: sys.stdin.read() stopped with CTRL+d (end of file),
raw_input() interrupted by CTRL+c.
2011-05-30 23:44:13 +02:00
Benjamin Peterson cd20705902 bump to 2.7.2rc1 2011-05-29 16:50:27 -05:00
Ned Deily c4f97f4fdc Issue #12205: Fix test_subprocess failure due to uninstalled test data. 2011-05-29 02:36:17 -07:00
Ned Deily 22f63b50e3 Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
ensure "make install" creates symlinks in --prefix bin for the "-32"
files in the framework bin directory like the installer does.
2011-05-28 05:56:14 -07:00
Ned Deily 482f908410 Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:11:54 -07:00
Benjamin Peterson 4fa68ab10b raise an ValueError in getvalue() on closed StringIO (closes #12161)
Thanks for Catalin Iacob for the patch.
2011-05-26 09:56:41 -05:00
Victor Stinner dbfba1667c Close #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true)
division (python -Qnew). Patch written by Ralf W. Grosse-Kunstleve.
2011-05-26 13:37:25 +02:00
Victor Stinner daf17e9bc8 Issue #12175: RawIOBase.readall() now returns None if read() returns None. 2011-05-25 22:52:37 +02:00
Victor Stinner 5100a405dc Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError if
the file is closed.
2011-05-25 22:15:36 +02:00
Charles-François Natali b94e0cde60 Issue #1441530: In imaplib, use makefile() to wrap the SSL socket to avoid
heap fragmentation and MemoryError with some malloc implementations.
2011-05-24 23:10:54 +02:00
Victor Stinner 40b41e1ffd Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
their encode() method anymore, but continue to call the reset() method if the
final argument is True.
2011-05-24 22:29:13 +02:00
Benjamin Peterson 8de87a6403 correctly lookup __dir__ 2011-05-23 16:11:05 -05:00
Victor Stinner f58f1c33c1 Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
to be able to unload the module.
2011-05-21 02:13:22 +02:00
Benjamin Peterson d021f72abf merge heads 2011-05-17 18:32:26 -05:00
Benjamin Peterson 6116d4a1d1 stop using the old brain-dead interface for providing attributes/methods
This closes #12099.
2011-05-17 18:31:20 -05:00
Ronald Oussoren b13cacf677 (backport) Fixes #11088: IDLE crashes when using F5 to run a script on OSX with Tk 8.5
Without this patch IDLE will crash reliably on OSX when Tkinter
is linked to TkCocoa 8.5.x.

To reproduce:

* Create a new file (script.py) with the following two lines:

x = raw_input('prompt: ')
print x

* Save the script

* Run the script using the F5 keyboard shortcut
  (running from the menu works fine)

The patch is a fairly crude hack, but we haven't found a better
workaround for this Tk bug yet.
2011-05-17 15:13:46 +02:00
Ronald Oussoren 372954e059 (backport)Fix #10154 and #10090: locale normalizes the UTF-8 encoding to "UTF-8" instead of "UTF8"
On MacOSX and OpenBSD (and possibly other BSDs) "en_US.UTF-8" is a valid locale
while "en_US.UTF8" is not. As the former works on Linux as well it is better
to normalize to that value.
2011-05-17 13:22:30 +02:00
Ronald Oussoren 53b6a5f79c NEWS entry for fix of issue #9516 2011-05-15 16:51:10 +02:00
Nadeem Vawda 0cc4fd9df7 Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
attribute when called without a max_length argument.
2011-05-14 14:29:07 +02:00
Ezio Melotti e3992eb743 #5723: Improve json tests to be executed with and without accelerations. 2011-05-14 06:24:53 +03:00
Antoine Pitrou ee46a7bf9c Issue #12062: In the `io` module, fix a flushing bug when doing a certain
type of I/O sequence on a file opened in read+write mode (namely: reading,
seeking a bit forward, writing, then seeking before the previous write but
still within buffered data, and writing again).
2011-05-13 00:31:52 +02:00
Ezio Melotti c1ec7b5d44 #12051: Fix segfault in json.dumps() while encoding highly-nested objects using the C accelerations. 2011-05-11 00:55:35 +03:00
Antoine Pitrou 47d1d0dc30 Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in
order to accept exactly one connection.  Patch by Daniel Evers.
2011-05-10 19:16:03 +02:00
Victor Stinner b1241f9619 (Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional
OpenSSL is now compiled with OPENSSL_NO_SSL2 defined (without the SSLv2
protocol) on Debian: fix the ssl module on Debian Testing and Debian Sid.

Optimize also ssl.get_protocol_name(): speed does matter!
2011-05-10 01:52:03 +02:00
Victor Stinner 2c585f607e (Merge 3.1) Issue #1195: Fix input() if it is interrupted by CTRL+d and then
CTRL+c, clear the end-of-file indicator after CTRL+d.
2011-05-10 00:22:59 +02:00
Martin v. Löwis 591c2dfa42 Issue 11164: Remove obsolete allnodes test from minidom test.
Patch by Arfrever Frehtes Taifersar Arahesis.
2011-05-09 08:19:13 +02:00
Ezio Melotti 5c5d7e2511 #11910: Fix test_heapq to skip the C tests when _heapq is missing. 2011-05-09 06:54:53 +03:00
Antoine Pitrou 21ce8f0d66 Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch by Kasun Herath. 2011-05-07 19:59:33 +02:00
Ezio Melotti 0639be6505 #10169: Fix argument parsing in socket.sendto() to avoid error masking. 2011-05-07 19:21:22 +03:00
Ezio Melotti cec464951e #12017: Fix segfault in json.loads() while decoding highly-nested objects using the C accelerations. 2011-05-07 17:40:23 +03:00
R David Murray 8b26c4b8ea #11999: sync based on comparing mtimes, not mtime to system clock 2011-05-06 21:56:22 -04:00
Ronald Oussoren 58d6b1b7a4 Backport fix for issue #10684 from 3.x 2011-05-06 11:31:33 +02:00
Ezio Melotti df8a8f768d #11982: fix json.loads('""') to return u'' rather than ''. 2011-05-04 14:40:53 +03:00
Victor Stinner 0a92d1849e Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file
doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int (length
bigger than 2^31-1 bytes).
2011-05-03 15:09:24 +02:00
Victor Stinner 645b9f67ae Issue #8651: Fix "z#" format of PyArg_Parse*() function: the size was not
written if PY_SSIZE_T_CLEAN is defined.
2011-05-03 15:06:11 +02:00
Victor Stinner 112d48ac17 (Merge 3.1) Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X
to get around a mmap bug with sparse files. Patch written by Steffen Daode
Nurpmeso.
2011-05-03 14:36:36 +02:00
Victor Stinner 97cf585f4b (Merge 3.1) Issue #9756: credit the author, Andreas Stührk (Trundle) 2011-05-01 23:51:11 +02:00
Victor Stinner e363ec1057 (Merge 3.1) Issue #9756: When calling a method descriptor or a slot wrapper
descriptor, the check of the object type doesn't read the __class__ attribute
anymore.  Fix a crash if a class override its __class__ attribute (e.g. a proxy
of the str type).
2011-05-01 23:43:37 +02:00
Senthil Kumaran 011525ee92 Fix closes issue10761: tarfile.extractall failure when symlinked files are present. 2011-04-28 15:30:31 +08:00
Antoine Pitrou 1f9eb155b4 Move NEWS entry to the right section. 2011-04-27 19:26:06 +02:00
Antoine Pitrou 4394e0db24 Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_*
APIs, to avoid a crash with the pthread implementation in RHEL 5.  Patch
by Charles-François Natali.
2011-04-27 19:20:48 +02:00
Ezio Melotti 34b32d62f8 #11763: don't use difflib in TestCase.assertMultiLineEqual if the strings are too long. 2011-04-27 09:45:46 +03:00