[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0794bbfceec6 by Martin Panter in branch '3.5':
Issue #16182: Attempted workarounds for Apple Editline
https://hg.python.org/cpython/rev/0794bbfceec6

New changeset a1ca9c0ebc05 by Martin Panter in branch 'default':
Issue #16182: Merge test_readline from 3.5
https://hg.python.org/cpython/rev/a1ca9c0ebc05

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-06-13 Thread Martin Panter

Martin Panter added the comment:

Failures from AMD64 Snow Leop buildbots:

==
FAIL: test_nonascii_history (test.test_readline.TestHistoryManipulation)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.5.murray-snowleopard/build/Lib/test/test_readline.py",
 line 102, in test_nonascii_history
self.assertEqual(readline.get_history_item(1), "entrée 1")
AssertionError: None != 'entrée 1'

==
FAIL: test_nonascii (test.test_readline.TestReadline)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.5.murray-snowleopard/build/Lib/test/test_readline.py",
 line 174, in test_nonascii
self.assertIn(b"line '[\\xefnserted]|t\\xeb[after]'\r\n", output)
AssertionError: b"line '[\\xefnserted]|t\\xeb[after]'\r\n" not found in 
bytearray(b"^A^B^B^B^B^B^B^B\t\tx\t\r\n|t\xc3\xab[after]\x08\x08\x08\x08\x08\x08\x08text
 \'t\\xeb\'\r\nline \'|t\\xeb[after]\'\r\nindexes 1 3\r\n\x07text 
\'t\\xeb\'\r\nline \'|t\\xeb[after]\'\r\nindexes 1 3\r\n\r\nt\xc3\xabxt  
t\xc3\xabnt  
\r\n\r\r\n|t\xc3\xab[after]\r|t\xc3\xabx[after]\r|t\xc3\xabxt[after]\r|t\xc3\xabxt\r\nresult
 \'|t\\xebxt[after]\'\r\nhistory \'|t\\xebxt[after]\'\r\n")

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27245] IDLE: Fix deletion of custom themes and key bindings

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Patch amounts to putting 3 lines of apply inline and moving the first up to 
where is it needed.  Serhiy, thanks for discovering the simple fix.  It worked 
for me so I pushed it.  I backported because the cascade of error messages is 
nasty when visible and because the forward merge was easy enough now that I 
know about the case clash problem.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2016-06-13 Thread Ned Deily

Ned Deily added the comment:

For example, the tests pass in 3.5.1 but fail in 3.5.2rc1.  I see that the 
changesets associated with Issue26177 altered them.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27245] IDLE: Fix deletion of custom themes and key bindings

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ac9e7466d8b by Terry Jan Reedy in branch 'default':
Issue #27245: revert temporary rename
https://hg.python.org/cpython/rev/3ac9e7466d8b

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27245] IDLE: Fix deletion of custom themes and key bindings

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c8cddc4a8ee by Terry Jan Reedy in branch '2.7':
Issue #27245: IDLE: Cleanly delete custom themes and key bindings.
https://hg.python.org/cpython/rev/5c8cddc4a8ee

New changeset 438359d00a83 by Terry Jan Reedy in branch '3.5':
Issue #27245: IDLE: Cleanly delete custom themes and key bindings.
https://hg.python.org/cpython/rev/438359d00a83

New changeset 7948633608d5 by Terry Jan Reedy in branch 'default':
Issue #27245: temporary rename for merge.
https://hg.python.org/cpython/rev/7948633608d5

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27099] IDLE: turn builting extensions into regular modules

2016-06-13 Thread Ned Deily

Changes by Ned Deily :


Added file: http://bugs.python.org/file43385/config-main.def

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27099] IDLE: turn builting extensions into regular modules

2016-06-13 Thread Ned Deily

Ned Deily added the comment:

Terry, I don't know that much about the history of the config files.  I do know 
that during framework installs of Python on OS X, the "install_IDLE" recipe in 
Mac/Makefile.in (which ./configure uses to produce a configured Mac/Makefile) 
has some editing steps, using sed, to alter the IDLE .def files as they are 
being installed.  I'm attaching the two edited .def files as installed by the 
OS X installer.  And then there's the runtime munging of "Alt-" to "Option-" in 
GetCurrentKeySet() of idlelib/config.py.

--
Added file: http://bugs.python.org/file43384/config-extensions.def

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 96d297e9a8a8 by Martin Panter in branch '3.5':
Issue #22636: Handle OSError from subprocess, e.g. if command not found
https://hg.python.org/cpython/rev/96d297e9a8a8

New changeset a6a36bb6ee50 by Martin Panter in branch 'default':
Issue #22636: Merge ctypes.util from 3.5
https://hg.python.org/cpython/rev/a6a36bb6ee50

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27136] sock_connect fails for bluetooth (and probably others)

2016-06-13 Thread Martin Panter

Martin Panter added the comment:

Buildbots look happy with test_asyncio now, so closing again.

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2016-06-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, sorry, I missed the version in the title.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2016-06-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

These tests are not new. Are failures stable? What version of Tk is used?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Eryk Sun

Eryk Sun added the comment:

I get an access violation due to calling the ASN1_ITEM pointer as a function:

>  810:  ASN1_ITEM_ptr(method->it)));
_ssl!_get_peer_alt_names+0x12a:
7ffe`17b1225a ffd0callrax
  {_ssl!GENERAL_NAMES_it
   (7ffe`17ca0c20)}

