[issue32119] test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 Tiger 3.6 with "ValueError: cannot convert float NaN to integer"

2017-11-23 Thread STINNER Victor

New submission from STINNER Victor :

test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 
Tiger 3.6 with "ValueError: cannot convert float NaN to integer":

http://buildbot.python.org/all/#/builders/46/builds/60

0:52:21 load avg: 1.46 [378/406/1] test_multiprocessing_forkserver crashed 
(Exit code 1)

Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/forkserver.py",
 line 196, in main
_serve_one(s, listener, alive_r, old_handlers)
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/forkserver.py",
 line 231, in _serve_one
code = spawn._main(child_r)
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/spawn.py", 
line 114, in _main
prepare(preparation_data)
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/spawn.py", 
line 223, in prepare
_fixup_main_from_name(data['init_main_from_name'])
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/spawn.py", 
line 249, in _fixup_main_from_name
alter_sys=True)
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/runpy.py", line 201, in 
run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/runpy.py", line 153, in 
_get_module_details
code = loader.get_code(mod_name)
  File "", line 762, in get_code
ValueError: cannot convert float NaN to integer

Timeout (0:25:00)!
Thread 0xa000d000 (most recent call first):
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/connection.py",
 line 379 in _recv
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/connection.py",
 line 407 in _recv_bytes
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/connection.py",
 line 250 in recv
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/managers.py", 
line 757 in _callmethod
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/multiprocessing/managers.py", 
line 987 in acquire
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/_test_multiprocessing.py",
 line 1044 in test_notify_all
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/case.py", line 
605 in run
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/case.py", line 
653 in __call__
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/suite.py", 
line 122 in run
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/suite.py", 
line 84 in __call__
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/suite.py", 
line 122 in run
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/suite.py", 
line 84 in __call__
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/suite.py", 
line 122 in run
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/suite.py", 
line 84 in __call__
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/unittest/runner.py", 
line 176 in run
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/support/__init__.py", 
line 1888 in _run_suite
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/support/__init__.py", 
line 1932 in run_unittest
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/libregrtest/runtest.py", 
line 172 in test_runner
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/libregrtest/runtest.py", 
line 173 in runtest_inner
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/libregrtest/runtest.py", 
line 127 in runtest
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/libregrtest/runtest_mp.py",
 line 71 in run_tests_slave
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/libregrtest/main.py", 
line 516 in _main
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/libregrtest/main.py", 
line 509 in main
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/libregrtest/main.py", 
line 584 in main
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/regrtest.py", line 
46 in _main
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/regrtest.py", line 
50 in 
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/runpy.py", line 85 in 
_run_code
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/runpy.py", line 193 in 
_run_module_as_main


Moreover, when test_multiprocessing_forkserver was run a second time, a 
different test failed, test_forkserver_sigkill():


Re-running test 'test_multiprocessing_forkserver' in verbose mode
(...)
test_forkserver_sigint 
(test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_forkserver_sigkill 
(test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... FAIL
test_lose_target_ref 
(test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
(...)
==
FAIL: test_forkserver_sig

[issue32119] test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 Tiger 3.6 with "ValueError: cannot convert float NaN to integer"

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

"ValueError: cannot convert float NaN to integer": this error occurred on 
int(float), where the float comes from os.stat()

File "", line 762, in get_code

Lib/importlib/_bootstrap_external.py:

def get_code(self, fullname):
...
st = self.path_stats(source_path)
...
source_mtime = int(st['mtime']) <~~ HERE
...

def path_stats(self, path):
st = _path_stat(path)
return {'mtime': st.st_mtime, 'size': st.st_size}

def _path_stat(path):
return _os.stat(path)

=> The float NaN comes from os.stat().st_mtime.


Implementation of os.stat().st_mtime in Modules/posixmodule.c:

static PyObject*
_pystat_fromstructstat(STRUCT_STAT *st)
{
...
#if defined(HAVE_STAT_TV_NSEC)
ansec = st->st_atim.tv_nsec;
mnsec = st->st_mtim.tv_nsec;
cnsec = st->st_ctim.tv_nsec;
#elif defined(HAVE_STAT_TV_NSEC2)
ansec = st->st_atimespec.tv_nsec;
mnsec = st->st_mtimespec.tv_nsec;
cnsec = st->st_ctimespec.tv_nsec;
#elif defined(HAVE_STAT_NSEC)
ansec = st->st_atime_nsec;
mnsec = st->st_mtime_nsec;
cnsec = st->st_ctime_nsec;
#else
ansec = mnsec = cnsec = 0;
#endif
fill_time(v, 7, st->st_atime, ansec);
fill_time(v, 8, st->st_mtime, mnsec);
fill_time(v, 9, st->st_ctime, cnsec);
...
}

static void
fill_time(PyObject *v, int index, time_t sec, unsigned long nsec)
{
...
float_s = PyFloat_FromDouble(sec + 1e-9*nsec);  <~~ HERE
...
PyStructSequence_SET_ITEM(v, index+3, float_s);
...
}


Extract of the ./configure script output:

checking for tv_nsec in struct stat... no
checking for tv_nsec2 in struct stat... yes

=> configure defines HAVE_STAT_TV_NSEC2


We need sec and nsec values from fill_time() to debug this issue.

--

___
Python tracker 

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



[issue32119] test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 Tiger 3.6 with "ValueError: cannot convert float NaN to integer"

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

It may also be compiler issue.

* CPU: Intel x86
* compiler: GCC 4.0.1 (Apple Computer, Inc. build 5367)
* CFLAGS: -fno-strict-aliasing -Wsign-compare -g -O0 -Wall -Wstrict-prototypes
* OS: macOS Tiger
* Kernel: Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; 
root:xnu-792.25.20~1/RELEASE_I386

Extract of pythoninfo:

os.uname: posix.uname_result(sysname='Darwin', nodename='osx', 
release='8.11.1', version='Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 
PDT 2007; root:xnu-792.25.20~1/RELEASE_I386', machine='i386')
platform.architecture: 32bit
platform.platform: Darwin-8.11.1-i386-32bit
platform.python_implementation: CPython
sys.version: 3.6.3+ (heads/3.6:ae3c5c7, Nov 22 2017, 20:39:07)  [GCC 4.0.1 
(Apple Computer, Inc. build 5367)]
sysconfig[CFLAGS]: -fno-strict-aliasing -Wsign-compare -g -O0 -Wall 
-Wstrict-prototypes

--

___
Python tracker 

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



[issue13986] ValueError: cannot convert float NaN to integer

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

See also bpo-32119.

--

___
Python tracker 

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



[issue32119] test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 Tiger 3.6 with "ValueError: cannot convert float NaN to integer"

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

This issue is very similar, likely the same bug, than bpo-13986.

--

___
Python tracker 

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



[issue32119] test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 Tiger 3.6 with "ValueError: cannot convert float NaN to integer"

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

Similar error: bpo-14028, "Using a 32-bit Python 2.6.5 on a Linux system", 
reported at 2012-02-16.

--

___
Python tracker 

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



[issue32119] test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 Tiger 3.6 with "ValueError: cannot convert float NaN to integer"

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue32119] test_notify_all() of test_multiprocessing_forkserver failed on Python on x86 Tiger 3.6 with "ValueError: cannot convert float NaN to integer"

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

Interesting info about NaN on Intel x86:

https://stackoverflow.com/questions/14021763/c-multiplication-or-addition-floats-results-nan

"The multiplication is being performed in the x87 registers, and a 
floating-point stack overflow has occurred due to (possibly unrelated) earlier 
operations in your program's execution. When the processor is in this failure 
state, all computations performed on the x87 registers produce NaN results."

--

For FreeBSD, Python main() starts with:

/* 754 requires that FP exceptions run in "no stop" mode by default,
 * and until C vendors implement C99's ways to control FP exceptions,
 * Python requires non-stop mode.  Alas, some platforms enable FP
 * exceptions by default.  Here we disable them.
 */
#ifdef __FreeBSD__
fedisableexcept(FE_OVERFLOW);
#endif

--

___
Python tracker 

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



[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4453

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 1f15111a6e15d52f6b08907576ec61493cd59358 by Victor Stinner in 
branch 'master':
bpo-32030: Add _PyMainInterpreterConfig.pythonhome (#4513)
https://github.com/python/cpython/commit/1f15111a6e15d52f6b08907576ec61493cd59358


--

___
Python tracker 

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



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-23 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4454

___
Python tracker 

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



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-23 Thread Tzu-ping Chung

Tzu-ping Chung  added the comment:

I have created a PR #4517 from the patch. Would it be better to track the 
malloc problem in a new issue?

As for why this never caused any problems… msilib is pretty standalone, and not 
one of the most used modules. It is also pretty trivial to roll your own 
solution with ctypes (or any FFI library), which is what I did when I hit this 
bug.

--

___
Python tracker 

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



[issue28538] _socket module cross-compilation error on android-24

2017-11-23 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 5ad7ef8e420de8a54fb30ed37362194c6b96012c by xdegaye in branch 
'master':
bpo-28538: Revert all the changes (now using Android Unified Headers) (GH-4479)
https://github.com/python/cpython/commit/5ad7ef8e420de8a54fb30ed37362194c6b96012c


--

___
Python tracker 

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



[issue28538] _socket module cross-compilation error on android-24

2017-11-23 Thread Xavier de Gaye

Change by Xavier de Gaye :


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



[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-23 Thread Tzu-ping Chung

Tzu-ping Chung  added the comment:

I made a shot to address the free() call. Hopefully this makes sense.

--

___
Python tracker 

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



[issue29040] building Android with android-ndk-r14

2017-11-23 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset c06c22e9a9fb9326e79fcf1551601eacc1fd457d by xdegaye in branch 
'master':
bpo-29040: Support building Android with Unified Headers (GH-4492)
https://github.com/python/cpython/commit/c06c22e9a9fb9326e79fcf1551601eacc1fd457d


--

___
Python tracker 

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



[issue29040] building Android with android-ndk-r14

2017-11-23 Thread Xavier de Gaye

Change by Xavier de Gaye :


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



[issue30576] http.server should support HTTP compression (gzip)

2017-11-23 Thread Pierre Quentel

Pierre Quentel  added the comment:

On the Github site Raymond Hettinger is mentioned as the reviewer. I don't know 
how to contact him, can anyone ask him if he can review the PR on time for 
inclusion in Python 3.7 ?

I understand that it's difficult to find time for this and that there are many 
pending PRs ; I can't judge if this one is more or less important than the 
others, but the issue has been discussed for a few months now, the code has 
been improved after many iterations, so hopefully it should not be too far from 
approval.

--

___
Python tracker 

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



[issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined

2017-11-23 Thread Xavier de Gaye

Change by Xavier de Gaye :


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



[issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined

2017-11-23 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 5ce1069a6ff0d5443074d33ba1d403ccd2eaf3d3 by xdegaye in branch 
'master':
bpo-28762: Revert last commit (now using Android Unified Headers) (GH-4488)
https://github.com/python/cpython/commit/5ce1069a6ff0d5443074d33ba1d403ccd2eaf3d3


--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Nick Coghlan

Nick Coghlan  added the comment:

Also see https://bugs.python.org/issue1660500 for the original Python 3.0 
change to hide the iteration variable.

While the test suite already covers some interesting scoping edge cases as 
result of that initial patch, I think one we're currently missing is the nested 
comprehension case:

>>> [[x for x in range(1, i)] for i in range(2, 5)]
[[1], [1, 2], [1, 2, 3]]

--

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Abinaya

New submission from Abinaya :

Hi,

We have installed python-3.6.0 on our RedHat 6 machine.
when we are trying to import sqlite module in python_v36 we could see below 
issue,

[root@euca-10-254-72-197 rpmbuild]$ python
Python 3.6.0 (default, Nov 23 2017, 12:46:54)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.

import sqlite3
Traceback (most recent call last):
File "", line 1, in
File "/opt/python/x86_64/3.6.0-1/lib/python3.6/sqlite3/init.py", 
line 23, in
from sqlite3.dbapi2 import *
File "/opt/python/x86_64/3.6.0-1/lib/python3.6/sqlite3/dbapi2.py", 
line 27, in
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

While installing the python manually we could see below line on installation log

Failed to build these modules:
_hashlib _ssl

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

It seems to be sqlite is getting broken.

Below sqlite versions are already installed on my machine:

[root@euca-10-254-72-197 rpmbuild]$ rpm -qa | grep sqlite
qt-sqlite-4.6.2-28.el6_5.x86_64
sqlite-devel-3.6.20-1.el6_7.2.x86_64
sqlite-3.6.20-1.el6_7.2.x86_64
libdbi-dbd-sqlite-0.8.3-5.1.el6.x86_64
**

Also sqlite3 seems to be working fine without any issue on python2.
Can anyone please help me on this.

Regards,
Abinaya

--
components: Build
messages: 306803
nosy: abinaya
priority: normal
severity: normal
status: open
title: python 3.6.0 is not importing sqlite3
type: crash
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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I see nothing special in `[[x for x in range(1, i)] for i in range(2, 5)]`. 
This should be equivalent to:

__result = []; __i = None
try:
for __i in range(2, 5):
__result2 = []; __x = None
try:
for __x in range(1, __i)
__result2.append(__x)
__result.append(__result2)
finally:
del __result2, __x
finally:
del __i

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Nick Coghlan

Nick Coghlan  added the comment:

Another slight variant to that test case to make sure the inner comprehension 
actually generates a closure reference in the current implementation:

>>> [[x+y for x in range(2) for y in range(1, i)] for i in range(2, 5)]
[[1, 2], [1, 2, 2, 3], [1, 2, 3, 2, 3, 4]]

These are the kind of challenges that drove of us towards the current 
implementation. While the status quo definitely has its downsides, those 
downsides at least all flow directly from "There's an implicit nested function 
there that you're not expecting".

Yury took all this into account when designing the interaction between `await` 
and comprehensions (which is why that's in a better state), but for `yield` we 
inherited the existing behaviour of any other nested function.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Nick Coghlan

Nick Coghlan  added the comment:

Sure, you can technically do that, but you'll have to rewrite most of the 
symtable pass in the compiler, since you won't be able to re-use the current 
recursive descent algorithms (which are designed to handle function scopes). 
That ran afoul of "If the implementation is hard to explain, it's a bad idea."

Where that gets particularly nasty is when you nest comprehensions with the 
*same* iteration variable name:

>>> [[i for i in range(2)] for i in range(2)]
[[0, 1], [0, 1]]

Now your name generator needs to be clever enough to account for how many 
levels deep it is. You also run into the lexical scoping problem anyway once a 
lambda expression shows up:

>>> [[(lambda i=i: i)() for i in range(2)] for i in range(2)]
[[0, 1], [0, 1]]
>>> [[(lambda: i)() for i in range(2)] for i in range(2)]
[[0, 1], [0, 1]]

As noted earlier, not impossible to resolve, but for from the "simple" option 
that folks seem to believe it is (and which I thought it would be before I 
actually tried to implement it while respecting Python's lexical scoping rules).

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is straightforward.

__result = []; __i = None
try:
for __i in range(2, 5):
__result2 = []; __x = __y = None
try:
for __x in range(2):
for __y in range(1, __i):
__result2.append(__x + __y)
__result.append(__result2)
finally:
del __result2, __x, __y
finally:
del __i

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

Nick,

> Yury took all this into account when designing the interaction between 
> `await` and comprehensions (which is why that's in a better state), but for 
> `yield` we inherited the existing behaviour of any other nested function.

Actually the fact that `await` in comprehensions already works right is one of 
my main arguments that we can also fix `yield`. So I am totally with Serhiy 
here.

--
nosy: +yselivanov

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:

3.6.0 was required sqlite 3.7.4 but the requirement was lifted in Python 3.6.1. 
3.6.3 is the latest release of Python 3.6. Please try Python 3.6.3.

Also, this is a duplicate of issue 29098.

--
components: +Extension Modules -Build
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> document minimum sqlite version
type: crash -> behavior

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Abinaya

Abinaya  added the comment:

Thanks for the update.

Could you please let me know if we build latest python_v363 then sqlite will be 
work right.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Consider this as a sort of optimization. A function inlining. In general case 
we can't inline a function because it can be rebinded at any time, but in this 
particular case we call a just created function that doesn't have any 
references and live only on the stack a, and we have all information for 
generating an inlined code. This will allow to get rid of the overhead for 
creating and calling a one-time function.

The naming problem is the hardest problem. We should assign unique names for 
internal variables, like '.0.x'. We already do this for the single parameter of 
a one-time function. Or we could just use a stack (this requires more work but 
has additional benefits).

If you want to think about comprehensions as about calling inner functions, you 
can do this. And you can think about comprehensions as about loops which don't 
leak inner variables. The behavior should be absolutely identical until you 
will use "yield" which would turn your list producing function into a 
generator. If make "yield" turning into a generator not an implicit inner 
function, but an explicit enclosing function, a comprehension could be 
represented via an implicit inner function. Currently there is no way to 
express this in Python syntax, but before introducing "yield" there was no way 
to express its semantic.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I concur with Ivan. It would be nice to me to disallow "yield" in 
comprehensions and generator expressions, but the fact that "await" in 
comprehensions already works right, and this behavior is intentional and 
useful, make me thinking that "yield" should work in comprehensions.

--

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:

> Could you please let me know if we build latest python_v363 then sqlite
> will be work right.

It should build fine with Python 3.6.3. Let us know if you can't get it working.

--

___
Python tracker 

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag

Change by Berker Peksag :


--
stage: patch review -> backport needed
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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset bdb8315c21825487b54852ff0511fb4881ea2181 by Berker Peksag in 
branch 'master':
bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)
https://github.com/python/cpython/commit/bdb8315c21825487b54852ff0511fb4881ea2181


--

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-11-23 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +4456

___
Python tracker 

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



[issue32039] timeit documentation should describe caveats

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Yet one mistake: 
https://stackoverflow.com/questions/35014951/why-is-max-slower-than-sort

$ python3 -m timeit -s 'import random;a=list(range(1));random.shuffle(a)' 
'a.sort();a[-1]'

Here the list is sorted at first iteration, and all following iterations 
measure the speed of sorting a sorted list.

--

___
Python tracker 

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +4457
stage: backport needed -> patch review

___
Python tracker 

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread uday kiran

uday kiran  added the comment:

Will it be added to 3.6 also?
And when it will be available in the windows installations you release?

--

___
Python tracker 

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:

> Will it be added to 3.6 also?

Yes, I've created a backport PR: PR 4520

> And when it will be available in the windows installations you release?

The dates for 3.6.4 release is listed at 
https://www.python.org/dev/peps/pep-0494/#id4

--

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:

Éric and Henk-Jaap: I've now opened PR 4519.

--

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Abinaya

Abinaya  added the comment:

Thanks for the help.

If we import pysqlite2 I could see the error that pysqlite2 module not found.
Please let us know is there anyway to get pysqlite2 in python_v363.

--

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:

pysqlite2 only works in Python 2: 
https://github.com/ghaering/pysqlite/blob/e728ffbcaeb7bfae1d6b7165369bd0ae16cabf95/setup.py#L25-L28

You don't need to install pysqlite2 in Python 3. The latest release of Python 
3.6 (which is 3.6.3, not 3.6.0) should work fine with sqlite3 3.6.20.

--

___
Python tracker 

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 4b3042900e7e8dc120408bab86642c09c9d25a5a by Berker Peksag in 
branch '3.6':
bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)
https://github.com/python/cpython/commit/4b3042900e7e8dc120408bab86642c09c9d25a5a


--

___
Python tracker 

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:

Thank you, Anthony. I added a test case and committed your patch to 3.6 and 
master branches.

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4458

___
Python tracker 

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



[issue30657] Unsafe arithmetic in PyString_DecodeEscape

2017-11-23 Thread Leo kirotawa silva

Leo kirotawa silva  added the comment:

I couldn't reproduce using the poc, but seems python3.5 is also vulnerable to 
this bug. The code from py3.5 are quite similar to 2.7. 
In py3.5: Objects/bytesobject.c PyBytes_DecodeEscape

--
nosy: +Leo kirotawa silva

___
Python tracker 

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



[issue29512] regrtest refleak: implement bisection feature

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
keywords: +patch
pull_requests: +4459
stage: resolved -> patch review

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4460

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 0327bde9da203bb256b58218d012ca76ad0db4e4 by Victor Stinner in 
branch 'master':
bpo-32030: Rewrite calculate_path() (#4521)
https://github.com/python/cpython/commit/0327bde9da203bb256b58218d012ca76ad0db4e4


--

___
Python tracker 

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



[issue29512] regrtest refleak: implement bisection feature

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 448c6739877a4143a2c3599f041fa6127f354044 by Victor Stinner in 
branch '2.7':
bpo-29512: Fix Lib/test/bisect.py shebang (#4522)
https://github.com/python/cpython/commit/448c6739877a4143a2c3599f041fa6127f354044


--

___
Python tracker 

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



[issue30657] Unsafe arithmetic in PyString_DecodeEscape

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Right, but it is not easy to exploit this bug. You need to parse Python sources 
longer than 512 MiB in 32-bit Python.

Python 3.5 currently takes only fixes for security bugs. I left on to Larry to 
decide whether it is worth to port the fix to 3.5.

--
nosy: +larry

___
Python tracker 

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



[issue32118] Docs: add note about sequence comparisons containing non-orderable elements

2017-11-23 Thread R. David Murray

R. David Murray  added the comment:

The surprising thing is the behavior of NaN, which is *not equal* to itself.

The statement about orderability says "...are ordered the same as their first 
unequal elements".  This is explicit and unambiguous, there is no difference in 
this context between the number 1 and the singleton None, or the reflexivity 
enforced on NaN: all are equal to the corresponding element from the other 
sequence.  The whole point of the paragraph is that *no order test is done 
until the first unequal element is encountered*.

If we want to make this *more* explicit, I would suggest simply adding the 
following sentence after the first example in the original paragraph: "This 
means that reflexive elements that are otherwise unorderable (such as None and 
NaN) do not trigger a TypeError during a comparison."

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset b98f1715a35d2cbd1e9e45e1e7ae51a39e00dc4a by Victor Stinner in 
branch 'master':
bpo-27535: Cleanup create_filter() (#4516)
https://github.com/python/cpython/commit/b98f1715a35d2cbd1e9e45e1e7ae51a39e00dc4a


--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Guido van Rossum

Guido van Rossum  added the comment:

Remind me what happens when you use `await` in a generator expression that
survives the async function's scope?

async def f(xs):
return (await x for x in xs)

--

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Wait, now I understand the purpose of the current test! There is just a typo in 
a comment, should be 41 instead of 47. The test itself is correct. If the 
address is obtained from network cards, it should have the 41 bit clear. If it 
is generated randomly, it should have the 41 bit set, to avoid conflicts with 
addresses obtained from network cards. There is nothing about the 42 bit.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

> Remind me what happens when you use `await` in a generator expression that 
> survives the async function's scope?

Awaiting on f([1, 2]) will result in an async generator (even though yield 
never appears here). Yury explained why this happens in 
https://bugs.python.org/issue32113

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

(Of course there should be not [1, 2] in the argument, but a list of some 
awaitables, otherwise there will be an error later.)

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Yury explained why this happens in https://bugs.python.org/issue32113

It happens because '(x for x in xs)' creates a synchronous generator.  So when 
there's an 'await' in it, it creates an asynchronous generator.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov

Yury Selivanov  added the comment:

It's also important to note, that in 3.7, this is legal:

  def foo():
return (await x for x in xs)

Note that 'foo' is a regular function, not 'async def'.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

... but [await x for x in xs] is still valid _only_ inside async def.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov

Yury Selivanov  added the comment:

> ... but [await x for x in xs] is still valid _only_ inside async def.

Yes, because it's computed right where it is defined.

a = [x for x in xs]  # `a` is a list object
a = (x for x in xs)  # `a` is a generator

Do you understand the difference?

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

Well, after all I am thinking maybe it is indeed makes sense to ban `yield` 
inside both sync/async and both comprehensions/generator expressions. Since we 
already have a smörgåsbord of intuitive behaviors.

This, _together_ with extensive clarification to the docs and error messages 
can fix the problem.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Guido van Rossum

Guido van Rossum  added the comment:

I honestly think we went too far here. Asynchronous generators are still
provisional. Though the PEP is silent about this, the acceptance notice is
clear:
https://mail.python.org/pipermail/python-dev/2016-September/146267.html. I
propose to rip them out.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Well, after all I am thinking maybe it is indeed makes sense to ban `yield` 
> inside both sync/async and both comprehensions/generator expressions.

I agree, as I can't imagine a real use case for

   a = ((yield a) for a in as)

which is really equivalent to

   def a():
  for a in as:
 yield (yield a)

--

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 70b2f8797146a56a6880743424f0bedf4fc30c62 by Victor Stinner in 
branch '3.6':
[3.6] bpo-31324: Optimize support._match_test() (#4523)
https://github.com/python/cpython/commit/70b2f8797146a56a6880743424f0bedf4fc30c62


--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

> Do you understand the difference?

Yury, sorry, but what is your problem? Have I said something about that this is 
bad. Your tone is clearly insulting, and this is not the first time. Maybe it 
makes sense to have some respect?

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov

Yury Selivanov  added the comment:

>> Do you understand the difference?

> Yury, sorry, but what is your problem? Have I said something about that this 
> is bad. Your tone is clearly insulting, and this is not the first time. Maybe 
> it makes sense to have some respect?

Sorry, I didn't mean to insult anybody.  I asked an honest question with an 
intent to clarify if there's some misunderstanding of the topic that I'm 
partially responsible for in CPython.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

Yury OK, sorry then this is a misunderstanding from my side.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Yury OK, sorry then this is a misunderstanding from my side.

NP.  Again, sorry if I sounded that way to you.

--

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4461

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

Guido, I am not sure about the complete removal, this is probably to radical. 
What I think we are missing more detailed docs that would be clear about the 
corner cases. (I already mentioned this in https://bugs.python.org/issue32113)

--

___
Python tracker 

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



[issue13986] ValueError: cannot convert float NaN to integer

2017-11-23 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
nosy:  -gregory.p.smith

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4462

___
Python tracker 

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



[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4463

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Guido van Rossum

Guido van Rossum  added the comment:

I think we all need to calm down a bit. How about not posting about this
topic for 24 hours.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

> How about not posting about this topic for 24 hours.

OK, makes sense :-)

--

___
Python tracker 

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



[issue32055] Reconsider comparison chaining for containment tests

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I'm reading the list of most rated in a week questions on StackOverflow 
(https://python-weekly.blogspot.com/), and it seems to me that the question 
about chained "in" and "not in" is raised every few months. This may be the one 
of the most confusing quirks.

--

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 35d99830f1878867e3964577741d9a2d5a7fc8f7 by Victor Stinner in 
branch '2.7':
bpo-31324: Optimize support._match_test() (#4523) (#4524)
https://github.com/python/cpython/commit/35d99830f1878867e3964577741d9a2d5a7fc8f7


--

___
Python tracker 

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



[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

I tested set_match_tests() on python2.7 with:

python2.7 -m test --list-cases > cases
python2.7 -m test.bisect -i cases

Good news: the set().__contains__ matcher can be used!

--

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset b9197959c186f9061bd74d0adc20e96556426db4 by Victor Stinner in 
branch 'master':
bpo-32030: Fix calculate_path() on macOS (#4526)
https://github.com/python/cpython/commit/b9197959c186f9061bd74d0adc20e96556426db4


--

___
Python tracker 

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



[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 6a54c676e63517653d3d4a1e164bdd0fd45132d8 by Victor Stinner in 
branch 'master':
bpo-31979: Remove unused align_maxchar() function (#4527)
https://github.com/python/cpython/commit/6a54c676e63517653d3d4a1e164bdd0fd45132d8


--

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-11-23 Thread Berker Peksag

Change by Berker Peksag :


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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset dcaed6b2d954786eb5369ec2e8dfdeefe3cdc6ae by Berker Peksag in 
branch 'master':
bpo-19610: setup() now raises TypeError for invalid types (GH-4519)
https://github.com/python/cpython/commit/dcaed6b2d954786eb5369ec2e8dfdeefe3cdc6ae


--

___
Python tracker 

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



[issue12382] [msilib] Obscure exception message when trying to open a non-existent MSI database

2017-11-23 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +4464
stage:  -> patch review

___
Python tracker 

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



[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Berker Peksag

Change by Berker Peksag :


--
keywords: +patch
pull_requests: +4465

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-23 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 23, 2017, at 11:24, Serhiy Storchaka  wrote:

> Wait, now I understand the purpose of the current test! There is just a typo 
> in a comment, should be 41 instead of 47. The test itself is correct. If the 
> address is obtained from network cards, it should have the 41 bit clear. If 
> it is generated randomly, it should have the 41 bit set, to avoid conflicts 
> with addresses obtained from network cards. There is nothing about the 42 bit.

It’s not just a typo in the comment, it’s a typo in the bitmask, at least if 
the intent of the test is to ensure that the MAC address is universally 
administered.  That is defined as having a 0 in the “second least significant 
bit of the first octet”.  Here’s a way to make that clearer.

# Second least significant bit of the first octet of the 48-bit MAC address
>>> 0b0010_____
219902322
# Constant from the PR
>>> 1<<41
219902322
# Literal bit mask from the original code.
>>> 0x0100
1099511627776

The latter is off by 1 place.

--

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-23 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I'm sorry, but this tests and the typo were added by me in issue23015. This 
check is a pair of the check for _random_getnode(). They use the same mask and 
test the same bit. I forgot about this.

--

___
Python tracker 

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



[issue32121] tracemalloc.Traceback.format() should have an option to reverse the traceback

2017-11-23 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Right now tracemalloc.Traceback.format() returns the frames in "most recent 
call first" order.  This is not intuitive since ordinary Python tracebacks are 
displayed in "most recent call last" order.  It would be nice to add a 
`reverse` argument to change that.

--
components: Library (Lib)
messages: 306856
nosy: pitrou, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: tracemalloc.Traceback.format() should have an option to reverse the 
traceback
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

2017-11-23 Thread Berker Peksag

Change by Berker Peksag :


--
keywords: +patch
pull_requests: +4466
stage: backport needed -> patch review

___
Python tracker 

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



[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset a645b23ffc76073a2eb4e77b88cb7648cfc6ef77 by Berker Peksag in 
branch '3.6':
bpo-30456: Clarify example for duplicates in second argument of isinstance 
(GH-1699)
https://github.com/python/cpython/commit/a645b23ffc76073a2eb4e77b88cb7648cfc6ef77


--

___
Python tracker 

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



[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

2017-11-23 Thread Berker Peksag

Berker Peksag  added the comment:

Looks like I forgot to backport this 3.6 branch. Now it's done. Thanks, Eli.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue32121] tracemalloc.Traceback.format() should have an option to reverse the traceback

2017-11-23 Thread STINNER Victor

STINNER Victor  added the comment:

The option seems reasonable. Would you like to work on a pull request?

--

___
Python tracker 

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



[issue29302] add contextlib.AsyncExitStack

2017-11-23 Thread privatwolke

Change by privatwolke :


--
nosy: +privatwolke

___
Python tracker 

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



[issue32099] Use range in itertools roundrobin recipe

2017-11-23 Thread Raymond Hettinger

Change by Raymond Hettinger :


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



[issue32099] Use range in itertools roundrobin recipe

2017-11-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 0858495a50e19defde786a4ec050ec182e920f46 by Raymond Hettinger in 
branch 'master':
bpo-32099 Add deque variant of roundrobin() recipe (#4497)
https://github.com/python/cpython/commit/0858495a50e19defde786a4ec050ec182e920f46


--

___
Python tracker 

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



[issue30860] Consolidate stateful C globals under a single struct.

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4468

___
Python tracker 

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



[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-23 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4467

___
Python tracker 

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



[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4469

___
Python tracker 

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



[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 3df02dbc8e197053105f9dffeae40b04ec66766e by Raymond Hettinger 
(Berker Peksag) in branch 'master':
bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (#4529)
https://github.com/python/cpython/commit/3df02dbc8e197053105f9dffeae40b04ec66766e


--

___
Python tracker 

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



[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset ff847d1ac7e6a8ee1fb6f8883cfb4aec4b4a9b03 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.6':
bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (GH-4529) (#4533)
https://github.com/python/cpython/commit/ff847d1ac7e6a8ee1fb6f8883cfb4aec4b4a9b03


--

___
Python tracker 

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



  1   2   >