[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-11 Thread STINNER Victor

STINNER Victor added the comment:

Right, I built Python on FreeBSD, it's likely that make was not GNU make.

--

___
Python tracker 

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



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-11 Thread Martin Panter

Martin Panter added the comment:

Survey of different mechanisms for running Python to generate files:

Tools/scripts/generate_opcode_h.py and Parser/asdl_c.py: configure.ac tries 
python3.6, python3, python, etc commands. It either runs the scripts with what 
it finds, or substitutes an “echo” command that emits an explanation but does 
not fail. One disadvantage of this was it needed a script to be made compatible 
with Python 2.5 .

Python/makeopcodetargets.py: Always run as a Unix command with shebang “#! 
/usr/bin/env python”.

Objects/typeslots.py: Always run via $(PYTHON) command, which defaults to 
“python$(EXE)”. No magic configure stuff, but could be manually adjusted by 
using “make PYTHON=[. . .]”. This is the only remaining use of the $(PYTHON) 
makefile variable in 3.6, but it is shared with other stuff in 2.7.

An idea I had a while ago was to only run these scripts with a special Make 
command, eliminating the need for “make touch”. Going over a discussion earlier 
this year, Nick Coghlan 
 said a disadvantage 
of this is that you have to remember the special Make command to use in the 
rare event that your work affects a generated. Maybe this could be overcome 
with documentation, warning messages, etc. Argument Clinic code and the 
configure script are not automatically regenerated.

Another potential idea is a flag (either to configure, or to Make) to manually 
disable or enable all running of Python scripts. When disabled, it would use 
the existing generated files, and perhaps warn if they are out of date. Or by 
default perhaps the warning could be an error, with the resolution to either 
tell it to use a pre-installed Python, or explicitly run the build with the 
existing generated files.

--

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread Martin Mokrejs

New submission from Martin Mokrejs:

Hi,
  it seems at least python 3.4.3-r5 on a Gentoo Linux.

Failed to build these modules:
_cryptnis

--
files: build.log
messages: 270163
nosy: mmokrejs
priority: normal
severity: normal
status: open
title: Cannot link _crypt and _nis modules on a host with glibc-2.12
type: compile error
versions: Python 3.4
Added file: http://bugs.python.org/file43684/build.log

___
Python tracker 

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



[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Xiang Zhang

New submission from Xiang Zhang:

Errors regarding "embedded NUL character" were changed from TypeError to 
ValueError, in r92365, issue22215, but the doc doesn't get updated. Add a patch 
to apply the change in doc.

--
assignee: docs@python
components: Documentation
files: null_characters_doc.patch
keywords: patch
messages: 270164
nosy: docs@python, serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
status: open
title: Replace TypeError with ValueError in doc regarding "embedded NUL 
character"
versions: Python 3.6
Added file: http://bugs.python.org/file43685/null_characters_doc.patch

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread Martin Mokrejs

Martin Mokrejs added the comment:

Also is an issue with 3.5.1-r3:

x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -L. 
-L/scratch/mmokrejs/gentoo/lib -L/scratch/mmokrejs/gentoo/usr/lib 
-Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -O2 
-pipe -march=native -fwrapv 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/_decimal.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/basearith.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/constants.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/context.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/convolute.o
 build/temp.linux-x86_64-3.5/scratch/mmokre
 
js/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/crt.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/difradix2.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/fnt.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/fourstep.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/io.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/memory.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/mpdecimal.o
 build/temp.linux-x8
 
6_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/numbertheory.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/sixstep.o
 
build/temp.linux-x86_64-3.5/scratch/mmokrejs/gentoo/var/tmp/portage/dev-lang/python-3.5.1-r3/work/Python-3.5.1/Modules/_decimal/libmpdec/transpose.o
 -L. -L/scratch/mmokrejs/gentoo/lib -L/scratch/mmokrejs/gentoo/usr/lib 
-lpython3.5 -o 
build/lib.linux-x86_64-3.5/_decimal.cpython-35-x86_64-linux-gnu.so
*** WARNING: renaming "_crypt" since importing it failed: 
build/lib.linux-x86_64-3.5/_crypt.cpython-35-x86_64-linux-gnu.so: undefined 
symbol: crypt
*** WARNING: renaming "nis" since importing it failed: 
build/lib.linux-x86_64-3.5/nis.cpython-35-x86_64-linux-gnu.so: undefined 
symbol: yp_master

Following modules built successfully but were removed because they could not be 
imported:
_cryptnis

--

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread Martin Mokrejs

Changes by Martin Mokrejs :


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



[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Xiang Zhang

Xiang Zhang added the comment:

Just for a note, there has already been an issue26401 fixing the function.rst. 
Upload a new patch adding versionchanged tag.

--
Added file: http://bugs.python.org/file43686/null_characters_doc_v2.patch

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-11 Thread Antti Haapala

Antti Haapala added the comment:

Ah so it seems. Somehow I thought __format__ was slotted, but that is not the 
case and it needs to be looked up, and what is worse, of course a tuple needs 
to be built as well. 

Oh well, at least it should be quite minimal to make it be faster than `f(x)` 
there, which necessarily has one extra bound method call and interpretation of 
format string as the overhead, so there's minimally at least 30 % performance 
boost to achieve.

--

___
Python tracker 

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



[issue27472] add the 'unix_shell' attribute to test.support

2016-07-11 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The attached patch ignores the following test modules listed in msg266084:

Lib/distutils/tests/test_build_scripts.py|68 col 31| ("#!/bin/sh\n"
Lib/distutils/tests/test_install_scripts.py|57 col 38| write_script("shell.sh", 
("#!/bin/sh\n"
reason:
The scripts are not meant to be run.

Lib/test/test__osx_support.py|46 col 24| f.write("#!/bin/sh\n/bin/echo OK\n")
Lib/test/test__osx_support.py|58 col 24| f.write("#!/bin/sh\n/bin/echo 
ExpectedOutput\n")
Lib/test/test__osx_support.py|149 col 28| f.write("#!/bin/sh\n/bin/echo " + 
c_output)
Lib/test/test__osx_support.py|205 col 24| f.write("#!/bin/sh\nexit 255")
reason:
These tests run only on the darwin platform.

Lib/test/test_subprocess.py|1645 col 15| sh = '/bin/sh'
Lib/test/test_subprocess.py|1647 col 33| # Test will fail if /bin/sh is a 
symlink to csh.
reason:
This test is specific to bash or ksh.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file43687/unix_shell_27472.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-07-11 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

The new paragraph about Homebrew for OSX is useful, we can close this issue.

--
status: open -> closed

___
Python tracker 

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



[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

But while we are here, it would be worth to change "NUL character" and "NUL 
byte" to "null character" or "null byte" as most used in the documentation and 
the code.

--
assignee: docs@python -> serhiy.storchaka
stage:  -> commit review
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



[issue26826] Expose new copy_file_range() syscall in os module.

2016-07-11 Thread Marcos Dione

Marcos Dione added the comment:

Fixed extra space and semicolon (?!?!). Also, I'm getting 500 errors from 
riedvelt when I try to reply to comments.

--
Added file: http://bugs.python.org/file43688/copy_file_range.diff

___
Python tracker 

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



[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Xiang Zhang

Xiang Zhang added the comment:

Yes. I noticed the change but didn't change it. Now add it.

--
Added file: http://bugs.python.org/file43689/null_characters_doc_v3.patch

___
Python tracker 

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




[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python strings contain characters, not bytes.

--

___
Python tracker 

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



[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Xiang Zhang

Xiang Zhang added the comment:

Sorry, I didn't notice the difference.

--
Added file: http://bugs.python.org/file43690/null_characters_doc_v4.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-07-11 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> out of date
stage: needs patch -> resolved
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



[issue26081] Implement asyncio Future in C to improve performance

2016-07-11 Thread INADA Naoki

INADA Naoki added the comment:

In my patch, test_asyncio runs against C version Future.

I saw how test_json tests against C version and pure Python version.
But test_asyncio is more larger than test_json.

Before working on it, could someone give me idea to run whole test_asyncio
with and without C version Future easily?

And, which is master repository of asyncio? github? or hg.python.org?
If github, can I send separated pull request changing test_asyncio after
this patch is merged?

--

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread R. David Murray

R. David Murray added the comment:

Since you are using the gentoo build system to build this, the bug report 
should go to the gentoo project, as indicated by the message at the end of your 
build log.  If they find a bug in python itself, then it can be reported here 
(Arfrever at least can reopen the issue if needed).  More likely it is a gentoo 
configuration issue.

--
nosy: +Arfrever, r.david.murray
resolution:  -> third party
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



[issue23804] SSLSocket.recv(0) receives up to 1024 bytes

2016-07-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df908a9d97a6 by Martin Panter in branch 'default':
Issue #23804: Merge spelling and NEWS fixes from 3.5
https://hg.python.org/cpython/rev/df908a9d97a6

--

___
Python tracker 

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



[issue25523] Correct "a" article to "an" article

2016-07-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 651f7addf4a8 by Martin Panter in branch '2.7':
Issue #25523: Correct "a" article to "an" article
https://hg.python.org/cpython/rev/651f7addf4a8

--

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread Martin Mokrejs

Martin Mokrejs added the comment:

Ah, thank you for a quick answer.

The problem is not with a Gentoo, the problem is with python which needs too 
new libc or libnss or libcrypt.

I am re-opening, why cannot I compile newer python version on glibc-2.12 host? 
This is not a problme with python-2.7, at least.

https://bugs.gentoo.org/show_bug.cgi?id=587664

--
status: closed -> open

___
Python tracker 

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



[issue23804] SSLSocket.recv(0) receives up to 1024 bytes

2016-07-11 Thread Martin Panter

Martin Panter added the comment:

Oops, that last merge is not related to this

--

___
Python tracker 

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



[issue25523] Correct "a" article to "an" article

2016-07-11 Thread Martin Panter

Changes by Martin Panter :


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



[issue27482] heap-buffer-overflow on address 0x6250000078ff

2016-07-11 Thread mtowalski

New submission from mtowalski:

PoC is attached.
Version: 2.7.12

=
==4461==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x625078ff 
at pc 0x00508e70 bp 0x7ffe3e88db60 sp 0x7ffe3e88db58
READ of size 1 at 0x625078ff thread T0
#0 0x508e6f in tok_nextc 
/home/mtowalski/tmp/python/Python-2.7.12/Parser/tokenizer.c:954:28
#1 0x4ff581 in tok_get 
/home/mtowalski/tmp/python/Python-2.7.12/Parser/tokenizer.c:1232:17
#2 0x4ff581 in PyTokenizer_Get 
/home/mtowalski/tmp/python/Python-2.7.12/Parser/tokenizer.c:1681:0
#3 0x4fae5d in parsetok 
/home/mtowalski/tmp/python/Python-2.7.12/Parser/parsetok.c:159:16
#4 0x7c9a92 in PyParser_ASTFromFile 
/home/mtowalski/tmp/python/Python-2.7.12/Python/pythonrun.c:1499:15
#5 0x7c9e49 in PyRun_FileExFlags 
/home/mtowalski/tmp/python/Python-2.7.12/Python/pythonrun.c:1354:11
#6 0x7c8a7e in PyRun_SimpleFileExFlags 
/home/mtowalski/tmp/python/Python-2.7.12/Python/pythonrun.c:948:13
#7 0x4f80b9 in Py_Main 
/home/mtowalski/tmp/python/Python-2.7.12/Modules/main.c:640:23
#8 0x7feaeb493f44 in __libc_start_main 
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287:0
#9 0x42adc5 in _start ??:?

0x625078ff is located 1 bytes to the left of 8192-byte region 
[0x62507900,0x62509900)
allocated by thread T0 here:
#0 0x4c8d3c in malloc ??:?
#1 0x4fe75d in PyTokenizer_FromFile 
/home/mtowalski/tmp/python/Python-2.7.12/Parser/tokenizer.c:759:29

SUMMARY: AddressSanitizer: heap-buffer-overflow 
(/home/mtowalski/tmp/python/Python-2.7.12/python+0x508e6f)
Shadow bytes around the buggy address:
  0x0c4a7fff8ec0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff8ed0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff8ee0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff8ef0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4a7fff8f00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c4a7fff8f10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa[fa]
  0x0c4a7fff8f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4a7fff8f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4a7fff8f40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4a7fff8f50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4a7fff8f60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:   fa
  Heap right redzone:  fb
  Freed heap region:   fd
  Stack left redzone:  f1
  Stack mid redzone:   f2
  Stack right redzone: f3
  Stack partial redzone:   f4
  Stack after return:  f5
  Stack use after scope:   f8
  Global redzone:  f9
  Global init order:   f6
  Poisoned by user:f7
  Container overflow:  fc
  Array cookie:ac
  Intra object redzone:bb
  ASan internal:   fe
  Left alloca redzone: ca
  Right alloca redzone:cb
==4461==ABORTING

--
components: Interpreter Core
files: python-heap-buffer-overflow-e6f-581-e5d.py
messages: 270181
nosy: mtowalski
priority: normal
severity: normal
status: open
title: heap-buffer-overflow on address 0x625078ff
type: crash
versions: Python 2.7
Added file: 
http://bugs.python.org/file43691/python-heap-buffer-overflow-e6f-581-e5d.py

___
Python tracker 

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



[issue27392] Add a server_side keyword parameter to create_connection

2016-07-11 Thread Yury Selivanov

Yury Selivanov added the comment:

> How about we use connect_socket() or a variant on that name? That feels 
> similar to connect_{read,write}_pipe(), which also take a protocol_factory 
> and an already-opened I/O object.

I like the idea to use "connect_" prefix here.  How about simple 
"connect_accepted_socket"?

--

___
Python tracker 

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



[issue26081] Implement asyncio Future in C to improve performance

2016-07-11 Thread Yury Selivanov

Yury Selivanov added the comment:

> Before working on it, could someone give me idea to run whole test_asyncio
with and without C version Future easily?

asyncio uses loop.create_future() to create sockets.  I'd suggest you to create 
two base test classes: one that monkeypatches loop.create_future to return pure 
python Future in its setUp method; an another, that makes create_future to 
return a C version of the Future.

The derive some unittests from those base classes (which will effectively 
double the number of tests).

> And, which is master repository of asyncio? github? or hg.python.org?
If github, can I send separated pull request changing test_asyncio after
this patch is merged?

The master repo for asyncio is github, but since the C version won't be a part 
of asyncio (it will be checked in only in CPython source tree), I think it's 
fine to continue the work here, on bugs.python.org.

--

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread R. David Murray

R. David Murray added the comment:

Can you demonstrate the problem without involving the gentoo build system, 
using a vanilla tarball downloaded from our site?

--

___
Python tracker 

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



[issue27392] Add a server_side keyword parameter to create_connection

2016-07-11 Thread Guido van Rossum

Guido van Rossum added the comment:

Sounds Good To Me.

--

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread Martin Mokrejs

Martin Mokrejs added the comment:

Interesting, using the system-wide RedHat stuff I can compile vanilla 
Python-3.4.5. See attached nohup.out. I tried to stick to the same configure 
arguments as Gentoo's package manager used.

I also tried to compile the vanilla tarball under Gentoo::Prefix and wow, it 
also went through (as fat as _crypt is concerned). See nohup-gentoo-prefix.out

--
Added file: http://bugs.python.org/file43692/nohup.out

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread Martin Mokrejs

Changes by Martin Mokrejs :


Added file: http://bugs.python.org/file43693/nohup-gentoo-prefix.out

___
Python tracker 

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



[issue27480] Cannot link _crypt and _nis modules on a host with glibc-2.12

2016-07-11 Thread R. David Murray

R. David Murray added the comment:

Now you see why I guessed that it was a Gentoo issue :)  Or an issue in 
whatever it is you are using, since it doesn't sound like vanilla gentoo, 
either.

So, I'm closing this again.  If you find something you really think is a bug in 
*our* build process, you can open a new ticket for it.

--
status: open -> closed

___
Python tracker 

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



[issue27483] Expose HEAD_LOCK/HEAD_UNLOCK in pystate.c

2016-07-11 Thread Maciej Fijalkowski

New submission from Maciej Fijalkowski:

Hi

The use case here is for C-based statistical profilers. When running vmprof on 
linux/os x, you can get the current thread state from 
PyThreadState_GetUnchecked or a similar solution. However, on windows you need 
to walk all the interpreter state, for which there is an API. However that API 
is only ever used with locks (HEAD_LOCK/HEAD_UNLOCK), which are not exposed, 
which turns API mostly useless.

--
messages: 270188
nosy: fijall, haypo
priority: normal
severity: normal
status: open
title: Expose HEAD_LOCK/HEAD_UNLOCK in pystate.c
type: enhancement

___
Python tracker 

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



[issue27484] Some Examples in Format String Syntax are incorrect or poorly worded

2016-07-11 Thread Rufus V. Smith

New submission from Rufus V. Smith:

In section 6.1.3 Format String Syntax, some examples have incorrect or poorly 
worded comments:

Original:

"Harold's a clever {0!s}"# Calls str() on the argument first
"Bring out the holy {name!r}"# Calls repr() on the argument first
"More {!a}"  # Calls ascii() on the argument first

Suggested Changes:

"Harold's a clever {0!s}"# Calls str() on first positional argument
"Bring out the holy {name!r}"# Calls repr() on the named argument 'name'
"More {!a}"  # Calls ascii() on first positional argument 
(v. 3.1 and later)

--
assignee: docs@python
components: Documentation
messages: 270189
nosy: RufusVS, docs@python
priority: normal
severity: normal
status: open
title: Some Examples in Format String Syntax are incorrect or poorly worded

___
Python tracker 

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



[issue27483] Expose HEAD_LOCK/HEAD_UNLOCK in pystate.c

2016-07-11 Thread STINNER Victor

STINNER Victor added the comment:

Is the profiler running in the same process than the profiled application?

Vmprof uses a signal handler, right? HEAD_LOCK is a mutex, acquire a mutex
is not async-signal safe :-( Is it an issue?

--

___
Python tracker 

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



[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-11 Thread Steve Dower

Steve Dower added the comment:

I don't want Python to get into the business of changing the command line.

I've started looking into building the shell extension so we can pass through 
arguments correctly. Once we have this, there are likely other features we can 
add to it (maybe extract __author__/__version__ and display it in tooltips? 
Certainly some of the requests for IDLE could be accommodated).

--

___
Python tracker 

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



[issue27483] Expose HEAD_LOCK/HEAD_UNLOCK in pystate.c

2016-07-11 Thread Maciej Fijalkowski

Maciej Fijalkowski added the comment:

On windows the profiler runs in a separate thread and pauses/restarts other 
threads (hence the requirements are slightly different). HEAD_LOCK etc. are def 
not async-signal safe, but it's not an issue on linux

--

___
Python tracker 

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



[issue27485] urllib.splitport -- is it official or not?

2016-07-11 Thread Guido van Rossum

New submission from Guido van Rossum:

I've seen and written some code that uses urllib.splitport() [1], but it's not 
in the export list, nor in the docs. However I see no easy other way to perform 
the same function. Should we make it official, or get rid of it? It's used 
internally in urllib/request.py [2]. There's a test for it in test_urlparse.py 
[3], but another test [4] also acknowledges that it's "undocumented" (which 
suggests that the author of that test didn't know what to do with it either).

Same question for the others in that list [4]:
'splitattr', 'splithost', 'splitnport', 'splitpasswd',
'splitport', 'splitquery', 'splittag', 'splittype', 'splituser',
'splitvalue',
'Quoter', 'ResultBase', 'clear_cache', 'to_bytes', 'unwrap',

References:
[1] https://hg.python.org/cpython/file/tip/Lib/urllib/parse.py#l956
[2] https://hg.python.org/cpython/file/tip/Lib/urllib/request.py#l106
[3] https://hg.python.org/cpython/file/tip/Lib/test/test_urlparse.py#l1015
[4] https://hg.python.org/cpython/file/tip/Lib/test/test_urlparse.py#l946

--
messages: 270193
nosy: gvanrossum
priority: normal
severity: normal
status: open
title: urllib.splitport -- is it official or not?
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27464] Document that SplitResult & friends are namedtuples

2016-07-11 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue27484] Some Examples in Format String Syntax are incorrect or poorly worded

2016-07-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think all of these read fine as-is though I would change "argument first" to  
"first argument" or just "argument".   Adding the word "positional" is a 
distractor from what the comments are trying to communicate.

The version numbering is normally done with a directive and outside of the 
examples.

--
nosy: +rhettinger

___
Python tracker 

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



[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2a34cef7681b by Ned Deily in branch 'default':
Issue #27285: Cleanup "suspicious" warnings.
https://hg.python.org/cpython/rev/2a34cef7681b

--

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-07-11 Thread Brian Martin

Changes by Brian Martin :


--
nosy: +osvdb
status: pending -> open

___
Python tracker 

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



[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-11 Thread Ned Deily

Ned Deily added the comment:

Thanks for the fix up, Steve.  For 3.6.0a3, I chose to just change the 3.3 and 
3.4 whatsnew references to just in-line code without any links.  If anyone 
wants something fancier, please feel free to expand on it (after the release).

(BTW, Steve, when you submit an updated patch, please do so against the current 
tip of the branch; most of your update patch had already been committed by 
Brett.)

--
nosy: +ned.deily
status: open -> closed

___
Python tracker 

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



[issue27484] Some Examples in Format String Syntax are incorrect or poorly worded

2016-07-11 Thread Zachary Ware

Zachary Ware added the comment:

I don't think "argument first" should be changed to "first argument": the point 
is that the converter is called on the argument before it's formatted into the 
string, the call is done "first".

--
nosy: +zach.ware

___
Python tracker 

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



[issue27486] FTPlib hangs on some pasv responses

2016-07-11 Thread 송병우

New submission from 송병우:

FTPlib hangs on PASV responses when the connected server is within its local 
network.
Here's my fix that checks the target address with ipaddress lib:
https://github.com/python/cpython/pull/28/files

--
components: Library (Lib)
messages: 270198
nosy: 송병우
priority: normal
severity: normal
status: open
title: FTPlib hangs on some pasv responses
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



[issue27486] FTPlib hangs on some pasv responses

2016-07-11 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +giampaolo.rodola
stage:  -> test needed

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-11 Thread Ethan Furman

Ethan Furman added the comment:

If you are constructing your own base Enum type, which would you rather do?

class BaseZeroEnum(Enum):
   "initial integer is 0"
   _start_ = 0
   ...

or

class BaseZeroEnum(Enum, start=0):
   "initial integer is 0"
   ...

?  Oh, and yes if you specify a starting number you also activate the 
AutoNumber feature.

--

___
Python tracker 

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



[issue27485] urllib.splitport -- is it official or not?

2016-07-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

splitport() doesn't work with IPv6 ("[::1]", see issue18191), nor with 
authority ("user:passw...@example.com"). Note that there is a almost duplicate 
function splitnport(). The existence of two similar functions that behave 
differently in corner cases looks confusing. And seems splitport() and 
splitnport() not always used correctly internally (see issue20271).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-11 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jul 11, 2016, at 07:05 PM, Ethan Furman wrote:

>class BaseZeroEnum(Enum, start=0):
>   "initial integer is 0"
>   ...
>
>?  Oh, and yes if you specify a starting number you also activate the
>AutoNumber feature.

I like the way this one looks.

--

___
Python tracker 

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



[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-11 Thread Wolfgang Maier

New submission from Wolfgang Maier:

As a result of Issue14285 Python 3.5.2 now imports packages in runpy. 
_get_module_details before calling importlib.util.find_spec.

Although I'm not sure how important this is, I wanted to report that this new 
behaviour can have a side-effect under pretty exotic circumstances. When 
__init__.py imports the same module that is supposed to be invoked via the -m 
switch and that module replaces its own entry in sys.modules with another 
object, this causes importlib.util.find_spec to fail with a *very* cryptic:

Error while finding spec for 'package.module' (ValueError: 
package.module.__spec__ is not set)

without an exception traceback.

I have no idea whether any other package would be affected by this, but it took 
me quite some time today to trace the cause of this and it is not what you'd 
expect from a maintenance release. I think the changed behaviour in runpy 
should at least be documented (beyond just mentioning the issue in the 
changelog).

--
components: Library (Lib)
messages: 270202
nosy: martin.panter, ncoghlan, wolma
priority: normal
severity: normal
status: open
title: -m switch regression in Python 3.5.2 (under rare circumstances)
type: behavior
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



[issue27484] Some Examples in Format String Syntax are incorrect or poorly worded

2016-07-11 Thread R. David Murray

R. David Murray added the comment:

Agree with Zach.  The example comments are correct as written, especially when 
considered in the context of the preceding example.

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



[issue16858] tarfile silently hides errors

2016-07-11 Thread Марк Коренберг

Марк Коренберг added the comment:

http://stackoverflow.com/questions/1964806/short-read-from-filesystem-when-can-it-happen

Disk-based filesystems generally use uninterruptible reads, which means that 
the read operation generally cannot be interrupted by a signal. Network-based 
filesystems sometimes use interruptible reads, which can return partial data or 
no data. (In the case of NFS this is configurable using the intr mount option.) 
They sometimes also implement timeouts.

> can return partial data

Seems reading tar-file from NFS-filesystem may trigger that bug.

--

___
Python tracker 

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



[issue27488] Underscore not showing Mac El Capitan

2016-07-11 Thread Monti Carlo

New submission from Monti Carlo:

Trying to type in underscore and it just made a space... Downloaded 3.5.2 and 
it works fine.

--
components: IDLE
messages: 270205
nosy: Monti Carlo
priority: normal
severity: normal
status: open
title: Underscore not showing Mac El Capitan
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



[issue16858] tarfile silently hides errors

2016-07-11 Thread Марк Коренберг

Марк Коренберг added the comment:

What the hell! sorry again :(

--

___
Python tracker 

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



[issue26877] tarfile use wrong code when read from fileobj

2016-07-11 Thread Марк Коренберг

Марк Коренберг added the comment:

http://stackoverflow.com/questions/1964806/short-read-from-filesystem-when-can-it-happen

Disk-based filesystems generally use uninterruptible reads, which means that 
the read operation generally cannot be interrupted by a signal. Network-based 
filesystems sometimes use interruptible reads, which can return partial data or 
no data. (In the case of NFS this is configurable using the intr mount option.) 
They sometimes also implement timeouts.

> can return partial data

Seems reading tar-file from NFS-filesystem may trigger that bug.

--

___
Python tracker 

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



[issue27488] Underscore not showing Mac El Capitan

2016-07-11 Thread Zachary Ware

Zachary Ware added the comment:

This is due to changes in the default font settings for IDLE.  You can boost 
your font size and/or pick a different font, and your underscores will appear.

3.4 is no longer receiving bug fixes (or binary installers), so there's nothing 
we can do here.

--
nosy: +zach.ware
resolution:  -> out of date
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



[issue27489] Win 10, choco install python gets message: Access to the path 'C:\WINDOWS\system32\**\**.exe.ignore' is denied.

2016-07-11 Thread Joel Handwell

New submission from Joel Handwell:

While installing python 3.5.1 using chocolatey package manager on Windows 10, I 
got following message:

python3 v3.5.1
WARNING: The names of some imported commands from the module 
'chocolateyInstaller' include unapproved verbs that might make them less 
discoverable. To find the commands with unapproved verbs, run the Import-Module 
command again with the Verbose parameter. For a list of approved verbs, type 
Get-Verb.
Downloading python3 64 bit
  from 'https://www.python.org/ftp/python/3.5.1/python-3.5.1-amd64.exe'
Progress: 100% - Saving 28.25 MB of 28.25 MB (29627072/29627072)
Download of python3Install.exe (28.25 MB) completed.
Installing python3...
python3 has been installed.
Access to the path 'C:\WINDOWS\system32\Boot\winload.exe.ignore' is denied.
Access to the path 'C:\WINDOWS\system32\Boot\winresume.exe.ignore' is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\difx64.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\DPTopologyApp.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\DPTopologyAppv2_0.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\GfxUIEx.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\Gfxv2_0.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\Gfxv4_0.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\igfxCUIService.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\igfxEM.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\igfxext.exe.ignore'
 is denied.
Access to the path 
'C:\WINDOWS\system32\DriverStore\FileRepository\64dp4256.inf_amd64_9191bdaf5e95d43e\igfxHK.exe.ignore'
 is denied.

--
components: Installation
messages: 270209
nosy: joelhandwell
priority: normal
severity: normal
status: open
title: Win 10, choco install python gets message: Access to the path 
'C:\WINDOWS\system32\**\**.exe.ignore' is denied.
type: behavior
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



[issue27489] Win 10, choco install python gets message: Access to the path 'C:\WINDOWS\system32\**\**.exe.ignore' is denied.

2016-07-11 Thread Joel Handwell

Changes by Joel Handwell :


--
resolution:  -> third party

___
Python tracker 

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



[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2016-07-11 Thread Mihai Capotă

Changes by Mihai Capotă :


--
nosy: +mihaic

___
Python tracker 

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



[issue27489] Win 10, choco install python gets message: Access to the path 'C:\WINDOWS\system32\**\**.exe.ignore' is denied.

2016-07-11 Thread Eryk Sun

Changes by Eryk Sun :


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



[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Brad Larsen

Brad Larsen added the comment:

It looks like sys.executable is *not* always an absolute path.  In Python 2.7:

$ which python2.7
/opt/local/bin/python2.7
$ cd /opt/local/bin
$ ../bin/python2.7 -m 'import sys; print(sys.executable)'
/opt/local/bin/../bin/python2.7

Also in Python 3.5:

$ which python3.5
/opt/local/bin/python3.5
$ cd /opt/local/bin
$ ../bin/python3.5 -m 'import sys; print(sys.executable)'
/opt/local/bin/../bin/python3.5

--
nosy: +blarsen

___
Python tracker 

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



[issue27490] ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) dependency

2016-07-11 Thread Thomas Perl

New submission from Thomas Perl:

Problem description: Trying to cross-compile $(LIBRARY) (libpython2.7.a for 
example) causes "pgen" to be built, even when it's not used in the 
cross-compilation case (only a file copy is done to generate $(GRAMMAR_H) and 
$(GRAMMAR_C)).


The current rule for $(PGEN) in Makefile.pre.in does not include $(CFLAGS):

https://hg.python.org/cpython/file/tip/Makefile.pre.in#l810

This causes problems when $(CFLAGS) changes the ARM float ABI, e.g.:

CFLAGS="-mfloat-abi=hard"

This causes the following issues at link time:

 1. The .o files that get linked into "pgen" are built with CFLAGS
(which is good, because some of them are used for libpython as well)
 2. When the "pgen" binary gets built, the $(CFLAGS) are not used
 3. Compiler fails to build "pgen" with different float ABI settings

=

[...]
arm-none-eabi-gcc -c -fno-strict-aliasing -march=armv6k -mtune=mpcore 
-mfloat-abi=hard -mtp=soft -fomit-frame-pointer -ffunction-sections -DARM11 
-D_3DS -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude 
-I./Include   -DPy_BUILD_CORE -o Parser/pgenmain.o Parser/pgenmain.c
arm-none-eabi-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  
Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o 
Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o 
Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o 
Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o 
Parser/printgrammar.o Parser/pgenmain.o  -o Parser/pgen
/Users/thp/pkg/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld:
 error: Parser/acceler.o uses VFP register arguments, Parser/pgen does not
/Users/thp/pkg/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld:
 failed to merge target specific data of file Parser/acceler.o
[...]

=

Note that the error message is repeated for all .o files linked into pgen, I've 
only included one here for demonstration purposes. The following patch (against 
a Python 2.7.12 tarball, similar fix for Hg tip and Python 3) fixes the issue 
for me:

=
diff -u Python-2.7.12/Makefile.pre.in Python-2.7.12-fix/Makefile.pre.in
--- Python-2.7.12/Makefile.pre.in   2016-06-25 23:49:31.0 +0200
+++ Python-2.7.12-fix/Makefile.pre.in   2016-07-12 00:17:02.0 +0200
@@ -698,7 +698,7 @@
fi
 
 $(PGEN):   $(PGENOBJS)
-   $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
+   $(CC) $(OPT) $(CFLAGS) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
 
 Parser/grammar.o:  $(srcdir)/Parser/grammar.c \
$(srcdir)/Include/token.h \
=

Also note that the same $(CFLAGS) needs to be added to the rule for 
$(BUILDPYTHON) if one wants to build that as well, but in my case, I only did a 
"make libpython2.7.a", and that indirectly depends on pgen ($(LIBRARY) -> 
$(LIBRARY_OBJS) -> $(PYTHON_OBJS) -> Python/graminit.o -> $(GRAMMAR_C) -> 
$(GRAMMAR_H) -> $(PGEN), which results in that error message, so libpython2.7.a 
can't be built).

Another fix could be to make it so that $(GRAMMAR_H) does not depend on $(PGEN) 
if $(cross_compiling) is "yes" (if you read the rule contents for $(GRAMMAR_H), 
you'll find that indeed $(PGEN) isn't used at all if $(cross_compiling) is 
"yes". At least for GNU make, it might be possible to avoid building "pgen" in 
that case as follows and removing $(PGEN) from the default dependencies of 
$(GRAMMAR_H):

ifneq ($(cross_compiling),yes)
$(GRAMMAR_H): $(PGEN)
endif

If this is a more acceptable solution, one could probably rewrite the "test 
"$(cross_compiling" != "yes"; then..." part of the make rules from $(GRAMMAR_H) 
and $(GRAMMAR_C) with Make's ifeq, here's a patch for that instead (this also 
makes the dependencies more clear, since $(GRAMMAR_H) does not depend on 
$(GRAMMAR_INPUT) for the cross-input case, as it is not used):

=
diff -u Python-2.7.12/Makefile.pre.in Python-2.7.12-fix/Makefile.pre.in
--- Python-2.7.12/Makefile.pre.in   2016-06-25 23:49:31.0 +0200
+++ Python-2.7.12-fix/Makefile.pre.in   2016-07-12 00:37:43.0 +0200
@@ -680,22 +680,21 @@
 
 Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c 
$(srcdir)/Modules/posixmodule.h
 
+ifeq ($(cross_compiling),yes)
+$(GRAMMAR_H): $(srcdir)/Include/graminit.h
+   @$(MKDIR_P) Include
+   cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp
+   mv $(GRAMMAR_H).tmp $(GRAMMAR_H)
+$(GRAMMAR_C): $(srcdir)/Python/graminit.c
+   cp $(srcdir)/Python/graminit.c $(GRAMMAR_C).tmp
+   mv $(GRAMMAR_C).tmp $(GRAMMAR_C)
+else
 $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
@$(MKDIR_P) Include
-   # Avoid copying the file onto itself for an in-tree build
-   if test "$(cross_compiling)" != "yes"; then \
-   $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
-   else \
-   cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \
-   

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-11 Thread John Hagen

John Hagen added the comment:

>class BaseZeroEnum(Enum, start=0):
>   "initial integer is 0"
>   ...

I also think this looks better.

--

___
Python tracker 

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



[issue27131] Unit test random shuffle

2016-07-11 Thread Jonathan Kross

Jonathan Kross added the comment:

Just giving this one a bump to see if it can be applied soon.

--

___
Python tracker 

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



[issue27490] ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) dependency

2016-07-11 Thread Thomas Perl

Thomas Perl added the comment:

Also related: https://bugs.python.org/issue22359

--

___
Python tracker 

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



[issue27485] urllib.splitport -- is it official or not?

2016-07-11 Thread Martin Panter

Martin Panter added the comment:

Previous discussion: Issue 1722, Issue 11009.

In Python 2, most of the split- functions _have_ been in urllib.__all__ since 
revision 5d68afc5227c (2.1). Also, since revision c3656dca65e7 (Issue 1722, 
2.7.4), the RST documentation does mention that at least some of them are 
deprecated in favour of the “urlparse” module. However there are no index 
entries, and splitport() is not mentioned by name.

In Python 3, these functions wandered into urllib.parse. There is no RST 
documentation, and the functions are not in __all__ (which was added for Issue 
13287 in 3.3).

I think you can use the documented urllib.parse API instead of splitport(), but 
it is borderline unwieldy:

>>> netloc = "[::1]:80"
>>> urllib.parse.splitport(netloc)  # [Brackets] kept!
('[::1]', '80')
>>> split = urlsplit("//" + netloc); (split.hostname, split.port)
('::1', 80)
>>> split = SplitResult("", netloc, path="", query="", fragment=""); 
>>> (split.hostname, split.port)
('::1', 80)

I opened Issue 23416 with a suggestion that would make SplitResult a bit 
simpler to use here. But maybe it makes the implementation too complicated.

I don’t think the non-split-names (Quoter, etc) are in much doubt. They were 
never in __all__.

--
nosy: +martin.panter

___
Python tracker 

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



[issue26608] RLock undocumented behavior in case of multiple acquire

2016-07-11 Thread ahxxm

ahxxm added the comment:

As seen from commit log, all return type are double back-quoted, this could be 
a rendering error.

I think this commit somehow makes it clear that RLock is a thread-level 
reentrant lock, some code example of suggested usage might be helpful though.

--
hgrepos: +348
nosy: +ahxxm

___
Python tracker 

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



[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Eryk Sun

Eryk Sun added the comment:

"/opt/local/bin/../bin/python2.7" is an absolute path. 

>>> os.path.isabs('/opt/local/bin/../bin/python2.7')
True

It's not relative to the working directory.

--
nosy: +eryksun

___
Python tracker 

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



[issue27485] urllib.splitport -- is it official or not?

2016-07-11 Thread Guido van Rossum

Guido van Rossum added the comment:

Aha. I see you are referring to this note in the 2.7 docs for urllib:

urllib also exposes certain utility functions like splittype, splithost and
others parsing URL into various components. But it is recommended to use
:mod:`urlparse` for parsing URLs rather than using these functions directly.
Python 3 does not expose these helper functions from :mod:`urllib.parse`
module.

This is somewhat ironic because those functions still exist in urllib.parse.

I've rewritten my code using your suggestions of using urllib.parse.urlparse().

Shall we just close this issue or is there still an action item? (Maybe 
actually delete those functions whose deletion has been promised so long ago, 
or at least rename them to _splitport() etc.?)

--

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-11 Thread Ethan Furman

Ethan Furman added the comment:

Here's the code.  I'll do the doc changes next.

--
keywords: +patch
Added file: http://bugs.python.org/file43694/issue26988.stoneleaf.01.patch

___
Python tracker 

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



[issue672115] Assignment to __bases__ of direct object subclasses

2016-07-11 Thread Memeplex

Memeplex added the comment:

I understand Michael's comment http://bugs.python.org/issue672115#msg14169 but 
I'm failing to see how it's directly related to this issue: as Michael himself 
said it's even relevant for the object-subclass-object hack or for any 
hierarchy whatsoever. Is the comment warning about the entire writable-bases 
idea? It feels to me like the behavior should be consistently extended or 
consistently banned, but currently some cases work, another cases don't, and 
there seems to be no clear rationale supporting this state of affairs. Am I 
wrong?

--
nosy: +memeplex

___
Python tracker 

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



[issue16858] tarfile silently hides errors

2016-07-11 Thread Berker Peksag

Changes by Berker Peksag :


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

___
Python tracker 

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



[issue16858] tarfile silently hides errors

2016-07-11 Thread Berker Peksag

Changes by Berker Peksag :


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

___
Python tracker 

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



[issue16858] tarfile silently hides errors

2016-07-11 Thread Berker Peksag

Changes by Berker Peksag :


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

___
Python tracker 

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



[issue26081] Implement asyncio Future in C to improve performance

2016-07-11 Thread INADA Naoki

INADA Naoki added the comment:

Thanks.  I'll working on test_asyncio in next few days.

--

___
Python tracker 

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



[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Ned Deily

Ned Deily added the comment:

@blarsen, and there's something strange about your example.  '-m' won't work 
with a real python executable, presumably you meant '-c'.  And judging from the 
paths involved, I'm guessing you are using MacPorts on OS X.  With either 
MacPorts or any other OS X framework build, you wouldn't see results like that 
with -c.

 ../bin/python3.5 -c 'import sys; print(sys.executable)'
/opt/local/bin/python3.5
../bin/python2.7 -c 'import sys; print(sys.executable)'
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

So I'm guessing what's in ../bin/python3.7 and ../bin/python3.5 is something 
other than the normal python bootstrap binaries.

--
nosy: +ned.deily

___
Python tracker 

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



[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Brad Larsen

Brad Larsen added the comment:

@eryksun, you are right!  The output *is* an absolute path as far as 
`os.path.isabs` is concerned.

@ned.deily, you are right about my example --- I transcribed it wrong, and it 
should be `-c`.

The system in question is not a Mac OS system, but a Linux system with newer 
Python versions than what come with the system installed to /opt/local.  These 
are compiled from source, but without any modifications.

I'm commenting here because I'm seeing the `test_sys` test from the regression 
suite fail in a slightly modified version of Python that ships with a product.  
In particular, in Lib/test/test_sys.py around line 640, we have this:

@unittest.skipIf(sys.base_prefix != sys.prefix,
 'Test is not venv-compatible')
def test_executable(self):
# sys.executable should be absolute
self.assertEqual(os.path.abspath(sys.executable), sys.executable)

Yes, /opt/local/bin/../bin/python3.5 is an absolute path as far as 
`os.path.isabs` is concerned, but 
`os.path.abspath('/opt/local/bin/../bin/python3.5')` gives 
'/opt/local/bin/python3.5', and the test fails.  So maybe the documentation is 
fine but the test is wrong?

--

___
Python tracker 

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



[issue13402] Document absoluteness of sys.executable

2016-07-11 Thread Ned Deily

Ned Deily added the comment:

@blarsen, OK, but if you want to pursue this, please open a new issue against 
the current versions.  This issue was closed years ago and against earlier 
versions so your comments will not get acted on.

--

___
Python tracker 

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



[issue16858] tarfile silently hides errors

2016-07-11 Thread Martin Panter

Changes by Martin Panter :


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

___
Python tracker 

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



[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-11 Thread Nick Coghlan

Nick Coghlan added the comment:

Since this worked in 3.5.1, and fails in 3.5.2, I think it's reasonable to 
consider if it makes sense to find a way to make it work again in 3.5.3 (and 
then decide separately whether or not we want to preserve the capability in 
3.6.0).

Specifically, restoring the old behaviour would mean that:

1. *If* the -m target module already exists in sys.modules after importing the 
parent module; and
2. The already imported target module doesn't have a __spec__ attribute; then
3. Ignore that already imported artifact when figuring out what to run as 
__main__

However, the problem with doing that is that this *is* an instance of code that 
falls into the double-import trap: 
http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#executing-the-main-module-twice

Even in 3.5.1, the affected module is getting executed twice - once from the 
package's __init__.py, and once via the "-m" switch. For cases that *don't* 
overwrite the module in sys.modules, a solution that resolves the issue in a 
backwards and forwards compatible way is to split the module being executed via 
-m as follows:

* Move the pieces needed by mypkg.__init__ into a "mypkg._mymain_support" module
* In that module, set "__name__ = 'mypkg.mymain'" to preserve pickle 
compatibility and docs introspection
* Change both "mypkg.__init__" and "mypkg.mymain" to import the shared 
components from the "mypkg._mymain_support" module

However, you still run into a problem with figuring out when the replacement 
module should be written into sys.modules - if that stays in "mypkg.mymain" it 
will no longer get done as a side effect of importing "mypkg", while if it 
moves into "mypkg._mymain_support", you'll still run into the problem reported 
here in 3.5.2

--
nosy: +brett.cannon, eric.snow

___
Python tracker 

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



[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-11 Thread Michael Lazar

Michael Lazar added the comment:

Submitting an updated patch; simplified the implementation and updated 
test_mailcap.py

--
Added file: http://bugs.python.org/file43695/mailcap_v2.patch

___
Python tracker 

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



[issue27083] PYTHONCASEOK is ignored on Windows

2016-07-11 Thread Brian Herman

Brian Herman added the comment:

In python 3.6 from hg it has been fixed.

>>> glob.glob('*.py')
['setup.py', 'test.py']
>>> import test
>>> test.__file__
'C:\\Users\\brian\\Desktop\\cpython\\test.py'
>>>

--
nosy: +Brian.Herman

___
Python tracker 

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



[issue27491] Errors when building with UNICODE character set

2016-07-11 Thread Minmin Gong

New submission from Minmin Gong:

Switch the pythoncore's character set to UNICODE, some compile errors about 
Windows APIs show up. A patch is attached to fix this.

--
components: Windows
files: 0001-Fix-building-with-UNICODE-character-set.patch
keywords: patch
messages: 270228
nosy: Minmin.Gong, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Errors when building with UNICODE character set
type: compile error
versions: Python 3.5
Added file: 
http://bugs.python.org/file43696/0001-Fix-building-with-UNICODE-character-set.patch

___
Python tracker 

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



[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Thanks Xiang.

--

___
Python tracker 

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



[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 420030a5e854 by Serhiy Storchaka in branch '3.5':
Issue #27481: Docummented that ValueError is now raised instead of TypeError
https://hg.python.org/cpython/rev/420030a5e854

New changeset 00b9c734af87 by Serhiy Storchaka in branch 'default':
Issue #27481: Docummented that ValueError is now raised instead of TypeError
https://hg.python.org/cpython/rev/00b9c734af87

--
nosy: +python-dev

___
Python tracker 

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



[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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