0:000> ?? (ASN1_ITEM *)@rax
struct ASN1_ITEM_st * 0x7ffe`17ca0c20
   +0x000 itype: 0 ''
   +0x004 utype: 0n-1
   +0x008 templates: 0x7ffe`17ca0c00 ASN1_TEMPLATE_st
   +0x010 tcount   : 0n0
   +0x018 funcs: (null)
   +0x020 size : 0n0
   +0x028 sname: 0x7ffe`17cb5bf8  "GENERAL_NAMES"

I know very little about OpenSSL or the _ssl module, but I think the default on 
Windows is to define OPENSSL_EXPORT_VAR_AS_FUNCTION, in which case:

/*
 * Platforms that can't easily handle shared global variables
 * are declared as functions returning ASN1_ITEM pointers.
 */

/* Macro to obtain ASN1_ITEM pointer from exported type */
#  define ASN1_ITEM_ptr(iptr) (iptr())


The 2.7.10 build uses a function pointer:

>  810:  ASN1_ITEM_ptr(method->it)));
_ssl!_get_peer_alt_names+0xe8:
`02681c78 ffd0callrax
  {_ssl!GENERAL_NAMES_it
   (`0269a730)}

0:000> u _ssl!GENERAL_NAMES_it l2
_ssl!GENERAL_NAMES_it
[c:\build27\cpython\externals\openssl-1.0.2a\
crypto\x509v3\v3_genn.c @ 99]:
`0269a730 488d05b93a1400  lea rax,
  [_ssl!local_it
   (`027de1f0)]
`0269a737 c3  ret

0:000> p
>  810:  ASN1_ITEM_ptr(method->it)));
_ssl!_get_peer_alt_names+0xea:
`02681c7a 488d94248808 lea rdx,[rsp+888h]

0:000> ?? (ASN1_ITEM *)@rax
struct ASN1_ITEM_st * 0x`027de1f0
   +0x000 itype: 0 ''
   +0x004 utype: 0n-1
   +0x008 templates: 0x`027de1d0 ASN1_TEMPLATE_st
   +0x010 tcount   : 0n0
   +0x018 funcs: (null)
   +0x020 size : 0n0
   +0x028 sname: 0x`0284aa30  "GENERAL_NAMES"

Except _ssl links to OpenSSL statically, so strictly speaking this shouldn't be 
necessary. The 3.5 build uses a global variable here instead of a function 
pointer:

>  847: if(!(method = X509V3_EXT_get(ext))) {
_ssl_d!_get_peer_alt_names+0xe9:
7ffe`178398d9 e88faafaff  call_ssl_d!ILT+13160(X509V3_EXT_get) 
  (7ffe`177e436d)
0:000> p
>  847: if(!(method = X509V3_EXT_get(ext))) {
_ssl_d!_get_peer_alt_names+0xee:
7ffe`178398de 48898424d800 mov qword ptr [rsp+0D8h],rax 
   ss:0076`f99eabe8=
   7ffe359475b0
0:000> ?? ((X509V3_EXT_METHOD *)@rax)->it
struct ASN1_ITEM_st * 0x7ffe`17a55b10
   +0x000 itype: 0 ''
   +0x004 utype: 0n-1
   +0x008 templates: 0x7ffe`17a55af0 ASN1_TEMPLATE_st
   +0x010 tcount   : 0n0
   +0x018 funcs: (null)
   +0x020 size : 0n0
   +0x028 sname: 0x7ffe`17a55d58  "GENERAL_NAMES"

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27099] IDLE: turn builting extensions into regular modules

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ned, from your response on 20580, there appears to be no conversion rule.  
Perhap you could go throuch config-main.def and make a list of what you want 
for Mac and Unix respectively, if different from the current binding.  Serhiy, 
should anything be different for Linux?, or for your Modern Linux?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-13 Thread Martin Panter

Martin Panter added the comment:

An Open Indiana buildbot failed. The old code let the shell print any errors 
about missing programs to /dev/null, so I will change the subprocess calls to 
handle OSError.

==
ERROR: setUpModule (ctypes.test.test_loading)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/32bits/3.5.cea-indiana-x86/build/Lib/ctypes/test/test_loading.py",
 line 19, in setUpModule
libc_name = find_library("c")
  File 
"/export/home/buildbot/32bits/3.5.cea-indiana-x86/build/Lib/ctypes/util.py", 
line 238, in find_library
return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name))
  File 
"/export/home/buildbot/32bits/3.5.cea-indiana-x86/build/Lib/ctypes/util.py", 
line 145, in _get_soname
stderr=subprocess.DEVNULL)
  File 
"/export/home/buildbot/32bits/3.5.cea-indiana-x86/build/Lib/subprocess.py", 
line 947, in __init__
restore_signals, start_new_session)
  File 
"/export/home/buildbot/32bits/3.5.cea-indiana-x86/build/Lib/subprocess.py", 
line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/ccs/bin/dump'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25782] CPython hangs on error __context__ set to the error itself

2016-06-13 Thread Yury Selivanov

Yury Selivanov added the comment:

> issue27122_broken_cm.py also shows why I think "make it work" is the right 
> answer here [..]

But fixing this issue by reordering the exception chain will only mask bugs 
that just better to be fixed.  And sometimes, this will cause weird exceptions 
chains, that will make *some* people spend a lot of time debugging/googling to 
understand what's going on.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27314] Cannot install 3.5.2 with 3.6.0a1 installed

2016-06-13 Thread Larry Hastings

Changes by Larry Hastings :


--
nosy:  -larry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-13 Thread Martin Panter

Martin Panter added the comment:

Updated Py 2 patch to v5 with the added GCC comment

--
Added file: http://bugs.python.org/file43383/ctypes_util_popen-5.py2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0715d403cae2 by Martin Panter in branch '3.5':
Issue #22636: avoid using a shell in the ctypes.util module
https://hg.python.org/cpython/rev/0715d403cae2

New changeset 60613ecad578 by Martin Panter in branch 'default':
Issue #22636: Merge ctypes.util shell injection fixes from 3.5
https://hg.python.org/cpython/rev/60613ecad578

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5122b3465a38 by Martin Panter in branch '3.5':
Issue #16182: Fix readline begidx, endidx, and use locale encoding
https://hg.python.org/cpython/rev/5122b3465a38

New changeset 2ae2657d87a6 by Martin Panter in branch 'default':
Issue #16182: Merge readline locale fix from 3.5
https://hg.python.org/cpython/rev/2ae2657d87a6

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17500] move PC/icons/source.xar to http://www.python.org/community/logos/

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d9090aa75607 by Martin Panter in branch 'default':
Issue #17500: Remove merge conflict scar tissue
https://hg.python.org/cpython/rev/d9090aa75607

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Steve Dower

Steve Dower added the comment:

It seems to work fine on my build machine (Win Server 2012) but not my laptop 
(Win 10 Home). I suspect there's a different certificate being loaded that's 
causing the crash, but until I get a chance to debug properly I can't be sure. 
Hopefully I'll get a chance to look tomorrow.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27312] test_setupapp (idlelib.idle_test.test_macosx.SetupTest) fails on OS X

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

test_setupapp calls setupApp with body 
if isAquaTk():
hideTkConsole(root)
overrideRootMenu(root, flist)
addOpenEventSupport(root, flist)
fixb2context(root)
isAquaTk should be True exactly twice, and it failed both times.  The overall 
code is definitely not re-entrant  On Carbon, 'application' in inserted before 
'file' and becomes menudef[0].  The puzzle to me is the failure on what should 
be the first call.

Until that is figured out, you could try decorating test_setupapp with
@mock.patch(idlelib.macosx.setupApp)
to see what, if anything, fails next.

I have access to a small Macbook Air with 11" diag. screen -- probably too 
small for my eyes for routine use but I should be able to run test_idle 
(especially post push) and do occasional exploratory editing, as needed here.  
I will try to learn enough about how to use it to follow the devguide 
instructions on setting up a repository.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27314] Cannot install 3.5.2 with 3.6.0a1 installed

2016-06-13 Thread Steve Dower

Steve Dower added the comment:

Okay, it's not an issue with the newer versions, and I don't see any reason to 
worry about 3.6.0a1.

One issue that remains is that installing the launcher with 3.6.0 creates a 
separate add-remove programs entry and doesn't remove the 3.5.2rc1 entry, but 
the reference counting on files seems to be fine, so it's not a big deal and 
something I'll fix before 3.6 releases.

--
priority: deferred blocker -> normal
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2016-06-13 Thread Steve Dower

Steve Dower added the comment:

Launcher issue is issue27314

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27314] Cannot install 3.5.2 with 3.6.0a1 installed

2016-06-13 Thread Steve Dower

Changes by Steve Dower :


--
nosy: +Steven.Barker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27314] Cannot install 3.5.2 with 3.6.0a1 installed

2016-06-13 Thread Steve Dower

New submission from Steve Dower:

(Originally posted as a comment to issue26631 but confirmed separately.)

For 3.5.2 and 3.6.0a2, I updated the installer for the launcher so that it is 
always shared between Python versions (i.e. if you install 3.6 followed by 3.5, 
it won't touch the launcher because there's a "newer" one there).

However, because this didn't make it into 3.6.0a1, there is actually a version 
conflict that breaks installation.

I've marked this a deferred blocker for now and brought in the two RMs. I 
believe (and will test with the RCs) that this won't recur with the latest 
versions. It can also be easily worked around by choosing not to install the 
launcher.

We haven't seen this before because there have been no supported "downgrade" 
scenarios (i.e. installing 3.5.0 over 3.5.1 aborts at the start, well before 
this error would be seen).

--
assignee: steve.dower
components: Windows
messages: 268500
nosy: larry, ned.deily, paul.moore, steve.dower, tim.golden, zach.ware
priority: deferred blocker
severity: normal
stage: test needed
status: open
title: Cannot install 3.5.2 with 3.6.0a1 installed
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-06-13 Thread Martin Panter

Martin Panter added the comment:

I get two other test suite failures if I set PYTHONIOENCODING, so I am not 
going to bother addressing this in test_readline :)

FAIL: test_forced_io_encoding (test.test_capi.EmbeddingTests)
FAIL: test_7 (test.test_pkg.TestPkg)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2016-06-13 Thread Steve Dower

Steve Dower added the comment:

The launcher issue is different from the original one posted here, so I'll 
create a separate issue to track it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27310] 3.6.0a2 IDLE.app on OS X fails to launch, use command line idle3.6 instead

2016-06-13 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-13 Thread John Hagen

John Hagen added the comment:

I'll submit a patch shortly.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

How about wrapping the appropriate tkinter code with (untested yet)

import os
HOME = os.environ['HOME']
try:

finally"
os.environ['HOME'] = HOME  # will this unset?

or use a restore_env('HOME', ...) context manager?

Revising os.expanduser or apps to ignore HOME while tk is running is a related 
but different issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-13 Thread Martin Panter

Martin Panter added the comment:

Looks like you are right. The change in the implementation happened in revision 
19196cce1431.

--
keywords: +easy
nosy: +martin.panter
stage:  -> needs patch
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2016-06-13 Thread Ned Deily

New submission from Ned Deily:

On 3.6.0a2, 3.5.2rc1, and 2.7.12rc1:

==
FAIL: test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest)
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/test/test_ttk/test_widgets.py",
 line 332, in test_identify
self.assertEqual(self.entry.identify(5, 5), "textarea")
AssertionError: 'Combobox.button' != 'textarea'
- Combobox.button
+ textarea

On 3.6.0a2 and 3.5.2rc1:

==
FAIL: test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest)
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/test/test_ttk/test_widgets.py",
 line 455, in test_virtual_event
self.assertTrue(success)
AssertionError: [] is not true

--

--
components: Tests, Tkinter
messages: 268494
nosy: ned.deily, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on 
OS X with Cocoa Tk 8.5.18
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27312] test_setupapp (idlelib.idle_test.test_macosx.SetupTest) fails on OS X

2016-06-13 Thread Ned Deily

Ned Deily added the comment:

Without looking closely at it, I would speculate that the failures are due to 
trying to test code in overrideRootMenu() that was previously only called once 
during execution and may not be re-enterant:

# Remove the last 3 items of the file menu: a separator, close window and
# quit. Close window will be reinserted just above the save item, where
# it should be according to the HIG. Quit is in the application menu.
del mainmenu.menudefs[0][1][-3:]
mainmenu.menudefs[0][1].insert(6, closeItem)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27312] test_setupapp (idlelib.idle_test.test_macosx.SetupTest) fails on OS X

2016-06-13 Thread Ned Deily

New submission from Ned Deily:

Running tests of 3.6.0a2 with gui enabled on OS X result in various failures of 
the form:

==
ERROR: test_setupapp (idlelib.idle_test.test_macosx.SetupTest) (tktype='carbon')
Call setupApp with each possible graphics type.
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_macosx.py",
 line 93, in test_setupapp
macosx.setupApp(root, flist)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py",
 line 245, in setupApp
overrideRootMenu(root, flist)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py",
 line 133, in overrideRootMenu
closeItem = mainmenu.menudefs[0][1][-2]
IndexError: list index out of range

==
ERROR: test_setupapp (idlelib.idle_test.test_macosx.SetupTest) (tktype='cocoa')
Call setupApp with each possible graphics type.
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_macosx.py",
 line 93, in test_setupapp
macosx.setupApp(root, flist)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py",
 line 245, in setupApp
overrideRootMenu(root, flist)
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py",
 line 133, in overrideRootMenu
closeItem = mainmenu.menudefs[0][1][-2]
IndexError: list index out of range

--
components: IDLE
messages: 268492
nosy: ned.deily, terry.reedy
priority: high
severity: normal
stage: needs patch
status: open
title: test_setupapp (idlelib.idle_test.test_macosx.SetupTest) fails on OS X
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12855] linebreak sequences should be better documented

2016-06-13 Thread Martin Panter

Martin Panter added the comment:

Alexander: does my latest patch linebreakdoc.v5.py2.7.patch address your 
concerns about the 2.7 documentation? If so, I can push it to the repository.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-13 Thread John Hagen

New submission from John Hagen:

The function signature and description for zipfile.writestr is incorrect:

https://docs.python.org/3.5/library/zipfile.html#zipfile.ZipFile.writestr

See:
https://github.com/python/cpython/blob/master/Lib/zipfile.py#L1610

The documentation calls the parameter 'bytes', but the real parameter name is 
'data'.

Looks like this was not fixed when the source changed to Python 3:
https://github.com/python/cpython/blob/2.7/Lib/zipfile.py#L1208

--
assignee: docs@python
components: Documentation
messages: 268490
nosy: John Hagen, docs@python
priority: normal
severity: normal
status: open
title: Incorrect documentation for zipfile.writestr()
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27310] 3.6.0a2 IDLE.app on OS X fails to launch, use command line idle3.6 instead

2016-06-13 Thread Ned Deily

Changes by Ned Deily :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27136] sock_connect fails for bluetooth (and probably others)

2016-06-13 Thread A. Jesse Jiryu Davis

A. Jesse Jiryu Davis added the comment:

Thank you Martin!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27310] 3.6.0a2 IDLE.app on OS X fails to launch, use command line idle3.6 instead

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 675569bee37f by Ned Deily in branch '2.7':
Issue #27310: remove vestigial import in IDLE.app
https://hg.python.org/cpython/rev/675569bee37f

New changeset 0cf4bda2882c by Ned Deily in branch '3.5':
Issue #27310: remove vestigial import in IDLE.app
https://hg.python.org/cpython/rev/0cf4bda2882c

New changeset 9ba934d159e3 by Ned Deily in branch 'default':
Issue #27310: Fix IDLE.app failure to launch on OS X due to vestigial import.
https://hg.python.org/cpython/rev/9ba934d159e3

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27310] 3.6.0a2 IDLE.app on OS X fails to launch, use command line idle3.6 instead

2016-06-13 Thread Ned Deily

New submission from Ned Deily:

For 3.6.0a2, when attempting to launch IDLE.app on OS X (for example, by 
double-clicking the IDLE icon in the "/Applications/Python 3.6" folder), IDLE 
does not launch.  In the system.log there will be a log message similar to:

(org.python.IDLE.917792[45897]): Service exited with abnormal code: 1

The problem is that the glue code (idlemain.py) used to launch IDLE from within 
the IDLE app bundle is trying to import macosxSupport which has been renamed as 
of 3.6.0a2.  However, there is no longer any reason for the app bundle to 
import this module: this is vestigial code that I should have removed some 
releases ago when I refactored macosxSupport.  It hasn't hurt up until now.

As a workaround for 3.6.0a2, you can launch IDLE from a terminal command line:

/usr/local/bin/idle3.6

or you *could* carefully msnuslly edit the file /Applications/Python 
3.6/IDLE.app/Contents/Resources/idlemain.py to remove the two lines near the 
end:

from idlelib import macosxSupport
macosxSupport._appbundle = True

Fix for 3.6.0a3 to follow.

--
assignee: ned.deily
components: IDLE
messages: 268487
nosy: ned.deily
priority: critical
severity: normal
stage: needs patch
status: open
title: 3.6.0a2 IDLE.app on OS X fails to launch, use command line idle3.6 
instead
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27136] sock_connect fails for bluetooth (and probably others)

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e032ffd5ae84 by Martin Panter in branch '3.5':
Issue #27136: Change test to use ::1 for better OS X Tiger compatibility
https://hg.python.org/cpython/rev/e032ffd5ae84

New changeset f31b6c3e41f7 by Martin Panter in branch 'default':
Issue #27136: Merge test_asyncio fix from 3.5
https://hg.python.org/cpython/rev/f31b6c3e41f7

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-06-13 Thread Nick Coghlan

Changes by Nick Coghlan :


--
assignee: ncoghlan -> gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25782] CPython hangs on error __context__ set to the error itself

2016-06-13 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks Serhiy. I've attached a new file (issue27122_broken_cm.py) with a 
context manager that is deliberately buggy in the same way as 
contextlib._GeneratorContextManager is currently, so the new test can be made 
independent of #27122 being fixed (Greg Smith has a pending patch to make that 
CM well behaved again, which would currently lead to your new test passing for 
the wrong reasons)

issue27122_broken_cm.py also shows why I think "make it work" is the right 
answer here - the odd context chaining is tolerated in the case where the 
interpreter is implicitly setting the exception context, so I believe it should 
also be tolerated when ExitStack sets the context explicitly. If we "do the 
right thing" (where "right" = "the same as what the interpreter does") in the 
setter, then not only ExitStack, but anyone else setting __context__ should 
automatically benefit from the adjustment.

--
Added file: http://bugs.python.org/file43382/issue27122_broken_cm.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden

Tim Golden added the comment:

Built 64-bit 2.7 but can't reproduce on tip, 2.7.12rc1 or 2.7.11 tags.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20580] IDLE should support platform-specific default config defaults

2016-06-13 Thread Ned Deily

Ned Deily added the comment:

"I have the impression from what you wrote above that every 'Control' should be 
'Command'."

I'm not sure where I gave that impression but, no, the default IDLE keyset on 
OS X has command accelerators with Command- modifiers and some with Control- 
modifiers, as is typical of OS X applications.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27173] Modern Unix key bindings for IDLE

2016-06-13 Thread Ned Deily

Ned Deily added the comment:

"Please confirm that Classic OSX is the right choice over Classic Mac"

It is.  At least, when we install IDLE on OS X, Clsssic OS X is the default 
set.  I don't know why Classic Mac exists; I'm guessing it is left over from 
Mac OS 9 days (pre OS X).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27099] IDLE: turn builting extensions into regular modules

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ned, I reread #20580.  It reminds me that both Control and Alt are problems.  
In built-in config-extensions.def, the builtin fixed bindings and one of the 
configurable bindings are:

autocomplete:

calltips:   
parenmatch:   

runscript:  (configurable)

I presume that these all work fine on Macs.  Every other configurable binding 
uses 'Control' or 'Alt'.  When I copy configurable bindings into the file, I 
have to put them in each section.  Should I change each to 'Command' or 
'Option' for the 'Mac' and 'Osx' sections?  Also see comment on #20580.

I am adding #27173 as a dependency, for now, because it might be easier to 
include the new key set before starting to add new bindings.

--
dependencies: +Modern Unix key bindings for IDLE

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20580] IDLE should support platform-specific default config defaults

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ned, looking at config-keys.def, the Mac and Osx sections have a mixture of 
'Command' and 'Control'.  I have the impression from what you wrote above that 
every 'Control' should be 'Command'.  Why are the sections as they are?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27099] IDLE: turn builting extensions into regular modules

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The first line of the last message should have said 'in addition to' instead of 
'rather than', In the following expanded table, Key is the number of 
pseudoevents with configurable and fixed key bindings.  Gen is the number of 
General pseudoevents. (Current, from config-main.def.)

File  MenuKey  Gen
  --  ---  ---
autocomplete  Edit - Show Completions 1,2   1 
autoexpandEdit - Expand Word  1,-   -
calltips  Edit - Show call tip1,2   -
parenmatchEdit - Show surrounding parens  1,1   3
paragraph Format - Format Paragraph   1,-   1
rstripFormat - Strip trailing white-  -,-   -
runscript Run - Check Module  2,0   -
runscript Run - Run Modulesame file
codecontext   Options - Code Context  -,-   2
zoomheightWindow - Zoom Height1,-   -

My initial experiment with adding a fake event and binding in the user 
config-keys.cfg does not affect existing versions.  It appears to be completely 
ignored and does not appear on the list of configurable keys in the dialog.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27173] Modern Unix key bindings for IDLE

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ned, Serhiy's patch 4 solves one of your concerns in #20580 with

+@staticmethod
+def DefaultKeys():
+if sys.platform[:3] == 'win':
+return 'IDLE Classic Windows'
+elif sys.platform == 'darwin':
+return 'IDLE Classic OSX'
+else:
+return 'IDLE Modern Unix'

Please confirm that Classic OSX is the right choice over Classic Mac.

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27309] Visual Styles support

2016-06-13 Thread [HYBRID BEING]

New submission from [HYBRID BEING]:

This answer 
(http://stackoverflow.com/questions/33792008/python-tkinter-ttk-themed-message-box/33801260#33801260)
 to the Stack Overflow question states that Tkinter's messageboxes use 
non-themed controls due to the fact that python.exe and pythonw.exe lack 
manifest which notifies Windows that application supports Visual Styles.
Is there any specific reason it's not used?

--
components: Windows
messages: 268477
nosy: [HYBRID BEING], paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Visual Styles support
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27263] Tkinter sets the HOME environment variable, breaking scripts

2016-06-13 Thread Jarrod Petz

Jarrod Petz added the comment:

eryksun, now I understand this is a bit more challenging because tkinter is the 
underlying library doing this and it is shared by other apps.

Though I still don't feel that just because its been like this since 1995 means 
it should stay this way. This is something which breaks other code following 
the python os.path.expanduser way(and probably other thing looking at the 
evitonmeny HOME). Not all people will try getting to the bottom of why, 
esspecially if they are a new user. It should just work.

Would iy be possible for tkinter to allow the user/app to decide the behavior?

Ie. Have a setting(s)/switch which allows the default behavior of setting and 
using HOME to be overiden.

By doing that existing apps remain unchanged and apps like IDLE could change 
this behavior to whatever they want when they are ready.

I think os.path.expanduser() behavior is by far more logical. Preference 
USERPROFILE if HOME is missing. USERPROFILE on windows is needed to even login. 
HOMEDRIVE/HOMEPATH is not.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27306] Grammatical Error in Documentation - Tarfile page

2016-06-13 Thread Berker Peksag

Berker Peksag added the comment:

Thank you all!

--
nosy: +berker.peksag
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27306] Grammatical Error in Documentation - Tarfile page

2016-06-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 48052a140eed by Berker Peksag in branch '3.5':
Issue #27306: Fix typo in tarfile documentation
https://hg.python.org/cpython/rev/48052a140eed

New changeset 9c9ed326d981 by Berker Peksag in branch 'default':
Issue #27306: Merge from 3.5
https://hg.python.org/cpython/rev/9c9ed326d981

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25782] CPython hangs on error __context__ set to the error itself

2016-06-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

With Yury's path the issue27122 test need to be changed (RuntimeError is now 
raised instead of original exception). Here is updated patch.

--
Added file: http://bugs.python.org/file43381/Issue25782_5.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25782] CPython hangs on error __context__ set to the error itself

2016-06-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

With reordering the issue27122 test is passed without changes. No changes in 
ExitStack is needed. Here is updated patch.

--
Added file: http://bugs.python.org/file43380/set_context_reordering2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26262] Cannot compile with /fp:strict with MSVC

2016-06-13 Thread Nathan Harold

Nathan Harold added the comment:

Here's a patch with those three replacements and related comments.

--
keywords: +patch
nosy: +nharold
Added file: http://bugs.python.org/file43379/constants.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26386] tkinter - Treeview - .selection_add and selection_toggle

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

LGTM, but after applying to all 3, leave open (or open new issue) to replace 
patch in 3.6  (before beta 1).

Change signature to *items.  That will automatically make a single string 
become a len 1 tuple.  For selection (list the 4 selops and) add a note.  "For 
back compatibility, one may also pass a single tuple (or list?) of items." and 
Version Changed.  For 4 derivatives, 'See selection.' In the code, instead add 
(untested):

if len(items) == 1:  # Remove after deprecation.
item0 = items[0]
if not isinstance(items[0], isinstance(str)):
raise DeprecationWarning(
 
 "The option of passing multiple items as a tuple "
 "rather than as multiple items is deprecated and "
 "will be removed in 2020 or later.")
items = items0  # or more processing if lists were allowed

Revise test accordingly.

--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden

Tim Golden added the comment:

The crash is actually happening in Modules/_ssl.c:_get_peer_alt_names.

 >  _ssl.pyd!_get_peer_alt_names(x509_st * certificate)  Line 810 + 0x2 
bytes   C
_ssl.pyd!_decode_certificate(x509_st * certificate)  Line 1187 + 0x8 
bytes   C
_ssl.pyd!PySSL_peercert(PySSLSocket * self, _object * args)  Line 1335  
C

I note that Benjamin committed a leak-fix change a day or so before 
2.7.12rc1 was tagged:

   https://hg.python.org/cpython/rev/66cd109f3f21

As it stands, I can't build 64-bit with my setup and the 32-bit build 
seems fine so it's hard to bisect. I'll try to get a 64-bit build 
working to give better information. (The trace above is from an attached 
debugger).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

2016-06-13 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> cgi.FieldStorage can't parse multipart part headers with 
Content-Length and no filename in Content-Disposition

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

2016-06-13 Thread Marcel Hellkamp

Marcel Hellkamp added the comment:

Looks like this is a duplicate to #24764 and already fixed. Sorry for the noise.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25782] CPython hangs on error __context__ set to the error itself

2016-06-13 Thread Nick Coghlan

Nick Coghlan added the comment:

For both of the proposed patches, could we add a test case based on 
contextlib.ExitStack and a variant of Victor's #27122 reproducer script at 
http://bugs.python.org/file42999/hang_bug2.py that uses a deliberately broken 
__exit__ implementation that always re-raises the exception thrown into the 
underlying generator?

As discussed on that issue, I'm wondering if we need some additional defensive 
coding in ExitStack itself, or if resolving this underlying problem will be 
enough to also categorically prevent the hang in ExitStack.

As far as possible resolutions go, I tend to prefer lying about the shape of 
the exception state over changing the type of the raised exception - we already 
know the true exception state is a tree rather than a chain (see #18861 for 
some related discussions), and we should be able to ensure that all active 
exceptions remain somewhere in the chain, even if their order is a bit 
surprising.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

2016-06-13 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch. From a quick look, the patch looks fine but we need a 
test case. You can see Lib/test/test_cgi.py for existing tests.

--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25782] CPython hangs on error __context__ set to the error itself

2016-06-13 Thread Yury Selivanov

Yury Selivanov added the comment:

> Yury's raises a RuntimeError in the loop situation.

> Serhiy's simply reorders the exception context to put the referred to one at 
> the front of the chain in the event of a loop.

Right, and I believe that my solution is more Pythonic.  Reordering feels 
highly unintuitive to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden

Tim Golden added the comment:

I can reproduce with the download build but not with a freshly-built executable

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-06-13 Thread Nick Coghlan

Nick Coghlan added the comment:

Greg, I think you should apply your change to eliminate the regression and get 
us back to the state of all stdlib context managers being well-behaved in this 
regard (we unfortunately missed the 3.5.2 release, but that will ensure it's 
fixed for 3.5.3).

Given the challenges I had trying to reproduce the hang with a plain context 
manager rather than a generator, I now the problem is specifically just #25782 
- in the absence of that, ExitStack() should misbehave in the same way actual 
nested with statements would, rather than trying to implicitly "fix" the 
misbehaving context managers.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

2016-06-13 Thread Marcel Hellkamp

Marcel Hellkamp added the comment:

This should fix the issue.

--
keywords: +patch
Added file: http://bugs.python.org/file43378/foo.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27294] Better repr for Tkinter event objects

2016-06-13 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Added file: http://bugs.python.org/file43377/tk-win-key-events2.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19570] distutils' Command.ensure_dirname fails on Unicode

2016-06-13 Thread Adam Bartoš

Adam Bartoš added the comment:

Recently, I was also hit by this when trying to autoset `sys.argv` to a list of 
Unicode string (see 
https://github.com/Drekin/win-unicode-console/issues/20#issuecomment-225638271 
).

It would be nice to have this fixed. It seems to me (I may be wrong) that every 
occurence of `isinstance(…, str)` is a potential bug in Python 2.7. Either it 
should be spelled out as `isinstance(…, bytes)` or there should be 
`isinstance(…, types.StringTypes)` or even `isinstance(…, unicode)`.

--
nosy: +Drekin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

2016-06-13 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> needs patch
type: crash -> behavior
versions: +Python 3.6 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

2016-06-13 Thread Marcel Hellkamp

Changes by Marcel Hellkamp :


--
title: Inconsistency in cgi.FieldStorage() causes unicode/byte issue. -> 
Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte issue.

2016-06-13 Thread Marcel Hellkamp

New submission from Marcel Hellkamp:

Discovered here: https://github.com/bottlepy/bottle/issues/856

If a multipart section has a "Content-Length" header, but no "filename" 
attribute in the "Content-Disposition" header, cgi.FieldStorage tries to write 
binary data to a temporary file opened in text-mode.

The problem here is that cgi.FieldStorage tries to decide if something is a 
binary file-upload or a unicode form-field, but it does so based on two 
different headers in two different places. If the headers contradict each other 
(form-fields usually don't have a Content-Length, file-uploads usually have a 
filename), parsing breaks with a TypeError.

Unfortunately, there are some HTTP client libraries out there that trigger this 
bug.



Here is what happens:

A "Content-Length" header causes `cgi.FieldStorage.length` to be is set (which 
is fine).
https://hg.python.org/cpython/file/3.4/Lib/cgi.py#l550

If `length` has a value, `read_binary()` is used instead of `read_lines()` 
(which is questionable).
https://hg.python.org/cpython/file/3.4/Lib/cgi.py#l733

`read_binary()` calls `make_file()` which creates the buffer file in text mode 
if it does not find a `filename` attribute in the "Content-Disposition" Header 
(which is somewhat okay).
https://hg.python.org/cpython/file/3.4/Lib/cgi.py#l515
https://hg.python.org/cpython/file/3.4/Lib/cgi.py#l893

The bug is triggered if the last two steps disagree on the bytes vs. text 
question.

--
components: Library (Lib)
messages: 268460
nosy: Marcel Hellkamp
priority: normal
severity: normal
status: open
title: Inconsistency in cgi.FieldStorage() causes unicode/byte issue.
type: crash
versions: Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27163] IDLE entry for What's New in Python 3.6

2016-06-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Provisional addition a bit revised from above.  I did not markup idlelib as a 
module because there is currently no section to link to.  I don't know if or 
how IDLE can be linked to the IDLE doc.  I linked to the name change issue that 
started the change process. I will add a link to the interface issue if and 
when pushed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24254] Make class definition namespace ordered by default

2016-06-13 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24869] shlex lineno inaccurate with certain inputs

2016-06-13 Thread Gareth Rees

Gareth Rees added the comment:

A third alternative:

3. Add a method whose effect is to consume comments and whitespace, but which 
does not yield a token. You could then call this method, and then look at 
shlex.lineno, which will be the line number of the first character of the next 
token (if there is a next token).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27186] add os.fspath()

2016-06-13 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for catching my screw-up, Martin; I misread the checks in the file by 
noticing the "nt" bit but not picking up it was comparing against sys.name 
instead of sys.platform.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2016-06-13 Thread Neil Schemenauer

Neil Schemenauer added the comment:

This looks to be a good idea and a good time to merge it now the bytecode has 
changed to 16-bit.  The increase in complexity to compile.c is not bad and 
reducing the complexity of the eval loop is worth it, IMHO.

--
nosy: +nascheme

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27288] secrets should use getrandom() on Linux

2016-06-13 Thread Ned Deily

Ned Deily added the comment:

Setting this to "deferred blocker" priority to note that it needs to be 
resolved prior to feature code cutoff for 3.6.0, which is at 3.6.0b1 currently 
planned for 2016-09-07.

--
priority: release blocker -> deferred blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24869] shlex lineno inaccurate with certain inputs

2016-06-13 Thread Gareth Rees

Gareth Rees added the comment:

Just to restate the problem:

The use case is that when emitting an error message for a token, we want to 
include the number of the line containing the token (or the number of the line 
where the token started, if the token spans multiple lines, as it might if it's 
a string containing newlines).

But there is no way to satisfy this use case given the features of the shlex 
module. In particular, shlex.lineno (which looks as if it ought to help) is 
actually the line number of the first character that has not yet been consumed 
by the lexer, and in general this is not the same as the line number of the 
previous (or the next) token.

I can think of two alternatives that would satisfy the use case:

1. Instead of returning tokens as str objects, return them as instances of a 
subclass of str that has a property that gives the line number of the first 
character of the token. (Maybe it should also have properties for the column 
number of the first character, and the line and column number of the last 
character too? These properties would support better error messages.)

2. Add new methods that return tuples giving the token and its line number (and 
possibly column number etc. as in alternative 1).

My preference would be for alternative (1), but I suppose there is a very tiny 
risk of breaking some code that relied upon get_token returning an instance of 
str exactly rather than an instance of a subclass of str.

--
nosy: +Gareth.Rees

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Donald Stufft

Changes by Donald Stufft :


--
priority: normal -> release blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden

Tim Golden added the comment:

I did wonder about that. It's good that we can reproduce the issue
without pip, but it's probably going to be messy to debug! I've got VS
2008 on this machine but no time at the moment to build & debug.

Don't know if Zach or Steve might be able to jump in. If not, I can
probably try to get to it tomorrow.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2016-06-13 Thread Tommy Beadle

Changes by Tommy Beadle :


--
keywords: +patch
Added file: 
http://bugs.python.org/file43376/0001-Issue-27307-Support-index-attribute-access-for-unnum.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2016-06-13 Thread Tommy Beadle

New submission from Tommy Beadle:

Support for unnumbered fields in string.Formatter.format was added in 
http://bugs.python.org/issue13598, however, it does not support accessing an 
index or attribute of an unnumbered field like str.format does.  Instead, it 
raises an unhelpful "KeyError: ''":

In [1]: import string

In [2]: fmt = string.Formatter()

In [3]: fmt.format('{[0]}', ['a', 'b'])
---
KeyError  Traceback (most recent call last)
 in ()
> 1 fmt.format('{[0]}', ['a', 'b'])

/usr/lib64/python2.7/string.pyc in format(*args, **kwargs)
557 raise TypeError("format() missing 1 required positional 
"
558 "argument: 'format_string'")
--> 559 return self.vformat(format_string, args, kwargs)
560 
561 def vformat(self, format_string, args, kwargs):

/usr/lib64/python2.7/string.pyc in vformat(self, format_string, args, kwargs)
561 def vformat(self, format_string, args, kwargs):
562 used_args = set()
--> 563 result = self._vformat(format_string, args, kwargs, used_args, 
2)
564 self.check_unused_args(used_args, args, kwargs)
565 return result

/usr/lib64/python2.7/string.pyc in _vformat(self, format_string, args, kwargs, 
used_args, recursion_depth)
583 # given the field_name, find the object it references
584 #  and the argument it came from
--> 585 obj, arg_used = self.get_field(field_name, args, kwargs)
586 used_args.add(arg_used)
587 

/usr/lib64/python2.7/string.pyc in get_field(self, field_name, args, kwargs)
644 first, rest = field_name._formatter_field_name_split()
645 
--> 646 obj = self.get_value(first, args, kwargs)
647 
648 # loop through the rest of the field_name, doing

/usr/lib64/python2.7/string.pyc in get_value(self, key, args, kwargs)
603 return args[key]
604 else:
--> 605 return kwargs[key]
606 
607 

KeyError: ''


The attached patch adds this functionality.

aronancher asked in http://bugs.python.org/issue13598#msg218114 if the original 
patch was going to make it in to python 2.7.  Perhaps that could get a look?

--
components: Library (Lib)
messages: 268452
nosy: tbeadle
priority: normal
severity: normal
status: open
title: string.Formatter does not support key/attribute access on unnumbered 
fields
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Paul Moore

Paul Moore added the comment:

The problem appears to be related to https (maybe openssl?) I just did the 
following test:

>py -2
Python 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, Jun 12 2016, 05:57:31) [MSC v.1500 
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib2 import urlopen
>>> urlopen('http://www.google.co.uk')
>
>>> urlopen('https://www.google.co.uk')

The HTTPS query caused the crash.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden

Tim Golden added the comment:

Thanks, Paul. Adding Benjamin as 2.7 release manager. This looks like a release 
blocker to me.

--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Paul Moore

Paul Moore added the comment:

Tim, I just got the issue with the x64 installer from python.org 
(https://www.python.org/ftp/python/2.7.12/python-2.7.12rc1.amd64.msi)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Paul Moore

Paul Moore added the comment:

Confirmed I can reproduce the issue on Windows 7, with Python 2.7.12rc1. I 
don't have C debugging capabilities on this PC, so that's as far as I can go 
for now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden

Tim Golden added the comment:

James, which installer did you use (just so I can try to reproduce as
closely as possible)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27306] Grammatical Error in Documentation - Tarfile page

2016-06-13 Thread SilentGhost

SilentGhost added the comment:

LGTM.

--
stage: needs patch -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Paul Moore

Paul Moore added the comment:

Thanks Tim.

To clarify, the only 2 places that pip calls ctypes is to get the user 
application directory (and we've confirmed that doesn't error when called 
direct from Python), and in the vendored colorama package (which we removed and 
still got the crash, so it's not that).

So as far as we can tell, the crash is occurring from pure Python code, which 
as the OP pointed out, should not occur. The issue has also been confirmed as 
not happening with 2.7.11.

If anyone can suggest a way for the OP to get better information out of Python 
as to where the problem is occurring, I'm happy to debug further with him in 
the pip code in order to reproduce the issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread Tim Golden

Tim Golden added the comment:

Re-opening at user's request on Paul Moore's advice. He's already nosy so can 
comment here if needed.

It would be good to get independent verification. I'll try to install the rc 
for 2.7.12 to see if I can reproduce.

--
resolution: third party -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread James Paget

James Paget added the comment:

Python Packaging Authority member pfmoore from pypa/pip says "there's no 
ctypes-based code that could be causing the error" and "Python appears to be 
crashing as a result of pure Python code" and "there's no way that I can see 
how pip could be triggering a crash here. As this doesn't happen with 2.7.11, 
I'm inclined to consider it as a 2.7.12rc1 bug, I'm afraid."

Please reopen this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27306] Grammatical Error in Documentation - Tarfile page

2016-06-13 Thread Gareth Rees

Gareth Rees added the comment:

Here's a patch improving the grammar in the tarfile documentation.

--
keywords: +patch
nosy: +Gareth.Rees
Added file: http://bugs.python.org/file43375/issue27306.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27272] random.Random should not read 2500 bytes from urandom

2016-06-13 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27131] Unit test random shuffle

2016-06-13 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Yes

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27131] Unit test random shuffle

2016-06-13 Thread Jonathan Kross

Jonathan Kross added the comment:

Just checking in on this patch. Any chance of getting it applied within the 
next few days?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread James Paget

James Paget added the comment:

I have submitted this to pip as you have suggested (see pip Issue #3795), but 
feel that Python.exe should not crash even if there is a problem with a 
third-party package.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26686] email.parser stops parsing headers too soon.

2016-06-13 Thread Martin Panter

Martin Panter added the comment:

FWIW in the HTTP bug , David said 
“when seeing a line that doesn't look like a header the error recovery is to 
treat that line as the beginning of the body (ie: assume the blank line is 
missing).” I have no experience with email and RFC 5322 header handling, but it 
does make more sense to me to handle this as a defect in the header section, 
_not_ a genuine transition to the body (same as desired for the HTTP case).

Here is a patch that revives MalformedHeaderDefect (see Issue 14925), and 
continues parsing the rest of the header section instead of starting the body. 
But I am not sure how safe this change is. I did have to fix one unrelated set 
of tests (see headertest_msg in the Test8BitBytesHandling class) that did not 
include a blank line and was relying on the old behaviour.

--
keywords: +patch
versions: +Python 3.6
Added file: http://bugs.python.org/file43374/continue-header.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >