[issue27329] Document behavior when CDLL is called with None as an argument on POSIX systems

2016-06-15 Thread Martin Panter

Changes by Martin Panter :


--
stage:  -> needs patch

___
Python tracker 

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



[issue24364] Not all defects pass through email policy

2016-06-15 Thread Martin Panter

Martin Panter added the comment:

In particular, I noticed InvalidHeaderDefect is not raised if a header line 
begins with a colon (:), and also MisplacedEnvelopeHeaderDefect, if a header 
line begins "From ", including a space, and is neither the first or last line 
of the header section.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27329] Document behavior when CDLL is called with None as an argument on POSIX systems

2016-06-15 Thread Jeffrey Esquivel Sibaja

New submission from Jeffrey Esquivel Sibaja:

On POSIX systems, when CDLL is called with None as an argument, it will call 
the system's dlopen() library function with NULL as it's filename parameter, 
causing the following behavior (as documented on dlopen's manpage):

"If filename is NULL, then the returned handle is for the main  program.  When 
given to dlsym(), this handle causes a search for a symbol in the main program, 
followed by all shared objects loaded at program startup, and then all shared 
objects loaded by dlopen() with the flag RTLD_GLOBAL."

But right now, this behavior is not explicitly documented anywhere which means 
users need to read ctypes' source code to find out if this would work.

--
assignee: docs@python
components: Documentation, ctypes
messages: 268641
nosy: Jeffrey Esquivel Sibaja, docs@python
priority: normal
severity: normal
status: open
title: Document behavior when CDLL is called  with None as an argument on POSIX 
systems
type: enhancement
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



[issue27328] Documentation corrections for email defects

2016-06-15 Thread Martin Panter

New submission from Martin Panter:

In trying to understand the defects from parsing an email Message object, and 
trying to use the raise_on_defect=True mode, I found a few inconsistencies with 
the documentation. I made a preliminary patch, but it may need adjusting.

1. There is no class called email.errors.Defect. My patch just removes the 
sentences mentioning this class. But an alternative might be to say 
handle/register_defect() are called with a subclass of MessageDefect.

2. Some defects are never raised, even if the policy says they should. I 
changed some of the wording to be less strict. But later I discovered Issue 
24364, so perhaps this is actually an implementation bug instead.

3(a). MessageDefect is an exception class, and its subclasses are raised 
directly with raise_on_defect=True. However the documentation is explicit that 
defect classes are not exceptions.

3(b). If you assume defects are not exceptions, the documentation leads you to 
expect a defect will raise Message/Header(Parse)Error. But the defect exception 
classes that are raised are not even subclasses of MessageError.

--
components: email
files: defect-doc.patch
keywords: patch
messages: 268640
nosy: barry, martin.panter, r.david.murray
priority: normal
severity: normal
status: open
title: Documentation corrections for email defects
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43404/defect-doc.patch

___
Python tracker 

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



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-15 Thread Martin Panter

Martin Panter added the comment:

Thanks for working on this. I did a pass over your patch and left a bunch of 
comments.

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



[issue26930] Upgrade installers to OpenSSL 1.0.2h

2016-06-15 Thread Steve Dower

Steve Dower added the comment:

That should be enough from your side, but let me run a test build before you 
tag in case we need to fix anything.

--

___
Python tracker 

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



[issue27320] ./setup.py --help-commands should sort extra commands

2016-06-15 Thread Pedro Lacerda

Pedro Lacerda added the comment:

Please look if these simple patches are acceptable. I don't know if standard 
commands are already in a sane order or if it also need to be sorted.

--
keywords: +patch
nosy: +Pedro Lacerda
Added file: http://bugs.python.org/file43402/sortextra.patch

___
Python tracker 

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



[issue27320] ./setup.py --help-commands should sort extra commands

2016-06-15 Thread Pedro Lacerda

Changes by Pedro Lacerda :


Added file: http://bugs.python.org/file43403/sortcommands.patch

___
Python tracker 

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



[issue25572] _ssl doesn't build on OSX 10.11

2016-06-15 Thread Ned Deily

Ned Deily added the comment:

Note that the Python Developer's Guide now contains instructions for how to 
build on OS X with third-party versions of OpenSSL:

https://docs.python.org/devguide/setup.html#build-dependencies

--

___
Python tracker 

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



[issue25572] _ssl doesn't build on OSX 10.11

2016-06-15 Thread Caleb Hattingh

Changes by Caleb Hattingh :


--
nosy: +cjrh

___
Python tracker 

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



[issue26930] Upgrade installers to OpenSSL 1.0.2h

2016-06-15 Thread Larry Hastings

Larry Hastings added the comment:

Yes, I'll accept this for 3.5.2 final.

Steve: do I need to do anything besides cherry-pick these revisions?

--

___
Python tracker 

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



[issue26930] Upgrade installers to OpenSSL 1.0.2h

2016-06-15 Thread Ned Deily

Changes by Ned Deily :


--
priority: critical -> release blocker

___
Python tracker 

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



[issue26930] Upgrade installers to OpenSSL 1.0.2h

2016-06-15 Thread Zachary Ware

Zachary Ware added the comment:

Finally got this done.

Benjamin and Larry, it would probably be best if this made it into 2.7.12 and 
3.5.2.  Is there anything special I need to do to make that happen?

(My sincere apologies for not getting it done before the RCs.)

--
nosy: +benjamin.peterson, larry
resolution:  -> fixed
stage: needs patch -> resolved

___
Python tracker 

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



[issue26930] Upgrade installers to OpenSSL 1.0.2h

2016-06-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 399d49d4acae by Zachary Ware in branch '2.7':
Issue #26930: Update Windows build to OpenSSL 1.0.2h
https://hg.python.org/cpython/rev/399d49d4acae

New changeset 155e665428c6 by Zachary Ware in branch '3.5':
Issue #26930: Update Windows build to OpenSSL 1.0.2h
https://hg.python.org/cpython/rev/155e665428c6

New changeset 3d726dbfca31 by Zachary Ware in branch 'default':
Issue #26930: Merge with 3.5
https://hg.python.org/cpython/rev/3d726dbfca31

--

___
Python tracker 

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



[issue27327] re documentation: typo "escapes consist of"

2016-06-15 Thread Ned Deily

Ned Deily added the comment:

Thanks for the report!

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



[issue27327] re documentation: typo "escapes consist of"

2016-06-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2a7dd5414485 by Ned Deily in branch '3.5':
Issue #27327: fix doc typo, noted by Jakub Wilk.
https://hg.python.org/cpython/rev/2a7dd5414485

New changeset b3f97ed4a904 by Ned Deily in branch 'default':
Issue #27327: null merge from 3.5
https://hg.python.org/cpython/rev/b3f97ed4a904

--
nosy: +python-dev

___
Python tracker 

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



[issue27327] re documentation: typo "escapes consist of"

2016-06-15 Thread Jakub Wilk

New submission from Jakub Wilk:

Documentation for the re module  
reads:

Unknown escapes consist of '\' and ASCII letter now raise a deprecation 
warning ...

This should be:

... escapes consisting of ...

--
assignee: docs@python
components: Documentation
messages: 268630
nosy: docs@python, jwilk
priority: normal
severity: normal
status: open
title: re documentation: typo "escapes consist of"
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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-15 Thread STINNER Victor

STINNER Victor added the comment:

> Re-reviewing your patch, I agree the What's New comment is still accurate.

Thanks for double checking ;-)

