Ned Deily [Mon, 15 Aug 2016 07:04:36 +0000 (03:04 -0400)]
Issue #10910: Update FreedBSD version checks for the ctype UTF-8 workaround.
The original problem has been fixed in newer versions of FreeBSD.
Patch by Dimitry Andric of the FreeBSD project.
Terry Jan Reedy [Wed, 10 Aug 2016 23:41:39 +0000 (19:41 -0400)]
Issue #27714: For IDLE's test_textview, backport 3.x subclass with mocks
instead of overriding methods with mocks in original class and module.
This makes the 2.7 test_textview nearly identical to the 3.5/.6 test.
Martin Panter [Thu, 28 Jul 2016 01:28:27 +0000 (01:28 +0000)]
Issue #27490: Do not build pgen when cross-compiling
The dependendency on the $(PGEN) variable must only be
set when not cross-compiling. When cross-compiling,
$(PGEN) will not be used, so no need to build it.
Victor Stinner [Wed, 27 Jul 2016 14:58:47 +0000 (16:58 +0200)]
ctypes: fix CThunkObject_new()
* Initialize restype and flags fields to fix a crash when Python runs on a
read-only file system
* Use Py_ssize_t type rather than int for the "i" iterator variable
* Reorder assignements to be able to more easily check if all fields are
initialized
Issue #11048. Initial patch written by Marcin Bachry.
Martin Panter [Mon, 2 Nov 2015 03:37:02 +0000 (03:37 +0000)]
Issue #25523: Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
to fix the grammar.
Issue #23908: os functions, open() and the io.FileIO constructor now reject
unicode paths with embedded null character on Windows instead of silently
truncate them.
Martin Panter [Tue, 21 Jun 2016 23:58:05 +0000 (23:58 +0000)]
Issue #22463: Backport compiler warning fixes and workarounds
* Set but unused variable in Parser/pgen.c in non-debug builds. Patch by
Christian Heimes.
* Unused static function in Modules/readline.c. Patch by Georg Brandl.
* main_window unused in Modules/tkappinit.c. Patch by Gregory P. Smith.
* Dead assignment in Modules/_ctypes/cfield.c. Extracted from patch by Brett
Cannon.
* Expression result unused in PyObject_INIT macro expansions. Based on
patches by Christian Heimes.
* Load expat_config.h and therefore pyconfig.h before C stdlib headers are
loaded. This silences pre-processor warnings including '_POSIX_C_SOURCE
redefined'. Extracted from patch by Christian Heimes.
Terry Jan Reedy [Sat, 11 Jun 2016 06:06:18 +0000 (02:06 -0400)]
Issue #5124: Paste with selection should always replace.
This is how paste work on Windows, Mac, modern Linux apps, and ttk widgets.
The exception was X11 tk widgets. Original patch by Serhiy Storchake.
Martin Panter [Fri, 3 Jun 2016 05:59:20 +0000 (05:59 +0000)]
Issue #20699: Document that “io” methods should accept memoryview
This matches the usage by BufferedReader, BufferedWriter, etc. Also document
and test that the write() methods should only access their argument before
they return.
Victor Stinner [Thu, 16 Oct 2014 07:42:45 +0000 (09:42 +0200)]
Issue #22636: Avoid using a shell in the ctypes.util module
Replace os.popen() with subprocess.Popen.
If the "gcc", "cc" or "objdump" command is not available, the code was
supposed to raise an OSError exception. But there was a bug in the code. The
shell code returns the exit code 10 if the required command is missing, and the
code tries to check for the status 10. The problem is that os.popen() doesn't
return the exit code directly, but a status which should be processed by
os.WIFEXITED() and os.WEXITSTATUS(). In practice, the exception was never
raised. The OSError exception was not documented and ctypes.util.find_library()
is expected to return None if the library is not found.
Terry Jan Reedy [Tue, 14 Jun 2016 04:53:18 +0000 (00:53 -0400)]
Issue #27245: IDLE: Cleanly delete custom themes and key bindings.
Previously, when IDLE was started from a console or by import, a cascade
of warnings was emitted. Patch by Serhiy Storchaka.