[issue27835] SystemExit in setUpClass etc. terminates test run

2016-08-24 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +ezio.melotti
stage:  -> patch review
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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-24 Thread Martin Panter

Martin Panter added the comment:

Rolf, just a note that I had to remove some trailing spaces on various 
continued lines in the Python code before it would let me push this.

Other tweaks I made:
* Eliminate _read_iterable() and lambda
* Rename line → chunk

The Windows buildbots fail the test sending a pipe with urlopen():

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/1166/steps/test/logs/stdio
==
FAIL: test_http_body_pipe (test.test_urllib2.HandlerTests)
--
Traceback (most recent call last):
  File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_urllib2.py", 
line 970, in test_http_body_pipe
self.assertEqual(newreq.get_header('Content-length'), None)
AssertionError: '0' != None

I cannot figure out why exactly. My experiments with Wine suggest that tell() 
on a BufferedReader wrapping a pipe raises OSError, so I would expect 
_get_content_length() to return None, yet the test failure shows that 
Content-Length is set to zero.

Is anyone able to investigate this on Windows? Will tell() and seek() reliably 
fail on a pipe or other unseekable file?

--

___
Python tracker 

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



[issue27821] IDLE custom keymaps don't work anymore (Windows, Python 3.6.0a3)

2016-08-24 Thread Vedran Čačić

Vedran Čačić added the comment:

But there is something _I_ can do now. :-)

I put a pdb.set_trace in that code you quoted, and went exploring. And here is 
what I found.

It calls
currentOption = idleConf.CurrentKeys()
That one calls
return self.current_colors_and_keys('Keys')
and _that one_ calls
default = self.GetOption('main', 'Theme', 'default',
  ^ note this
 type='bool', default=True)
and later it uses defaut as default for both theme and keys.

I did have custom keys, but not a custom highlight theme. Sure enough, as soon 
as I made a trivial copy of IDLE classic, things worked perfectly. :-)

So now I don't have a problem anymore. But still I think it is a bug that 
should be fixed. Not everyone who hates Alt+p also hates the orange words on 
white background. :-D

--

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b004da19b869 by Martin Panter in branch 'default':
Issue #12319: Move NEWS under beta 1 heading
https://hg.python.org/cpython/rev/b004da19b869

--

___
Python tracker 

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



[issue21085] compile error Python3.3 on Cygwin

2016-08-24 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

Oh, I made a mistake that is checking the si_band field without signal header.
Here is a modified patch adding signal header at checking the si_band field.
I passed tests compiling cpython 3.5.2+ on ubuntu 16.04.1 (x86) using this 
patch.

--
Added file: 
http://bugs.python.org/file44208/3.5-issue21085-struct_siginfo-2.patch

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-24 Thread Rolf Krahl

Rolf Krahl added the comment:

First of all, thanks all for the great work, in particular to you Martin for 
your patience!

Martin, on your changes: as mentioned earlier, I'm in holidays right now, so I 
didn't had a close look yet.  But I tested my application and it works, so I 
guess I'm happy with it.

I don't use Windows, so I can't comment on the issue test_http_body_pipe, sorry.

--

___
Python tracker 

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



[issue27842] Order CSV header fields

2016-08-24 Thread Steve Holden

Steve Holden added the comment:

Testing could be interesting. I'm thinking of generating five random string 
keys with a couple of rows of data, creating csv StringIOs (using pure Python) 
for all 120 combinations and verifying that they read back in the order they 
were written.

We should also test that OrderedDicts write correctly with a DictWriter and the 
same key sets.

It's a fairly haphazard test plan, so I'll be happy to hear more thorough 
suggestions. We could at a pinch reduce the number of keys to three if speed 
considerations dictate.

BTW, what happened to NEWS.txt? :)

--

___
Python tracker 

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



[issue21826] Performance issue (+fix) AIX ctypes.util with no /sbin/ldconfig present

2016-08-24 Thread Martin Panter

Martin Panter added the comment:

For the record, if you wanted to actually load the library function on AIX, I 
understand the code might look a bit like:

if sys.platform.startswith("aix"):
if sys.maxsize > 2**32:
lib = "libc.a(shr_64.o)"
else:
lib = "libc.a(shr.o)"
RTLD_MEMBER = 0x0004
lib = ctypes.CDLL(lib, ctypes.DEFAULT_MODE | RTLD_MEMBER)
_uuid_generate_time = lib.uuid_generate_time
else:
# The uuid_generate_* routines are provided by libuuid on at least
# Linux and FreeBSD, and provided by libc on Mac OS X.
...

--

___
Python tracker 

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



[issue27843] Spaces in filenames in setuptools

2016-08-24 Thread Michael Felt

Michael Felt added the comment:

On 23-Aug-16 19:02, R. David Murray wrote:
> R. David Murray added the comment:
>
> setuptools is not part of CPython or the standard library, though it is 
> currently distributed with CPython via ensurepip.  You should report this 
> issue to the setuptools and/or pip bug tracker.
Something new to find... :)

For my curiosity, I assume this (ensurepip) is only in Python3.X, not 
Python2.7 ?

> --
> nosy: +dstufft, r.david.murray
>
> ___
> Python tracker 
> 
> ___

--
nosy: +aixto...@gmail.com

___
Python tracker 

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



[issue21085] compile error Python3.3 on Cygwin

2016-08-24 Thread Erik Bray

Changes by Erik Bray :


--
assignee:  -> erik.bray

___
Python tracker 

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



[issue21085] compile error Python3.3 on Cygwin

2016-08-24 Thread Erik Bray

Erik Bray added the comment:

Thanks Masayuki for the updated patch.  I agree, the new approach looks better. 
 I will review the patch more carefully and test it soon.

--
stage:  -> patch review

___
Python tracker 

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



[issue27846] Base64 expansion factor is 4 to 3, not 6 to 4

2016-08-24 Thread Jens Jørgen Mortensen

New submission from Jens Jørgen Mortensen:

The documentation has a note saying: "Base64 has an expansion factor of 6 to 
4".  I believe it should be 4 to 3.

https://docs.python.org/dev/library/base64.html

--
assignee: docs@python
components: Documentation
messages: 273543
nosy: Jens.Jørgen.Mortensen, docs@python
priority: normal
severity: normal
status: open
title: Base64 expansion factor is 4 to 3, not 6 to 4
type: enhancement
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



[issue27847] os.set_inheritable() looks to be broken on OpenIndiana

2016-08-24 Thread STINNER Victor

New submission from STINNER Victor:

On Python 3.5, it seems ok:
---
test_get_inheritable_cloexec (test.test_socket.InheritanceTest) ... ok
test_set_inheritable (test.test_socket.InheritanceTest) ... ok
test_set_inheritable_cloexec (test.test_socket.InheritanceTest) ... ok
---
http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.5/builds/1159/steps/test/logs/stdio

But not on on Python 3.6:
==
FAIL: test_get_set_inheritable (test.test_os.FDInheritanceTests)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_os.py", 
line 2723, in test_get_set_inheritable
self.assertEqual(os.get_inheritable(fd), True)
AssertionError: False != True

==
FAIL: test_openpty (test.test_os.FDInheritanceTests)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_os.py", 
line 2796, in test_openpty
self.assertEqual(os.get_inheritable(master_fd), False)
AssertionError: True != False

==
FAIL: test_set_inheritable_cloexec (test.test_os.FDInheritanceTests)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_os.py", 
line 2747, in test_set_inheritable_cloexec
0)
AssertionError: 1 != 0

--
http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/11800/steps/test/logs/stdio

--
messages: 273544
nosy: haypo
priority: normal
severity: normal
status: open
title: os.set_inheritable() looks to be broken on OpenIndiana
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



[issue27847] os.set_inheritable() looks to be broken on OpenIndiana

2016-08-24 Thread STINNER Victor

STINNER Victor added the comment:

Hum, the main difference between Python 3.5 and 3.6 is this optimization:

changeset:   101039:d268f108ba80
user:Victor Stinner 
date:Sun Apr 17 16:51:52 2016 +0200
files:   Python/fileutils.c
description:
Avoid fcntl() if possible in set_inheritable()

Issue #26770: set_inheritable() avoids calling fcntl() twice if the FD_CLOEXEC
is already set/cleared. This change only impacts platforms using the fcntl()
implementation of set_inheritable() (not Linux nor Windows).

--

___
Python tracker 

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



[issue27847] os.set_inheritable() looks to be broken on OpenIndiana, regression of Python 3.6

2016-08-24 Thread STINNER Victor

Changes by STINNER Victor :


--
title: os.set_inheritable() looks to be broken on OpenIndiana -> 
os.set_inheritable() looks to be broken on OpenIndiana, regression of Python 3.6

___
Python tracker 

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



[issue27847] os.set_inheritable() looks to be broken on OpenIndiana

2016-08-24 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +ned.deily
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



[issue27821] IDLE custom keymaps don't work anymore (Windows, Python 3.6.0a3)

2016-08-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks for tracing further.  That is the new bug in .0a3.  "'Theme'" should be 
"section", as in the next two GetOption calls.  You should then not need a 
custom theme.  My new tests did not cover all the possible cases, so I should 
add more along with the fix.

--

___
Python tracker 

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



[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-24 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-24 Thread Eryk Sun

Eryk Sun added the comment:

> on Windows? Will tell() and seek() reliably fail on a pipe 
> or other unseekable file?

No they will not reliably fail. 

The file position is stored in the FILE_OBJECT CurrentByteOffset. This value 
can be queried and set using the WinAPI function SetFilePointerEx, which is 
implemented via the system calls NtQueryInformationFile and 
NtSetInformationFile with the information class FilePositionInformation. 

For files opened in synchronous mode, which is the only mode that the CRT 
supports, there's a fast path in the I/O manager to bypass the I/O request 
packet (IRP) path that would normally call the device driver. This fast-path 
code trivially updates the CurrentByteOffset field, regardless of the file 
type. In synchronous mode, a seek will only fail if the file is opened without 
buffering and the new position isn't sector-aligned, as is documented for 
SetFilePointerEx and NtSetInformationFile: FilePositionInformation.

Prior to Windows 8, seek() and tell() will also fail for a console handle 
because it's not actually a kernel File handle that can be used with I/O system 
calls. OTOH, Windows 8+ uses the ConDrv device driver, so console handles 
trivially allow seek() and tell() to succeed, though the console itself ignores 
the CurrentByteOffset in the File object. Console screen-buffer files have a 
positionable cursor, which is similar but not quite the same.

A fun fact is that for files opened in asynchronous mode, for 
FilePositionInformation the I/O manager does a regular device driver  call with 
an IRP_MJ_QUERY_INFORMATION or IRP_MJ_SET_INFORMATION packet. It probably does 
this instead of using its fast path because there's no inherent meaning to the 
file position in asynchronous mode. I played around with this a bit with 
aynchronous named pipes. For setting FilePositionInformation, the NamedPipe 
filesystem driver always returns STATUS_INVALID_PARAMETER. However, querying 
the file 'position' returns the number of unread bytes in the queue for the 
handle's end of the pipe. This can only be non-zero if the handle allows 
reading, which depends on whether the pipe was created as duplex, inbound, or 
outbound. Querying this requires the NT API because SetFilePointerEx always 
calls NtSetInformationFile and fails.

--
nosy: +eryksun

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-24 Thread Martin Panter

Martin Panter added the comment:

Thankyou Eryksun for the detailed explanation. Unfortunately, that means that 
uploading an unseekable file via urllib.request, or via http.client, isn’t 
going to work by default on Windows. I see a couple of workarounds with the 
current code:

* Users can force chunked encoding (manually pass Transfer-Encoding: chunked, 
and/or encode_chunked=True, depending on the API)
* Users can pass an iterator that reads the file: iter(partial(file.read, 
CHUNK_SIZE), b"")

But I never liked how so much behaviour depends on specific details of the 
upload body object anyway. Perhaps this is an opportunity to change the 
behaviour so that a file object always triggers chunked encoding. We could add 
a note to 
 to 
warn that uploading files to HTTP 1.0 servers will now require Content-Length 
to be manually specified.

--

___
Python tracker 

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



[issue27848] C function calls: use Py_ssize_t rather than C int for number of arguments

2016-08-24 Thread STINNER Victor

New submission from STINNER Victor:

I recently added new functions to call functions in C, especially 
_PyObject_FastCallDict(). I started with the C int type for the number of 
positional arguments: "int nargs".

But slowly, when I started to patch code to use _PyObject_FastCallDict(), I 
used more and more Py_ssize_t variables for the number of arguments, variable 
downcasted to int to call _PyObject_FastCallDict().

It is similar to the old issue #18295.

I propose to avoid any risk of integer overflow by using Py_ssize_t everywhere. 
It *might* produce more efficient machine code, since "i++" may require extra 
code to handle overflow when the int rather is used. But I'm not sure that 
Py_ssize_t is better, especially when -fwrapv option of the GCC compiler is 
used.

Attached patch implements this idea.

The patch also uses Py_ssize_t for some BUILD_xxx opcodes like 
BUILD_LIST_UNPACK. The change is not directly related. I wrote it in the hope 
that machine code could be more efficient, and avoid having to ask myself if 
types could overflow or not.

--
files: Py_ssize_t.patch
keywords: patch
messages: 273549
nosy: haypo, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: C function calls: use Py_ssize_t rather than C int for number of 
arguments
versions: Python 3.6
Added file: http://bugs.python.org/file44209/Py_ssize_t.patch

___
Python tracker 

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



[issue27848] C function calls: use Py_ssize_t rather than C int for number of arguments

2016-08-24 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Interpreter Core
nosy: +pitrou
type:  -> enhancement

___
Python tracker 

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



[issue27849] that is so great!

2016-08-24 Thread David Kirkby

New submission from David Kirkby:

Hey, 

Look what  I've just found  on the web!  It's so amazing, check it out 


Yours, david.kirkby

--
messages: 273550
nosy: drkirkby
priority: normal
severity: normal
status: open
title: that is so great!

___
Python tracker 

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



[issue27849] Spam

2016-08-24 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy:  -drkirkby
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: that is so great! -> Spam

___
Python tracker 

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



[issue27849] Spam

2016-08-24 Thread Berker Peksag

Changes by Berker Peksag :


--
Removed message: http://bugs.python.org/msg273550

___
Python tracker 

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



[issue27843] Spaces in filenames in setuptools

2016-08-24 Thread R. David Murray

R. David Murray added the comment:

It looks like we made a 'backport' exception for ensurepip for 2.7 (it's really 
a build tool, not part of Python itself).  I don't use 2.7 much myself any 
more, and when I do what I miss is the built in venv, not pip :)

--

___
Python tracker 

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



[issue27846] Base64 expansion factor is 4 to 3, not 6 to 4

2016-08-24 Thread R. David Murray

R. David Murray added the comment:

Maybe we should just drop that note.  To achieve any sort of clarity we'd have 
to say that base85 is 15 for 12 and base64 is 16 for 12.  And putting it that 
way it doesn't seem like all that much of an advantage :)

--
nosy: +r.david.murray
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



[issue27837] Logging Cookbook Improvement

2016-08-24 Thread Vinay Sajip

Vinay Sajip added the comment:

The thing about queues does not relate just to logging - it relates to all 
communication between different multiprocessing processes, of which logging is 
just an example. The logging cookbook is not the place to provide tutorial 
information on e.g. multi-threading or multiprocessing and the various gotchas 
that can cause problems (e.g. the state of threading locks after fork). Whole 
books could be written about this stuff, and no doubt have been.

> Just to clarify, my understanding is that the child loggers on separate 
> processes pass records to the main logger

No, you're mixing up loggers and handlers. Look at the basic and advanced 
tutorial in the stdlib docs, and e.g.

https://plumberjack.blogspot.co.uk/2009/09/python-logging-101.html

to get an idea of the difference between them. The other posts on that site are 
also worth looking at, though many of those posts have been incorporated into 
the logging cookbook over time.

> Thanks for your patience with my inexperience.

You're welcome. If further discussion is needed, it's best to continue it on 
e.g. Stack Overflow or the python-list mailing list.

--
resolution:  -> wont fix
stage:  -> 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



[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 63799c310b69 by R David Murray in branch '2.7':
#2466: fix test failure on windows.
https://hg.python.org/cpython/rev/63799c310b69

--

___
Python tracker 

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



[issue18485] mingw: configure for shared build

2016-08-24 Thread Martin Panter

Martin Panter added the comment:

Roumen’s patch amends code added by his patches at Issue 17597. Here is a 
version which is independent.

--
nosy: +martin.panter
stage:  -> patch review
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file44210/mingw-shared.v2.patch

___
Python tracker 

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



[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-24 Thread R. David Murray

R. David Murray added the comment:

Thanks, Xiang.  Also thanks to SilentGhost, who noticed the buildbot failure I 
missed.

--
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



[issue25564] Document that IDLE behaves differently than python on `del __builtins__`

2016-08-24 Thread ppperry

Changes by ppperry :


--
title: IDLE behaves differently than python on `del __builtins__` -> Document 
that IDLE behaves differently than python on `del __builtins__`

___
Python tracker 

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



[issue21997] Pdb.set_trace debugging does not end correctly

2016-08-24 Thread ppperry

ppperry added the comment:

This issue seems to have languished for over two years.

--
nosy: +ppperry

___
Python tracker 

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



[issue21997] Pdb.set_trace debugging does not end correctly

2016-08-24 Thread R. David Murray

R. David Murray added the comment:

Your point being?

:)  

What needs to happen is for someone to review the issue and figure out if there 
is anything left to do.  Has termination been fixed?  Has the test case 
mentioned in the last message been incorporated?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Christian Heimes

New submission from Christian Heimes:

Another attack with a catchy name and logo. This time 3DES is showing its age. 
3DES should be removed from the list of server ciphers in 
ssl._RESTRICTED_SERVER_CIPHERS. For client ciphers we can leave it in for now. 
An attack requires dynamic code execution of code from a malicious 3rd party 
and several hundred GB of traffic. It's relevant for browsers with JS but not 
for majority of Python applications. OpenSSL 1.1.0 will remove 3DES support by 
default anyway.

https://www.openssl.org/blog/blog/2016/08/24/sweet32/
https://sweet32.info/

> As seen previously, the full attack should require 236.6 blocks (785 GB) to 
> recover a two-block cookie, which should take 38 hours in our setting. 
> Experimentally, we have recovered a two-block cookie from an HTTPS trace of 
> only 610 GB, captured in 30.5 hours.

--
components: Library (Lib)
messages: 273559
nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen
priority: critical
severity: normal
status: open
title: Remove 3DES from cipher list (sweet32 CVE-2016-2183)
type: security
versions: Python 2.7, 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



[issue12029] Allow catching virtual subclasses in except clauses

2016-08-24 Thread ppperry

Changes by ppperry :


--
title: Catching virtual subclasses in except clauses -> Allow catching virtual 
subclasses in except clauses

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Hynek Schlawack

Hynek Schlawack added the comment:

JFTR the main compatibility impact on the browser side is the loss of IE8 on 
WinXP whose last stable release is qua Wikipedia from “February 22, 2011; 5 
years ago”.

--
nosy: +hynek

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Alex Gaynor

Alex Gaynor added the comment:

+! from me, removing 3DES is a totally sane default, people who need IE8+XP 
compat can change the default.

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Donald Stufft

Donald Stufft added the comment:

+1 from me, as another data point, the PSF infrastructure (which serves things 
like hg.python.org that aren't behind Fastly) has had 3DES disabled since 2014 
without any complaints that I've seen.

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Cory Benfield

Cory Benfield added the comment:

+1 from me, Requests, urllib3, and Twisted are all removing 3DES cipher suites 
from our default list.

--
nosy: +Lukasa

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Christian Heimes

Christian Heimes added the comment:

I'm +1 for removal from server-side suite and +0.5 for removal from client-side 
suite.

Unless somebody makes a compelling reason for keeping 3DES at all, let's get 
rid of it for good. Users are free to override the settings. It might make 
sense to include ChaCha20 at the same time so we don't have to touch the same 
lines twice.

--

___
Python tracker 

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



[issue23428] Use the monotonic clock for thread conditions on POSIX platforms

2016-08-24 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

Hello,

Is there any progress on the issue? Should someone take over?

--
nosy: +cstratak

___
Python tracker 

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



[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-24 Thread Eric V. Smith

Eric V. Smith added the comment:

Here's a slightly simplified version. I can reproduce this on Windows with 
3.4.3 cygwin 32-bit and on Linux with 3.3.2 64-bit.

--
nosy: +eric.smith
Added file: http://bugs.python.org/file44211/27833.py

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Donald Stufft

Donald Stufft added the comment:

Should we also remove HIGH from the cipher list? If I recall, at the time we 
added it under the assumption that we might get new, better ciphers 
automatically but 3DES is considered "HIGH", so we'll get it pulled in via that 
on older OpenSSLs.

--

___
Python tracker 

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



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-08-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

This does not look right: 

+.. classmethod:: time.strptime(date_string, format)
+
+   Return a :class:`time` corresponding to *date_string, parsed according to
+   *format*. :exc:`ValueError` is raised if the date string and format can't be
+   parsed by `time.strptime`, if it returns a value which isn't a time tuple,
+   or if the time part is nonzero.
  ^

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Cory Benfield

Cory Benfield added the comment:

As another data point, I just pushed a PR to remove HIGH from urllib3/requests 
for exactly this reason, and Twisted already doesn't use it.

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Christian Heimes

Christian Heimes added the comment:

Donald: 3DES will be removed from HIGH with the next release:

https://www.openssl.org/blog/blog/2016/08/24/sweet32/
> For 1.0.2 and 1.0.1, we removed the triple-DES ciphers from the “HIGH” 
> keyword and put them into “MEDIUM.” Note that we did not remove them from the 
> “DEFAULT” keyword.

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-24 Thread Donald Stufft

Donald Stufft added the comment:

Christian: But that doesn't help all of the existing releases of OpenSSL.

--

___
Python tracker 

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



[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Xiang Zhang

Xiang Zhang added the comment:

Ping. :)

--

___
Python tracker 

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



[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-24 Thread Tim Peters

Tim Peters added the comment:

Looks to me like this is what the docs are talking about when they say:

"""
As mentioned above, if a child process has put items on a queue (and it has not 
used JoinableQueue.cancel_join_thread), then that process will not terminate 
until all buffered items have been flushed to the pipe.

This means that if you try joining that process you may get a deadlock unless 
you are sure that all items which have been put on the queue have been 
consumed. Similarly, if the child process is non-daemonic then the parent 
process may hang on exit when it tries to join all its non-daemonic children.

Note that a queue created using a manager does not have this issue. See 
Programming guidelines.
"""

--
nosy: +tim.peters

___
Python tracker 

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



[issue23239] SSL match_hostname does not accept IP Address

2016-08-24 Thread R. David Murray

Changes by R. David Murray :


--
stage: commit review -> needs patch

___
Python tracker 

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



[issue19489] move quick search box above TOC

2016-08-24 Thread R. David Murray

R. David Murray added the comment:

Moving back to patch review for someone to sign off on the changes.

--
nosy: +r.david.murray
stage: commit review -> patch review

___
Python tracker 

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



[issue27851] re.sub() bug with IGNORECASE

2016-08-24 Thread Dan Wilt

New submission from Dan Wilt:

Working with re.sub() noted strange behavior with re.I set, seems like a bug. 
Noted in both Python 2.7.12 and Python 3.5.2, Anaconda custom build (32-bit) on 
Windows 7.

>>> import re
>>> re.sub('\.', '', '.')
''
>>> re.sub('\.', '', '.', re.I)
'...'
>>> re.sub('\.', '', '.', re.L)
'.'

The first case is the expected behavior, the second and third aren't. Oddly 
enough,

>>> re.sub('\.', '', '.', re.L | re.I)
''

MWE file attached (python3)

Thanks, I'm a heavy python user, but not all that advanced - hope this is 
helpful and I'm not just being stupid.

--
components: Regular Expressions
files: re_bug.py
messages: 273575
nosy: Dan Wilt, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: re.sub() bug with IGNORECASE
type: behavior
versions: Python 2.7, Python 3.5
Added file: https://bugs.python.org/file44212/re_bug.py

___
Python tracker 

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



[issue27851] re.sub() bug with IGNORECASE

2016-08-24 Thread R. David Murray

R. David Murray added the comment:

I really wish we could "fix" this somehow, since we get an issue opened for it 
probably every two or three months.

The fourth argument to re.sub is the count, not the flags.

--
nosy: +r.david.murray
resolution:  -> not a bug
stage:  -> 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



[issue27843] Spaces in filenames in setuptools

2016-08-24 Thread Brett Cannon

Changes by Brett Cannon :


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

___
Python tracker 

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



[issue12660] test_gdb fails when installed

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ef13efb89afe by Zachary Ware in branch '2.7':
Issue #12660: Backport 84bbb8d2d237
https://hg.python.org/cpython/rev/ef13efb89afe

--

___
Python tracker 

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



[issue20124] The documentation for the atTime parameter of TimedRotatimeFileHandler is confusing

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d13c1f33d21 by Vinay Sajip in branch 'default':
Closes #20124: clarified usage of the atTime parameter in 
TimedRotatingFileHandler documentation.
https://hg.python.org/cpython/rev/8d13c1f33d21

--
nosy: +python-dev
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



[issue19504] Change "customise" to "customize".

2016-08-24 Thread Vinay Sajip

Changes by Vinay Sajip :


--
nosy:  -vinay.sajip

___
Python tracker 

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



[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-24 Thread Eric V. Smith

Eric V. Smith added the comment:

Tim: I believe that's correct. I'm going to close this issue.

Guni: If you have more information or you feel this is an actual bug, please 
post it here.

--
resolution:  -> not a bug
stage:  -> 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



[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Berker Peksag

Berker Peksag added the comment:

It would be better to use support.swap_attr().

--
nosy: +berker.peksag
priority: normal -> low
stage: needs patch -> patch review
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue27852] itertools -> flatten_all()

2016-08-24 Thread YoSTEALTH

New submission from YoSTEALTH:

# Maybe a Recipe for itertools

from collections.abc import Iterable

def flatten_all(iterable):
# -> 'one'
# <- ['one']
# -> ['one', [b'two', b'three'], ['four', ('five', (1, {'e', 'ee'}, (2, (3, 
))), ['six'])], generator()]
# <- ['one', b'two', b'three', 'four', 'five', 1, 'ee', 'e', 2, 3, 'six', 
0, 1, 2]

if isinstance(iterable, Iterable) and not isinstance(iterable, (str, 
bytes)):
for it in iterable:
yield from flatten_all(it)
else:  # int & others types as is.
yield iterable


if __name__ == "__main__":

# Test Only
def generator():
for i in range(3):
yield i

a = ['one', [b'two', b'three'], ['four', ('five', (1, {'e', 'ee'}, (2, (3, 
))), ['six'])], generator()]
# a = 'one'
# a = (True, False)

print(list(flatten_all(a)))

--
messages: 273581
nosy: YoSTEALTH
priority: normal
severity: normal
status: open
title: itertools -> flatten_all()
type: enhancement
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



[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks for the reply berker. It's nice to know this helper. :) But I'd like to 
keep it as now since I don't see any real advantage to use it and swap_attr 
will set the attribute even when it's absent, this is not wanted.

--

___
Python tracker 

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



[issue27853] Add title to examples in importlib docs

2016-08-24 Thread Brett Cannon

New submission from Brett Cannon:

By not having section titles for the various examples in the importlib examples 
there is no way to directly link to a specific example.

--
assignee: brett.cannon
components: Documentation
messages: 273583
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Add title to examples in importlib docs
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



[issue27851] re.sub() bug with IGNORECASE

2016-08-24 Thread Dan Wilt

Dan Wilt added the comment:

Thanks! That helps. I apologize for raising a non-existent issue.
Dan

On Wed, Aug 24, 2016 at 11:59 AM, R. David Murray 
wrote:

>
> R. David Murray added the comment:
>
> I really wish we could "fix" this somehow, since we get an issue opened
> for it probably every two or three months.
>
> The fourth argument to re.sub is the count, not the flags.
>
> --
> nosy: +r.david.murray
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue25847] CPython not using Visual Studio code analysis!

2016-08-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Like Mark, I have noticed that there are enough ignored VS warnings now to not 
think we need more.

Every time socketmodule is recompiled, for instance, I see all the scary 
deprecation warnings.  These are Windows-specific.  Should the code be changed 
or should the warnings be silenced with  _WINSOCK_DEPRECATED_NO_WARNINGS, as 
suggested?

Other warnings appear to come from code compiled on all systems.  I presume 
such code is usually developed on Linux.  Is such code compiling warning free 
on gcc?  Are there conflicting demands and opinions from gcc and vs?

I am a little confused on the actual policy for compiling on Windows.  I 
believe Victor Stinner has done some patches to stop them, but...
(Steve)> Doing the work to clean up the warnings really has to come second, 
ultimately.
Second to what?

Should I just close my eyes when running build.bat?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue27821] IDLE custom keymaps don't work anymore (Windows, Python 3.6.0a3)

2016-08-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Vedran, I have used IDLE's imperfect visual debugger and was thinking about how 
I might use it to solve this problem.  But I have never used pdb.  Perhaps I 
should learn it.  Please explain how you used set_trace to track down this bug.

For #24265, I have similarly analyzed some of the top-level calls and believe I 
know the problem -- a missing function call -- but where?  I think I need to 
trace both what does not work and something similar that does work and compare 
execution paths.  How could I use pdb for this issue?

--

___
Python tracker 

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



[issue19884] Importing readline produces erroneous output

2016-08-24 Thread Orion Poplawski

Orion Poplawski added the comment:

I'm still seeing this test failure on EL6.8 with python 3.4.5:

[268/391] test_readline
testHistoryUpdates (test.test_readline.TestHistoryManipulation) ... ok
test_init (test.test_readline.TestReadline) ... test test_readline failed
FAIL
==
FAIL: test_init (test.test_readline.TestReadline)
--
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.4.5/Lib/test/test_readline.py", line 57, 
in test_init
self.assertEqual(stdout, b'')
AssertionError: b'\x1b[?1034h' != b''
--
Ran 2 tests in 0.111s
FAILED (failures=1)

With readline-devel-6.0-4.el6.x86_64.

--
nosy: +opoplawski

___
Python tracker 

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



[issue26638] Avoid warnings about missing CLI options when building documentation

2016-08-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I built the 3.5 docs on Win10 with Sphinx 1.3.3 and corresponding dependencies 
and got a new warning as a result of 8bac90be for #26462:
F:\Python\dev\36\Doc\whatsnew\3.2.rst:2063: WARNING: Pygments lexer name 
'doscon' is not known

Thinking the problem was an out-of-date pygments module, I updated sphinx and 
dependencies (to 1.4.6, etc).  I was right that updating pygments fixed the 
warning above, but now I get 140 warnings!!!

4 are from the reading phase for configparser.rst.  The first:

F:\Python\dev\35\Doc\library\configparser.rst:240: WARNING: Could not lex 
literal_block as "ini". Highlighting skipped.

I presume this could be fixed, but I don't know how.

136 are about "

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



[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Berker Peksag

Berker Peksag added the comment:

In which case would the send_header method be absent?

--

___
Python tracker 

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



[issue27595] Document PEP 495 (Local Time Disambiguation) features

2016-08-24 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
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



[issue27841] Use fast call in method_call() and slot_tp_new()

2016-08-24 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Tuples use a freelist ;-)
I think you can safely bump the small array to 7 or 8 elements, to satisfy even 
more cases. Though you are right that function calls with more than 5 arguments 
should be rare (and mostly to complicated functions where function call 
overhead doesn't really matter).

--
nosy: +pitrou

___
Python tracker 

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



[issue26638] Avoid warnings about missing CLI options when building documentation

2016-08-24 Thread Zachary Ware

Zachary Ware added the comment:

Terry: for now, you can downgrade Sphinx to 1.3.6 as it is known to build with 
no warnings (that's the version the Docs buildbot currently uses).

--

___
Python tracker 

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



[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2016-08-24 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Modifying the keyword arguments dict is quite common so this change would be a 
heavy compatibility breaker.

A well-known idiom:

  def some_function(..., **kwargs):
  some_option = kwargs.pop('some_option', None)
  # further process kwargs

--
nosy: +pitrou

___
Python tracker 

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



[issue16379] SQLite error code not exposed to python

2016-08-24 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Attached is a patch based on Daniel last patch with the following changes:

* There is no errorcode mapping.
* The exception object has a error_name attribute.

I think this two changes should solve the API problems raised by Ezio and 
Gerhard about the error code mapping.

> I propose to also set the SQLite extended error code if this is implemented.

I think that this should be done in a separate patch. I will start working on 
the extended error code and will upload a patch to issue 24139.

--
nosy: +palaviv
Added file: https://bugs.python.org/file44213/16379.patch

___
Python tracker 

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



[issue25564] Document that IDLE -python difference for `del __builtins__`

2016-08-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Steven: "You should use `__builtin__` in Python 2 and `builtins` in Python 3."  
I presume this is for import statements.

ppperry: Titles should fit in the box, so they fit in search listing results.

I am thinking of something like "Since Python inserts '__builtins__' into the 
exec global namespace when not present and IDLE uses exec, '__builtins__' is 
defined at the start of each statement or file even when it otherwise would not 
be."

--
title: Document that IDLE behaves differently than python on `del __builtins__` 
-> Document that IDLE -python difference for `del __builtins__`
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



[issue27821] IDLE custom keymaps don't work anymore (Windows, Python 3.6.0a3)

2016-08-24 Thread Vedran Čačić

Vedran Čačić added the comment:

Well, I don't know how good this comment box is for a pdb tutorial. :-) And I 
learned it a long time ago, so I don't really remember how it is to not know 
it. :-/ The main reason I love it is purely sentimental: it reminds me of those 
silly text-based adventure games. If you played Zork, you'll feel right at 
home. :-D

(If you want a more "ordinary" introduction, yet refreshingly different than 
the boring stdlib manpage, visit 
https://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-in-python/.)

You put "import pdb; pdb.set_trace()" (or "__import__('pdb').set_trace()" if 
you hate semicolons more than dunders:) before the line you want to set a 
breakpoint in. Then you run the program normally. When it hits a breakpoint, it 
gives you a (Pdb) prompt, and you can look around.

(Alternatively, when you get an exception, just "import pdb; pdb.pm()" for a 
post-mortem debugger. All the stack frames that lead to exception are preserved 
with all their local variables, nicely inspectable. Beautiful.:)

`u` and `d` (up and down) are the elevator buttons that move you along the 
frame stack: u towards earlier (outer) calls, d towards later (inner) calls. 
`w` (where) lets you see which "floor" you're on.

On every floor, `p` (print) and `pp` (prettyprint) give you information about 
various objects you see, like "examine" in text adventures :-). `!` lets you 
execute an arbitrary Python statement (! is not needed in most cases, but it's 
good to make a habit of writing it) _inside the current stackframe_ (yes, 
everything is live:). `interact` gives you a full Python shell attached on the 
current frame.

`l` lists a few lines around your current place, `ll` lists the whole function 
(or another meaningful whole). `a` gives you the arguments for the current 
function call.

`s` and `r` are the "in" and "out" commands, allowing you to step inside and 
return from currently called function. `n` is just "next", meaning "execute 
current line and show me the next one". Unfortunately, `n` has no inverse (you 
cannot undo an executed statement), but `j` is a (limited) goto. If you go too 
far into a strange land, `run` restarts the program from the beginning.

pdb always shows the line it's about to execute (it's not yet executed). Just 
pressing Enter repeats the last given command (in case of `l`, keeps listing 
onwards).

`c` means quit the debugger and continue executing program normally. `q` means 
quit the debugger and program altogether. There are many more commands, but 
those are kinda basic ones to know your way around.

Ok, now what I've done with IDLE. You mentioned configdialog.py, line 1066. I 
go there and find a function

def LoadKeyCfg(self):

Ok, that's obviously the function I have to trace. As the first statement in 
that function, I put "import pdb; pdb.set_trace()" call and save the file. Then 
I go to command prompt, and start IDLE. I go to Options > Configure IDLE, and 
sure enough, at my command prompt there is

> c:\users\veky\appdata\local\programs\python\python36\lib\idlelib\configdialog.py(1069)LoadKeyCfg()
-> self.keysAreBuiltin.set(idleConf.GetOption(
(Pdb)

a Pdb prompt. I type l and Enter, to see where I am in the code.

(Pdb) l
1064self.SetHighlightTarget()
1065
1066def LoadKeyCfg(self):
1067import pdb; pdb.set_trace()
1068##current keys type radiobutton
1069 -> self.keysAreBuiltin.set(idleConf.GetOption(
1070'main', 'Keys', 'default', type='bool', default=1))
1071##currently set keys
1072currentOption = idleConf.CurrentKeys()
1073##load available keyset option menus
1074if self.keysAreBuiltin.get(): #default theme selected
(Pdb)

Ok, so it's going to set a Tkinter variable (I know by seeing ".set", but there 
is also a `whatis` command if you want to see the type of something). I say n 
to execute it (twice because it's two lines), and then

(Pdb) p self.keysAreBuiltin.get()
False
(Pdb)

So far so good. Keys aren't builtin.

(Pdb) n
> c:\users\veky\appdata\local\programs\python\python36\lib\idlelib\configdialog.py(1072)LoadKeyCfg()
-> currentOption = idleConf.CurrentKeys()

Ok, now it's going to set CurrentKeys.

(Pdb) n
...
(Pdb) p idleConf.CurrentKeys()
'IDLE Classic Windows'

Ok, this shouldn't happen. Let's goto it again (hoping there aren't many 
sideeffects:) and step into it this time.

(Pdb) l
1069self.keysAreBuiltin.set(idleConf.GetOption(
1070'main', 'Keys', 'default', type='bool', default=1))
1071##currently set keys
1072currentOption = idleConf.CurrentKeys()
1073##load available keyset option menus
1074 -> if self.keysAreBuiltin.get(): #default theme selected
1075itemList = idleConf.GetSectionList('default', 'keys')
1076itemList.sort()
1077self.optMenuKeysBuiltin.SetMenu(itemLis

[issue6057] sqlite3 error classes should be documented

2016-08-24 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: commit review -> patch review

___
Python tracker 

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



[issue19884] Importing readline produces erroneous output

2016-08-24 Thread Orion Poplawski

Orion Poplawski added the comment:

Updating the version check to 6.1 as in the patch from Martin certainly avoids 
the failing test.

--

___
Python tracker 

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



[issue26638] Avoid warnings about missing CLI options when building documentation

2016-08-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Only 138 warnings with 2.7.

Zack, how do I downgrade.  I examined the result of pip install -h but cannot 
see how.  I presume that 'sphinx' and '1.3.6' should be combined into a 
'' but this latter is not defined and the things I 
tried, including the output format of 'pip list' did not work.

Does anything else need to be downgraded?

--

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1dbd1a9a6a9c by Berker Peksag in branch '3.5':
Issue #6057: Document exceptions in sqlite3 module
https://hg.python.org/cpython/rev/1dbd1a9a6a9c

New changeset 6f8042107d76 by Berker Peksag in branch 'default':
Issue #6057: Merge from 3.5
https://hg.python.org/cpython/rev/6f8042107d76

--
nosy: +python-dev

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2016-08-24 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Jaysinh and Stéphane! :)

--
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



[issue6057] sqlite3 error classes should be documented

2016-08-24 Thread Berker Peksag

Berker Peksag added the comment:

Already fixed in 78c039440d6b, thanks!

--
status: open -> closed

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2016-08-24 Thread Emanuel Barry

Emanuel Barry added the comment:

Typo: "an Warning" ;)

--
nosy: +ebarry
status: closed -> open

___
Python tracker 

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



[issue27848] C function calls: use Py_ssize_t rather than C int for number of arguments

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9479da828358 by Victor Stinner in branch 'default':
Use Py_ssize_t type for number of arguments
https://hg.python.org/cpython/rev/9479da828358

--
nosy: +python-dev

___
Python tracker 

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



[issue27717] sqlite documentation bug

2016-08-24 Thread Berker Peksag

Berker Peksag added the comment:

> I think it is pretty hard to miss "Never do this" when reading the code 
> section.

I agree with David. However, I may be biased since I spend a lot of time 
reading docs.python.org :) Here is a patch that moves the insecure example to a 
separate code block.

--
keywords: +patch
nosy: +berker.peksag
stage:  -> patch review
Added file: https://bugs.python.org/file44214/issue27717.diff

___
Python tracker 

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



[issue27595] Document PEP 495 (Local Time Disambiguation) features

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dcd6d6be81a7 by Alexander Belopolsky in branch 'default':
Closes #27595: Document PEP 495 (Local Time Disambiguation) features.
https://hg.python.org/cpython/rev/dcd6d6be81a7

--
nosy: +python-dev
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



[issue27854] Installed 2.7: IDLE Help disabled because help.html is missing

2016-08-24 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Since 2.7.11, 3.4.4, and 3.5.1, idlelib contains a committed help.html, 
displayed by Help => IDLE Help.  In my Windows 2.7.12 installation, the file is 
missing, even after 'Repair'.  IDLE Help silently does nothing.  I don't 
remember if I tested the 2.7.11 installation.  It is present in current 3.5/6 
installations. Someone needs to test on other machines and OSes to determine if 
this omission is specific to my machine or the (2.7) Windows installer.

--
assignee: terry.reedy
components: IDLE, Installation
messages: 273605
nosy: benjamin.peterson, terry.reedy
priority: normal
severity: normal
status: open
title: Installed 2.7: IDLE Help disabled because help.html is missing
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue27830] Add _PyObject_FastCallKeywords(): pass keyword arguments as (key, value) pairs

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5ec1095612d6 by Victor Stinner in branch 'default':
Add _PyObject_FastCallKeywords()
https://hg.python.org/cpython/rev/5ec1095612d6

--
nosy: +python-dev

___
Python tracker 

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



[issue27830] Add _PyObject_FastCallKeywords(): pass keyword arguments as (key, value) pairs

2016-08-24 Thread STINNER Victor

STINNER Victor added the comment:

I pushed a change adding _PyObject_FastCallKeywords(), but this function is not 
used yet.

--

I didn't push the do_call() change: I attach a new (shorter) patch which 
changes it.

do_call.patch includes _PyCFunction_FastCallKeywords() for this line of 
Python/ceval.c:

+C_TRACE(result, _PyCFunction_FastCallKeywords(func, stack, nargs, 
nkwargs));

I don't understand exactly the purpose of C_TRACE(), so I chose to keep it to 
avoid any risk of regression.

--
Added file: https://bugs.python.org/file44215/do_call.patch

___
Python tracker 

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



[issue27848] C function calls: use Py_ssize_t rather than C int for number of arguments

2016-08-24 Thread STINNER Victor

STINNER Victor added the comment:

I pushed Py_ssize_t.patch without the "const" ;-) Thanks for the review Antoine.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-08-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Please move _parse_isotime to _strptime so that it can be called from C 
implementation.  Also, the new method should be documented.

--

___
Python tracker 

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



[issue27830] Add _PyObject_FastCallKeywords(): pass keyword arguments as (key, value) pairs

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0ff25676505d by Victor Stinner in branch 'default':
Issue #27830: Fix _PyObject_FastCallKeywords()
https://hg.python.org/cpython/rev/0ff25676505d

--

___
Python tracker 

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



[issue27841] Use fast call in method_call() and slot_tp_new()

2016-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 316e5de8a96b by Victor Stinner in branch 'default':
method_call() and slot_tp_new() now uses fast call
https://hg.python.org/cpython/rev/316e5de8a96b

--
nosy: +python-dev

___
Python tracker 

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



[issue27841] Use fast call in method_call() and slot_tp_new()

2016-08-24 Thread STINNER Victor

STINNER Victor added the comment:

> Tuples use a freelist ;-)

Honestly, I didn't expect that my "fast call" thing would give any significant 
speedup. I know that tuple allocator uses a free list.

Fast calls allows to avoid INCREF/DECREF on each argument, can use the C stack 
for short memory allocations and C arrays are not tracked by the garbage 
collector. It looks like all these minor things altogether provides a concrete 
and significant speedup on benchmarks.

So, I pushed call_prepend.patch with two changes:

* Fix a typo in the function name :-D
* Fix a reference leak in slot_tp_new() ;-)

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue25564] Document IDLE -python difference for `del __builtins__`

2016-08-24 Thread ppperry

Changes by ppperry :


--
title: Document that IDLE -python difference for `del __builtins__` -> Document 
 IDLE -python difference for `del __builtins__`

___
Python tracker 

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



[issue25564] Document IDLE -python difference for `del __builtins__`

2016-08-24 Thread ppperry

Changes by ppperry :


--
title: Document  IDLE -python difference for `del __builtins__` -> Document 
IDLE -python difference for `del __builtins__`

___
Python tracker 

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




[issue27855] 2to3: Wrong code output w/ has_key

2016-08-24 Thread E Rippey

New submission from E Rippey:

The "has_key" fixer in 2to3 produces wrong code on the following example:

input:"a.has_key(b)and x"
output:"b in aand x"

Note the lack of space before "and" in the input.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 273613
nosy: rippey.e
priority: normal
severity: normal
status: open
title: 2to3: Wrong code output w/ has_key
type: behavior
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



[issue27856] Issue while passing the parameter

2016-08-24 Thread Kameshwar Singh

New submission from Kameshwar Singh:

Hello Team,

I have one issue while using below function. I am using python 2.7.11 version 
on both OSX and Windows.

batch_result = SFbulk.get_batch_results(batch, result_id, job, maxfields=1)

If I am using above function on Windows machine, its working fine but on OSX 
its throwing error for maxfields=1 parameter.
And if I am using below code.
maxfields=1
batch_result = SFbulk.get_batch_results(batch, result_id, job, maxfields)

In this case, this is running fine on OSX but throwing error on Windows.

Please help me on this.

--
components: Windows
messages: 273614
nosy: kameshwar, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Issue while passing the parameter
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue27856] Issue while passing the parameter

2016-08-24 Thread Berker Peksag

Berker Peksag added the comment:

Please report this to sfbulk developers. sfbuld is not part of the Python 
standard library.

--
nosy: +berker.peksag
resolution:  -> not a bug
stage:  -> 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



[issue25847] CPython not using Visual Studio code analysis!

2016-08-24 Thread Steve Dower

Steve Dower added the comment:

> (Steve)> Doing the work to clean up the warnings really has to come second, 
> ultimately.
> Second to what?

Second to enabling all the warnings, which is where the thread started. I need 
to break my nasty habit on here of not quoting posts, but it's such a pain when 
I'm on my phone (latest post is a long way away and selection never works 
properly in this text box for some reason).

I'd like to see the WinSock warnings fixed as there are security implications 
around them (no proven vulnerabilities, but the point of the new APIs is to 
make that even less likely). I already disabled other warnings that didn't have 
the same risks.

Adding more checks probably isn't a bad idea. MSVC doesn't entirely overlap 
with coverity, so it could find things they miss. But that would create work 
for someone to go fix them.

--

___
Python tracker 

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



  1   2   >