--

___
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-15 Thread Ethan Furman

Ethan Furman added the comment:

os.fspath() will be changed to ensure the output of calling obj.__fspath__() is 
a str or bytes object.

So the final behavior of calling os.fspath() will be to return a str or bytes 
or to raise an exception.

I'll update the code for this change, as well is the places in the stdlib that 
do/should be using os.fspath().

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Sorry, with all the different proposals kicking around, I somehow got the 
impression we'd reverted entirely to just reading from /dev/urandom without 
ever using the new syscall.

Re-reviewing your patch, I agree the What's New comment is still accurate.

--

___
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-15 Thread Nick Coghlan

Nick Coghlan added the comment:

There's an existing scenario test at 
https://hg.python.org/cpython/file/default/Lib/test/test_contextlib.py#l600 and 
https://hg.python.org/cpython/file/default/Lib/test/test_contextlib.py#l648 
that aims to ensure ExitStack unwinding and context setting matches the 
behaviour of actual with statements.

It wouldn't hurt to add some explicit checks to the new test for this 
particular bug, though.

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-15 Thread lorenzogotuned

lorenzogotuned added the comment:

I made it run from the root directory with:

python pip_tkinter/__main__.py

For sure the right way should be 

python -m pip_tkinter

The first view works fine for PyPi, the second one is just void. I added a 
issue for an enhancement at . 
We are going to fix what we have this weekend, for the sake of the first 
deadline.

--

___
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-15 Thread ppperry

Changes by ppperry :


--
components: +Installation

___
Python tracker 

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



[issue27301] Incorrect return codes in compile.c

2016-06-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Benjamin.

2.7 needed to fix just one line.

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



[issue27301] Incorrect return codes in compile.c

2016-06-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 51fe72949245 by Serhiy Storchaka in branch '3.5':
Issue #27301: Fixed incorrect return codes for errors in compile.c.
https://hg.python.org/cpython/rev/51fe72949245

New changeset c388b0751290 by Serhiy Storchaka in branch '2.7':
Issue #27301: Fixed incorrect return code for error in compile.c.
https://hg.python.org/cpython/rev/c388b0751290

New changeset 2b3cd7e4b2b6 by Serhiy Storchaka in branch 'default':
Issue #27301: Fixed incorrect return codes for errors in compile.c.
https://hg.python.org/cpython/rev/2b3cd7e4b2b6

--
nosy: +python-dev

___
Python tracker 

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



[issue27324] Error when building Python extension

2016-06-15 Thread Zachary Ware

Zachary Ware added the comment:

Using the wrong compiler, you may wind up with an extension that appears to 
work, and you may never have a problem with it if conditions are just right.  
This article[1] looks like a pretty good explanation of why you don't want to 
do it, though (note: I've only skimmed the article).

If you really want to shoot yourself in the foot, you can try running 
vcvarsall.bat yourself, then make sure MSsdk is set (distutils doesn't care 
what it's set to, just that it's set), and set DISTUTILS_USE_SDK (again, 
doesn't matter to what).

Also, note that this problem should be a thing of the past with Python 3.5+ and 
VS2015+.

[1] http://siomsystems.com/mixing-visual-studio-versions/

--

___
Python tracker 

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



[issue27324] Error when building Python extension

2016-06-15 Thread Mark

Mark added the comment:

Hi Zach,

Well, the strange thing is that other members of my team have successfully 
built C++ Python extensions with Visual Studio 13, but they compiled and built 
the pyd file with CMake (one used SWIG). So, it is possible. I just wanted to 
do it in a simpler way.

Regards,

Mark

 Message d'origine 
De : Zachary Ware 
À : tib...@netcourrier.com
Objet : [issue27324] Error when building Python extension
Date : 15/06/2016 15:42:36 CEST

Zachary Ware added the comment:

Hi Mark,

To build Python extensions on Windows, you need to have a compiler that can 
link to the same C runtime used by the Python interpreter. For 3.5, that means 
you need VS2015; VS2013 won't work.

--
nosy: +zach.ware
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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-06-15 Thread Xiang Zhang

Xiang Zhang added the comment:

Hi, I've written a patch to accomplish this in Py3.6.

This patch is much cleaner but has one drawback, when used as decorator 
factory, you have to specify name as a keyword argument. But considering the 
codes that have to been imported to check arguments, I think it's not bad. (I 
don't want to check `function` is a string or not.)

Also one side effect that I can not eliminate is when it is used as a normal 
function, the function instead of None is returned. I see the former patches 
get this problem too.

Hope to get feedback.

--
Added file: http://bugs.python.org/file43401/issue7769.patch

___
Python tracker 

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



[issue27324] Error when building Python extension

2016-06-15 Thread Zachary Ware

Zachary Ware added the comment:

Hi Mark,

To build Python extensions on Windows, you need to have a compiler that can 
link to the same C runtime used by the Python interpreter. For 3.5, that means 
you need VS2015; VS2013 won't work.

--
nosy: +zach.ware
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



[issue27319] Multiple item arguments for selection operations

2016-06-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I was puzzled because on one of my machines selection() returned ''.

But after updating the workspace the problem is gone. This is just a 
consequence of the issue26386 patch.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue27326] SIGSEV in test_window_funcs of test_curses

2016-06-15 Thread Xavier de Gaye

New submission from Xavier de Gaye:

This is with ncurses 6.0.

When running the test suite with:

./python -bb -E -Wd -m test -r -w -uall

test_curses fails as reported in issue 27323 and when the test runner re-runs 
test_curses in verbose mode at the end to test for a transient error, it 
happens sometimes that test_curses crashes. See the gdb backtrace attached.

--
components: Library (Lib)
files: gdb.log
messages: 268617
nosy: serhiy.storchaka, twouters, xdegaye
priority: normal
severity: normal
status: open
title: SIGSEV in test_window_funcs of test_curses
type: crash
versions: Python 3.6
Added file: http://bugs.python.org/file43400/gdb.log

___
Python tracker 

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



[issue27323] ncurses putwin() fails in test_module_funcs

2016-06-15 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue27318] Add support for symlinks to zipfile

2016-06-15 Thread Lukáš Doktor

Lukáš Doktor added the comment:

Hello Eryk,

thank you for the prompt response. I have only checked that using python2.6 on 
`wine` and there was no `os.symlink` support there. I'm not sure how to 
reasonably handle the `dir` flag for Windows as theoretically the symlink can 
point out of the zip file.

Do you know what happens when the symlink `dir` flag is set inappropriately? I 
guess it silently continues, but the link wont work, right?

Well I added the `except OSError` part, please let me know, whether this 
version is acceptable. The situation could only be better as without this patch 
both OSs are stuck with text files instead of symlinks, this way at least on 
Linux it should work properly.

--
Added file: http://bugs.python.org/file43399/zipfile-symlink.patch

___
Python tracker 

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



[issue26862] android: SYS_getdents64 does not need to be defined on android API 21

2016-06-15 Thread Xavier de Gaye

Changes by Xavier de Gaye :


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



[issue26196] Argparse breaks when a switch is given an argument beginning with a dash

2016-06-15 Thread SpaceOne

Changes by SpaceOne :


--
nosy: +spaceone

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2016-06-15 Thread SpaceOne

Changes by SpaceOne :


--
nosy: +spaceone

___
Python tracker 

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



[issue26862] android: SYS_getdents64 does not need to be defined on android API 21

2016-06-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4ef3a93e1be2 by Xavier de Gaye in branch 'default':
Issue #26862: SYS_getdents64 does not need to be defined on android API 21.
https://hg.python.org/cpython/rev/4ef3a93e1be2

--
nosy: +python-dev

___
Python tracker 

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



[issue27325] random failure of test_builtin

2016-06-15 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 13886.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> readline-related test_builtin failure

___
Python tracker 

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



[issue27325] random failure of test_builtin

2016-06-15 Thread Xavier de Gaye

New submission from Xavier de Gaye:

Not sure if this is relevant, I am using:
readline 6.3
ncurses 6.0

The test runs fine when run alone, with the 8991930 random seed:

$ ./python -bb -E -Wd -m test -r -w -uall --randseed 8991930
==  
[3/1338]
FAIL: test_input_tty_non_ascii (test.test_builtin.PtyTests)
--
Traceback (most recent call last):
  File "/home/xavier/src/python/default/Lib/test/test_builtin.py", line 1583, 
in test_input_tty_non_
ascii
self.check_input_tty("prompté", b"quux\xe9", "utf-8")
  File "/home/xavier/src/python/default/Lib/test/test_builtin.py", line 1574, 
in check_input_tty
self.assertEqual(input_result, expected)
AssertionError: 'quux' != 'quux\udce9'
- quux
+ quux\udce9
? +


==
FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests)
--
Traceback (most recent call last):
  File "/home/xavier/src/python/default/Lib/test/test_builtin.py", line 1587, 
in test_input_tty_non_
ascii_unicode_errors
self.check_input_tty("prompté", b"quux\xe9", "ascii")
  File "/home/xavier/src/python/default/Lib/test/test_builtin.py", line 1574, 
in check_input_tty
self.assertEqual(input_result, expected)
AssertionError: 'quux' != 'quux\udce9'
- quux
+ quux\udce9
? +

--
components: Tests
messages: 268613
nosy: martin.panter, xdegaye
priority: normal
severity: normal
status: open
title: random failure of test_builtin
type: behavior
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



[issue27324] Error when building Python extension

2016-06-15 Thread Mark

New submission from Mark:

I'd like to build a C++ extension for Python. I took a simple C file from a 
tutorial and wrote the setup.py file. But when I run the command:
python setup.py build_ext --inplace

I get the following error:
error: Unable to find vcvarsall.bat

This file is located in "c:\Program Files (x86)\Microsoft Visual Studio 
12.0\vc\vcvarsall.bat" but even when I run it and set all environment 
variables, python.exe still tries to find it. I added this path to the PATH but 
it didn't solve the issue.

--
components: Distutils
messages: 268612
nosy: Mark53, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Error when building Python extension
type: compile error
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



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

2016-06-15 Thread Rolf Krahl

Rolf Krahl added the comment:

Python 3.6.0a2 has been released this week.  I guess, we need to speed up a 
bit.  I really would like to see this issue fixed in 3.6.0 final.

I updated Demian's patch to match the current Python sources, see the 
attachment.  I also addressed the issue in urllib.request.  It turned out that 
this was a little bit more involved then just removing the corresponding if 
statement from AbstractHTTPHandler.do_request_() as suggested above: if the 
Content-Length has been added by the lib, a caller of urllib might assume to 
find that header also to be set in the Request object afterwards.  At least, 
some tests do.

But I still believe, urllib.request should refrain from trying to calculate the 
content length itself, but rather rely on http.client for this, because it is 
crucial that the interpretation of the various body representations (buffer, 
file, iterable) while calculating this length matches the code in http.client 
that reads the body when sending it to the server.

So, I amended Demian's patch as follows:

1. change the helper _get_content_length() in http.client to a static method of 
HTTPConnection in order to allow urllib.request to call it.

2. review get_content_length(), there where a few issues in special cases.

3. add an optional argument encode_chunked to 
http.client.HTTPConnection.request().  If set to True, HTTPConnection will do 
the chunk encoding also if the Transfer-Encoding header is set.  This is 
needed, because urllib.request now sets all required headers in the request, 
including Transfer-Encoding if needed.  But does not handle the chunk encoding 
itself.

4. if the request has a non-empty body and Content-Length is not set, 
urllib.request.AbstractHTTPHandler calls 
http.client.HTTPConnection.get_content_length to calculate the content length.  
If this returns None, it sets the Transfer-Encoding: chunked header.

--
Added file: http://bugs.python.org/file43398/issue12319_7.patch

___
Python tracker 

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



[issue26582] asyncio documentation links to wrong CancelledError

2016-06-15 Thread Berker Peksag

Berker Peksag added the comment:

CancelledError documentation needs to be updated to mention that it is an alias 
for 'concurrent.futures.CancelledError'. We also need to update all 
``:exc:`~concurrent.futures.CancelledError``` usages in 
Doc/library/asyncio*.rst. I'd prefer to reuse the description of 
https://docs.python.org/3.5/library/concurrent.futures.html#concurrent.futures.CancelledError

--
nosy: +berker.peksag
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue26923] asyncio.gather drops cancellation

2016-06-15 Thread Johannes Ebke

Johannes Ebke added the comment:

On rereading my original description, it really is not clearly described why 
the calling Task ends up surviving. 

Attached is a patch to the 3.5.1 asyncio/tasks.py which adds some print 
statements in Task.cancel().

If I execute the cancellation_test.py with the patch applied, the output looks 
like this:


Cancelling the task:  wait_for=<_GatheringFuture pending 
cb=[Task._wakeup()]> cb=[Task._wakeup()]>
Entered Task.cancel() for task  wait_for=<_GatheringFuture pending 
cb=[Task._wakeup()]> cb=[Task._wakeup()]>
Task is not done() and we have a _fut_waiter: Cancelling fut_waiter 
<_GatheringFuture pending cb=[Task._wakeup()]>
Entered Task.cancel() for task  result=None>
Task is done(), refusing to cancel
Great, _fut_waiter has agreed to be cancelled. We can now also return True
Cancellation returned:  True
All children finished OK, setting _GatheringFuture results!
Finished gathering.
Proof that this is running even though it was cancelled


The Task keeps on running because Task.cancel() trusts its _fut_waiter task to 
handle the cancellation correctly if its cancel() method returns True. If it 
returns False, it handles the Cancellation itself.

In this case, that _fut_waiter continues on, and proceeds to set results etc. 
so that the calling tasks cannot distinguish this from a CancellationError 
which has been deliberately caught.

I hope this explanation is a bit clearer than the first one.

--
keywords: +patch
Added file: http://bugs.python.org/file43397/asyncio_task_prints.patch

___
Python tracker 

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



[issue27323] ncurses putwin() fails in test_module_funcs

2016-06-15 Thread Xavier de Gaye

New submission from Xavier de Gaye:

This is with ncurses 6.0.

$ ./python -m test -v -u curses -m test_module_funcs test_curses
== CPython 3.6.0a2+ (default:e3bb87952c62, Jun 15 2016, 08:24:47) [GCC 6.1.1 
20160501]
==   Linux-4.6.1-2-ARCH-x86_64-with-arch little-endian
==   hash algorithm: siphash24 64bit
==   /home/xavier/src/python/default/build/test_python_17932
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
Run tests sequentially
0:00:00 [1/1] test_curses
test_module_funcs (test.test_curses.TestCurses)
Test module-level functions ... 
ERROR

==
ERROR: test_module_funcs (test.test_curses.TestCurses)
Test module-level functions
--
Traceback (most recent call last):
  File "/home/xavier/src/python/default/Lib/test/test_curses.py", line 212, in 
test_module_funcs
self.stdscr.putwin(f)
_curses.error: putwin() returned ERR

--
components: Library (Lib)
messages: 268608
nosy: serhiy.storchaka, twouters, xdegaye
priority: normal
severity: normal
status: open
title: ncurses putwin() fails in test_module_funcs
type: behavior
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



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-06-15 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



[issue27322] test_compile_path fails when python has been installed

2016-06-15 Thread Xavier de Gaye

New submission from Xavier de Gaye:

==
FAIL: test_compile_path (test.test_compileall.CompileallTests)
--
Traceback (most recent call last):
  File "/home/xavier/src/python/default/Lib/test/test_compileall.py", line 118, 
in test_compile_path
self.assertTrue(compileall.compile_path(quiet=2))
AssertionError: False is not true


Changing the 'quiet' flag value to 0, gives:

test_compile_path (test.test_compileall.CompileallTests) ... Skipping current 
directory
Listing '/usr/local/lib/python36.zip'...
Can't list '/usr/local/lib/python36.zip'
Listing '/home/xavier/src/python/default/Lib'...
Listing '/home/xavier/src/python/default/Lib/plat-x86_64-linux-gnu'...
Can't list '/home/xavier/src/python/default/Lib/plat-x86_64-linux-gnu'
Listing '/home/xavier/src/python/default/build/lib.linux-x86_64-3.6-pydebug'...
Listing '/home/xavier/.local/lib/python3.6/site-packages'...
Listing '/usr/local/lib/python3.6/site-packages'...
Compiling '/usr/local/lib/python3.6/site-packages/easy_install.py'...
*** PermissionError: [Errno 13] Permission denied: 
'/usr/local/lib/python3.6/site-packages/__pycache
__/easy_install.cpython-36.pyc.139734863394416'
FAIL


Note that this test has already been fixed for another problem in issue 26101.

--
components: Tests
messages: 268607
nosy: brett.cannon, haypo, xdegaye
priority: low
severity: normal
stage: needs patch
status: open
title: test_compile_path fails when python has been installed
type: behavior
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



[issue27177] re match.group should support __index__

2016-06-15 Thread Xiang Zhang

Xiang Zhang added the comment:

Attach a patch to add this feature to Py3.6.

--
nosy: +xiang.zhang
Added file: http://bugs.python.org/file43396/issue27177.patch

___
Python tracker 

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



[issue27301] Incorrect return codes in compile.c

2016-06-15 Thread Benjamin Peterson

Benjamin Peterson added the comment:

lgtm

--
nosy: +benjamin.peterson

___
Python tracker 

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