[issue31953] Dedicated place for security announcements?

2017-11-06 Thread Jean-Philippe Ouellet

Jean-Philippe Ouellet  added the comment:

Ah, I now see there actually *is* a security-announce list [1]!

Unless one happens to already know that Python has two concurrent mailman 
instances hosting different lists [2][3], it's easy to miss.

Thanks, and sorry for the noise!

[1]: https://mail.python.org/mm3/archives/list/security-annou...@python.org/
[2]: https://mail.python.org/mm3/archives/
[3]: https://mail.python.org/mailman/listinfo

--

___
Python tracker 

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



[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2017-11-06 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +4254
stage:  -> patch review

___
Python tracker 

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



[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2017-11-06 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Currently OrderedDict uses a table of nodes that mirrors the dict table. For 
keeping it in sync it saves the size and address of the dict table. There are 
two issues with this. First, this prevent some kind of dict optimization. When 
dict is resized (after exhausting usable entries at the end of table) it should 
allocate a new table even if it's size isn't changed. Second, this doesn't 
guarantees that both tables are in sync. If the dict table was reallocated 
twice before using OrderedDict methods, it can have the same size and address, 
but totally different layout of elements.

Proposed PR adds a new flag to dict object. It is set when OrderedDict creates 
its table, and is cleared when dict reallocates its table or moves items in the 
same table.

--
components: Interpreter Core
messages: 305623
nosy: inada.naoki, rhettinger, serhiy.storchaka, tim.peters
priority: normal
severity: normal
status: open
title: Don't prevent dict optimization by coupling with OrderedDict
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



[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread Nir Soffer

Nir Soffer  added the comment:

When using highlevel request() api, users can control the block size by
wrapping the file object with an iterator:

class FileIter:

def __init__(self, file, blocksize):
self.file = file
self.blocksize = blocksize

def __iter__(self):
while True:
datablock = self.file.read(self.blocksize)
if not datablock:
break
yield datablock

Adding configurable block size will avoid this workaround.

--

___
Python tracker 

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



[issue29659] Expose the `length` arg from shutil.copyfileobj for public use

2017-11-06 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Could you please provide any benchmarks Tyler?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2017-11-06 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Later I'm going to add a flag that will allow regular dicts reuse holes when 
delete items, while keep OrderedDict and dicts used as class namespace ordered. 
I'm not sure there will be a benefit, but at least this will open an option.

--

___
Python tracker 

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



[issue31955] set_executables() incorrectly parse values with spaces

2017-11-06 Thread Dee Mee

New submission from Dee Mee :

Function set_executable() in ccompiler.py does the following check:

def set_executable(self, key, value):
if isinstance(value, str):
setattr(self, key, split_quoted(value))
else:
setattr(self, key, value)


The check "if isinstance(value, str)" is incorrect, because type of value can 
be unicode, while it should be splitted as well.

--
components: Distutils
messages: 305627
nosy: Dee Mee, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: set_executables() incorrectly parse values with spaces
type: behavior
versions: Python 2.7, 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



[issue23670] Modifications to support iOS as a cross-compilation target

2017-11-06 Thread Russell Keith-Magee

Russell Keith-Magee  added the comment:

For those interested, I've started tracking these patches on Github: 
https://github.com/freakboy3742/cpython 

The 3.4, 3.5 and 3.6 branches are tested and compile as of the time of this 
comment; the master branch has also been updated, in preparation for the 
release of 3.7.

I haven't submitted pull requests because there are still some issues that Ned 
raised in discussions at PyCon US.

--
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue31851] test_subprocess hangs randomly on Windows with Python 3.x

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Sadly, the AMD64 Windows10 3.x buildbot worker is also sick:

http://buildbot.python.org/all/#/builders/3/builds/117

1:15:30 [405/407] test_urllibnet passed -- running: test_subprocess (3338 sec)
1:15:52 [406/407] test_bytes passed -- running: test_subprocess (3361 sec)
command timed out: 1200 seconds without output running 
['Tools\\buildbot\\test.bat', '-x64', '-j2', '--timeout', '900'], attempting to 
kill
program finished with exit code 1
elapsedTime=5757.133000

--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: test_subprocess hangs randomly on x86 Windows7 3.x -> test_subprocess 
hangs randomly on Windows with Python 3.x

___
Python tracker 

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



[issue31956] Add start and stop parameters to the array.index()

2017-11-06 Thread Николай Спахиев

New submission from Николай Спахиев :

Sequence protocol specifies 2 optional argument for index method:
seq.index(value, [start, [stop]])

array.index(value) needs start and stop arguments too.

--
components: Library (Lib)
messages: 305629
nosy: Николай Спахиев
priority: normal
severity: normal
status: open
title: Add start and stop parameters to the array.index()
versions: Python 3.8

___
Python tracker 

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



[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-06 Thread STINNER Victor

New submission from STINNER Victor :

http://buildbot.python.org/all/#/builders/58/builds/110

Build started 11/4/2017 7:30:21 PM.
Project 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\PCbuild\pythoncore.vcxproj"
 on node 1 (KillPython target(s)).
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\PCbuild\python.props(77,31):
 error MSB4086: A numeric comparison was attempted on 
"$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft 
SDKs\Windows\v10.0@ProductVersion)" that evaluates to "" instead of a number, 
in condition 
"$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft 
SDKs\Windows\v10.0@ProductVersion) >= '10.0.15063'". 
[D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\PCbuild\pythoncore.vcxproj]
Done Building Project 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\PCbuild\pythoncore.vcxproj"
 (KillPython target(s)) -- FAILED.
Build FAILED.

It's likely a regression caused by one of these commits:

* 0d2a9088d16826343344b04461c8be44b4008710
* aed08562220974b5c67371b908f23caa1be07e38

--
components: Build, Windows
messages: 305631
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [Windows] PCbuild error: A numeric comparison was attempted
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



[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Windows8 error:

D:\buildarea\3.x.bolen-windows8\build\PCbuild\python.props(76,31): error 
MSB4086: A numeric comparison was attempted on 
"$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft 
SDKs\Windows\v10.0@ProductVersion)" that evaluates to "" instead of a number, 
in condition "$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft 
SDKs\Windows\v10.0@ProductVersion) >= '10.0.15063'". 
[D:\buildarea\3.x.bolen-windows8\build\PCbuild\pythoncore.vcxproj]

--

___
Python tracker 

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



[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Compilation also failed on AMD64 Windows8 3.x:

http://buildbot.python.org/all/#/builders/32/builds/118

--

___
Python tracker 

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



[issue30406] async and await should be keywords in 3.7

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

> (...) don't raise any deprecation warning in 3.6.

python3 requires -Wd to display DeprecationWarning:

https://mail.python.org/pipermail/python-dev/2017-November/150149.html

Yury Selivanov: "We had PendingDeprecationWarning for async/await names in 3.5, 
and DeprecationWarning in 3.6."

--

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

"""

Unrelated to the patch (same before and after), this looks odd to me:

>>> import uuid
>>> uuid._has_uuid_generate_time_safe is None
True
>>> 
>>> import _uuid
>>> _uuid.has_uuid_generate_time_safe
1
"""

None means "not initialized yet". It's initialized on demand, at the first call 
of uuid1() or get_node():

$ python3
Python 3.7.0a2+ (heads/master:a5293b4ff2, Nov  6 2017, 12:22:04) 
>>> import uuid
>>> uuid._has_uuid_generate_time_safe  # == None
>>> uuid.uuid1()
UUID('3e5a7628-c2e5-11e7-adc1-3ca9f4650c0c')
>>> uuid._has_uuid_generate_time_safe
1


> [Also, I thought we weren't supposed to use ctypes in the stdlib.]

Antoine's commit a106aec2ed6ba171838ca7e6ba43c4e722bbecd1 avoids ctypes when 
libuuid is available.

For the other systems without libuuid, well, it was probably simpler to use 
ctypes. ctypes was more popular a few years ago. The code "just works" and I 
guess that nobody wants to touch it :-)

--

___
Python tracker 

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



[issue31958] UUID

2017-11-06 Thread David MacIver

New submission from David MacIver :

The documentation for the UUID module says the UUID.version field is "The UUID 
version number (1 through 5, meaningful only when the variant is RFC_4122)".

However, the UUID constructor doesn't actually validate that the version lies 
in that range if you don't pass a version to the constructor and, as a result, 
this isn't actually true - the version number can be anything between 0 and 15.

For an example consider the following:

>>> from uuid import UUID
>>> u = UUID(int=1133377179260751706062848)
>>> u.variant
'specified in RFC 4122'
>>> u.version
15

I have only actually run this example on Python 3.6, but inspection of the code 
suggests that it's been like this since its introduction.

--
components: Library (Lib)
messages: 305636
nosy: David MacIver
priority: normal
severity: normal
status: open
title: UUID
versions: Python 2.7, 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



[issue31958] UUID versions are not validated to lie in the documented range

2017-11-06 Thread David MacIver

Change by David MacIver :


--
title: UUID -> UUID versions are not validated to lie in the documented range

___
Python tracker 

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



[issue31959] Directory at `TemporaryDirectory().name` does not exist

2017-11-06 Thread Adam Dangoor

New submission from Adam Dangoor :

Sample code:

```
import os
from tempfile import TemporaryDirectory

name = TemporaryDirectory().name
print(os.path.exists(name))  # prints False

td = TemporaryDirectory()
name_2 = td.name
print(os.path.exists(name_2))  # prints True
```

Expected behavior: `True` is printed for both print statements.

I have run this example on:

* CPython 3.6.3
* CPython 3.5.3
* pypy 3.5.3

The unexpected behavior occurs on CPython 3.5.3 and CPython 3.6.X but not on 
pypy.

(bug found with Tim Weidner https://github.com/timaa2k).

--
components: Library (Lib)
messages: 305637
nosy: Adam Dangoor
priority: normal
severity: normal
status: open
title: Directory at `TemporaryDirectory().name` does not exist
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue31959] Directory at `TemporaryDirectory().name` does not exist

2017-11-06 Thread Adam Dangoor

Adam Dangoor  added the comment:

> The unexpected behavior occurs on CPython 3.5.3 and CPython 3.6.X but not on 
> pypy.

This suggests that it is something to do with garbage collection. Upon further 
thought, maybe this is by design, but I still was surprised.

--

___
Python tracker 

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



[issue31959] Directory at `TemporaryDirectory().name` does not exist

2017-11-06 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is by design. The first TemporaryDirectory object is destroyed before the 
first print statement. For not be surprised use TemporaryDirectory with the 
"with" statement.

with TemporaryDirectory() as td:
name = td.name
print(os.path.exists(name))  # prints True

print(os.path.exists(name))  # prints False

--
nosy: +serhiy.storchaka
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



[issue31959] Directory at `TemporaryDirectory().name` does not exist

2017-11-06 Thread Martin Panter

Martin Panter  added the comment:

The documentation says “On . . . destruction of the temporary directory object 
the newly created temporary directory and all its contents are removed”. If you 
had enabled warnings, you may have seen a hint:

$ python -Wdefault -c 'import tempfile; 
print(tempfile.TemporaryDirectory().name)'
/usr/lib/python3.5/tempfile.py:788: ResourceWarning: Implicitly cleaning up 

  _warnings.warn(warn_message, ResourceWarning)
/tmp/tmpj6100h57

This is similar in spirit to earlier bug reports where workarounds were added, 
but to avoid this instance of the problem the string object returned by the 
“name” attribute would have to hold a reference back to the directory object.

* Issue 23700: iter(NamedTemporaryFile())
* Issue 18879: NamedTemporaryFile().write(...)

--
nosy: +martin.panter -serhiy.storchaka
resolution: not a bug -> wont fix
stage: resolved -> 

___
Python tracker 

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



[issue31959] Directory at `TemporaryDirectory().name` does not exist

2017-11-06 Thread Martin Panter

Change by Martin Panter :


--
nosy: +serhiy.storchaka
resolution: wont fix -> not a bug
stage:  -> resolved

___
Python tracker 

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



[issue13777] socket: communicating with Mac OS X KEXT controls

2017-11-06 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4255

___
Python tracker 

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



[issue25942] Add a new optional cleanup_timeout parameter to subprocess.call()

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

I changed the issue title to "Add a new optional cleanup_timeout parameter to 
subprocess.call()" to make it more positive and update it to the currently 
proposed change ;-)

--
title: subprocess.call SIGKILLs too liberally -> Add a new optional 
cleanup_timeout parameter to subprocess.call()
type: behavior -> 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



[issue31955] set_executables() incorrectly parse values with spaces

2017-11-06 Thread Dee Mee

Change by Dee Mee :


--
keywords: +patch
pull_requests: +4256
stage:  -> patch review

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2017-11-06 Thread Mark Dickinson

Mark Dickinson  added the comment:

> “Bitwise operations have the same result as calculations using two’s 
> complement with a bit-width large enough to avoid overflows.”

That sounds fine to me, but then, the original wording sounds fine to me now 
that I know how to read it. :-) The main issue here is making it clear that in 
"avoid overflow", we're talking about overflow incurred in representing a value 
in two's complement in the first place, as opposed to overflow of the operation 
itself.

I'd go with something like the following (which evolved by successive 
refinement from Martin's suggestion):

"Each bitwise operation has the same result as though carried out in two's 
complement using a bit-width that's large enough to represent the inputs."

> I presume this is what your “2-adic representation” is.

Yes, exactly. Without invoking 2-adic numbers, which is a bit of overkill, 
there's a natural one-to-one correspondence between

(a) integers, and
(b) (singly) infinite bit strings, extending infinitely to the left, in which 
either all but finitely many bits are zero, or all but finitely many bits are 
one.

In the domain (b), the bitwise operations have their obvious bitwise meanings; 
translating via the correspondence gives us the corresponding definitions of 
the bitwise operations on (a).

For the correspondence: going from (a) to (b): take an integer n, then for each 
k >= 0 reduce n modulo 2^k to get a length-k bit string. Now it's easy to see 
that the length-k bit strings are all compatible with one another, in the sense 
that they all agree with each other when right-aligned, so you naturally get an 
infinite-length bit string that's eventually either all 1s (for negative n) or 
all zeros (for nonnegative n).

Going back from (b) to (a): it's not hard to convince yourself that the map 
above is one-to-one and onto, but then you miss out on a beautiful description 
of the inverse map: given an infinite bit-string indexed as below, with b_0 the 
least significant bit:

... b_{k+1} b_k b_{k-1} ... b_2 b_1 b_0

we simply map that bit string to the integer

n = sum_{i>=0} b_i * 2**i

Of course the RHS of the above is an infinite sum, so a priori doesn't make 
sense. If almost all the bits are zeros, it becomes a finite sum and 
everything's okay. If almost all the bits are ones, you can either (i) 
introduce the 2-adic topology on the integers and point out that it still 
converges in that topology, so that everything has a sound mathematical 
footing, or (ii) just use the "trick" that 1 + 2 + 4 + 8 + 16 + ... = -1, which 
more-or-less amounts to the same thing.

--

___
Python tracker 

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



[issue30699] Misleading class names in datetime.tzinfo usage examples

2017-11-06 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +belopolsky

___
Python tracker 

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



[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-06 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
versions: +Python 3.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



[issue31956] Add start and stop parameters to the array.index()

2017-11-06 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

+1

--
nosy: +rhettinger

___
Python tracker 

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



[issue31959] Directory at `TemporaryDirectory().name` does not exist

2017-11-06 Thread Adam Dangoor

Adam Dangoor  added the comment:

Thank you for clearing this up for me.

--

___
Python tracker 

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



[issue31955] distutils C compiler: set_executables() incorrectly parse values with spaces

2017-11-06 Thread STINNER Victor

Change by STINNER Victor :


--
title: set_executables() incorrectly parse values with spaces -> distutils C 
compiler: set_executables() incorrectly parse values with spaces

___
Python tracker 

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



[issue31955] distutils C compiler: set_executables() incorrectly parse values with spaces

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

> The check "if isinstance(value, str)" is incorrect, because type of value can 
> be unicode, while it should be splitted as well.

Your pull request is for Python 3, but the type of paths is expected to be str 
on Python 3, no?

For Python 2, you can use isinstance(value, basestring).

--
nosy: +haypo
versions: +Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue31958] UUID versions are not validated to lie in the documented range

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

What do you propose? Raise an exception in the constructor if the version is 
not in the range 1..5? Or just modify the variant value?

--
nosy: +haypo

___
Python tracker 

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



[issue31951] import curses is broken on windows

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

The curses module is not supported on Windows.

--
nosy: +haypo

___
Python tracker 

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



[issue31951] import curses is broken on windows

2017-11-06 Thread Paul Moore

Paul Moore  added the comment:

The docs for the curses module say "While curses is most widely used in the 
Unix environment, versions are available for Windows, DOS, and possibly other 
systems as well." This is the only mention of platform support I can see.

It might be worth making the platform support explicit in the docs.

--

___
Python tracker 

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



[issue31939] Support return annotation in signature for Argument Clinic

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

I'm sorry, I'm confused between docstrings and annotations.

My first goal is to not loose the return type from the docstring when the 
select module is converted to Argument Clinic, at least for the simplest return 
types. Complex return types can be documented manually in the body of a 
docstring.

Return *annotation* would be nice to have, but it seems to be opposed to the 
current policy. I started a discussion on python-dev to ask if we should modify 
this policy :-)

"[Python-Dev] Allow annotations using basic types in the stdlib?"
https://mail.python.org/pipermail/python-dev/2017-November/150233.html

--

___
Python tracker 

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



[issue31956] Add start and stop parameters to the array.index()

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Николай Спахиев: Are you only asking for the feature, or are you interested to 
work on a concrete patch?

--
nosy: +haypo

___
Python tracker 

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



[issue28140] Attempt to give better errors for pip commands typed into the REPL

2017-11-06 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +yselivanov

___
Python tracker 

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



[issue31948] [EASY] Broken MSDN links in msilib docs

2017-11-06 Thread STINNER Victor

Change by STINNER Victor :


--
title: Broken MSDN links in msilib docs -> [EASY] Broken MSDN links in msilib 
docs

___
Python tracker 

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



[issue31942] Document that support of start and stop parameters in the Sequence's index() is optional

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

See also bpo-31956: "Add start and stop parameters to the array.index()".

--
nosy: +haypo

___
Python tracker 

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



[issue31949] Bugs in PyTraceBack_Print()

2017-11-06 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4257

___
Python tracker 

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



[issue17852] Built-in module _io can lose data from buffered files at exit

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Neil pushed the commit 0a1ff24acfc15d8c7f2dc41000a6f3d9a31e7480. What is the 
status of this issue? Can we now close it?

--

___
Python tracker 

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



[issue28340] [py2] TextIOWrapper.tell extremely slow

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Berker Peksag, Antoine Pitrou (who implemented the discussed change) and me are 
opposed to backporting this optimization, so I close the issue as WONTFIX.

The only known workaround is to upgrade to Python 3, sorry!

Benjamin: Please speakup if you want this optimization in the next Python 2.7 
release ;-)


> The original patch is quite delicate and I'm not comfortable backporting to 
> 2.7.

Oh, the "byte/character ratio" "hack"... I'm not confortable with this one 
neither, even if it seems like it works on Python 3 (I didn't recall any bug 
report related to this).

--
nosy: +haypo
resolution:  -> wont fix
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



[issue31951] import curses is broken on windows

2017-11-06 Thread Zachary Ware

Zachary Ware  added the comment:

Curses is available for Windows from Christopher Gohlke's site: 
https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses

We should clean up this situation, though, either by making the state of 
Windows curses support explicit in the docs or by actually adding support for 
it in the default distribution.

--

___
Python tracker 

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



[issue31935] subprocess.run() timeout not working with grandchildren and stdout=PIPE

2017-11-06 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue31934] Failure to build out of source from a not clean source

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Note for myself: Xavier proposed PR 4255 fix :-)

--
nosy: +haypo

___
Python tracker 

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



[issue31951] import curses is broken on windows

2017-11-06 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

There are two open issues for adding support of the curses module on Windows: 
issue1005895 and issue2889.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

To support a new platform, you need a developer who can support this platform 
next years, a working buildbot, etc. You can start a discussion on python-dev 
to get a first feedback.

Without a strong support, this issue should be fixed a REJECTED and a patch 
should be maintainted out of the tree. Since the PR seems small, it should be 
"easy" to keep a fork of CPython up to date.

--
nosy: +haypo

___
Python tracker 

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



[issue31939] Support return annotation in signature for Argument Clinic

2017-11-06 Thread Tal Einat

Tal Einat  added the comment:

My apologies, I seem to have been the source of the confusion. I misunderstood 
your original meaning.

--

___
Python tracker 

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



[issue31939] Support return annotation in signature for Argument Clinic

2017-11-06 Thread Yury Selivanov

Change by Yury Selivanov :


--
nosy:  -yselivanov

___
Python tracker 

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



[issue31925] [NetBSD] test_socket creates too many locks

2017-11-06 Thread STINNER Victor

Change by STINNER Victor :


--
title: test_socket creates too many locks -> [NetBSD] test_socket creates too 
many locks

___
Python tracker 

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



[issue31943] Add asyncio.Handle.cancelled() method

2017-11-06 Thread Marat Sharafutdinov

Change by Marat Sharafutdinov :


--
title: Add asyncio.Handle.cancelled() and asyncio.TimerHandle.when -> Add 
asyncio.Handle.cancelled() method

___
Python tracker 

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



[issue31925] [NetBSD] test_socket creates too many locks

2017-11-06 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

test_socket creates many locks on all platforms.

--

___
Python tracker 

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



[issue30952] include Math extension in SQlite

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

> I would be interested in having SQLite shipped with the math extension

Python uses the SQLite library installed on the system, at least on Linux. To 
load an extension, I found:
https://sqlite.org/loadext.html
https://sqlite.org/c3ref/load_extension.html

How am I supposed the math extension? The CLI ".load" command requires the name 
or even the full path to a shared library (".so" file on Linux).

I see that the issue was tagged as Windows. Are you talking about the SQLite 
bundled with Python installer on Windows?

--
nosy: +haypo

___
Python tracker 

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



[issue28643] Broken makefile depends for profile-opt target

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, I had this bug and I'm quite sure that I reported it, but I cannot find it 
anymore :-)

--
nosy: +haypo

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-06 Thread Antoine Pitrou

New submission from Antoine Pitrou :

If you await a Future with another loop than a loop at instance creation (this 
is trivial to do accidentally when using threads), asyncio raises a 
RuntimeError.  But if you use another part of the Future API, such as 
add_done_callback(), the situation isn't detected.

For example, this snippet will run indefinitely:

import asyncio
import threading


fut = asyncio.Future()

async def coro(loop):
fut.add_done_callback(lambda _: loop.stop())
loop.call_later(1, fut.set_result, None)
while True:
await asyncio.sleep(10)

def run():
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(coro(loop))
loop.close()


t = threading.Thread(target=run)
t.start()
t.join()

--
components: asyncio
messages: 305662
nosy: giampaolo.rodola, haypo, pitrou, yselivanov
priority: normal
severity: normal
status: open
title: Protection against using a Future with another loop only works with await
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Roy Williams

New submission from Roy Williams :

Repro:

```python
from pathlib import Path
import subprocess

subprocess.run([Path('/bin/ls')])  # Works Fine
subprocess.run(Path('/bin/ls'))  # Fails
```

The problem seems to originate from here:
https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1237-L1240

This file auspiciously avoids importing pathlib, which I'm guessing is somewhat 
intentional?  Would the correct fix be to check for the existence of a 
`__fspath__` attribute as per https://www.python.org/dev/peps/pep-0519/ ?

--
components: Library (Lib)
messages: 305663
nosy: Roy Williams
priority: normal
severity: normal
status: open
title: subprocess._execute_child doesn't accept a single PathLike argument for 
args
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue28643] Broken makefile depends for profile-opt target

2017-11-06 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

The previous behavior nearly drove me to drink.  At least on my machine (and I 
have a relatively fast one), the profile-opt build takes a long time.  After 
running "make" and checking things over, running "make install" will cause the 
whole process (make clean, make with -fprofile-generate, run unit tests, make 
clean, make with -fprofile-use) to happen again.  The profile-opt build is 
significantly faster so I like to use it.  Maybe I'm an odd duck in that I 
usually compile Python myself rather than using distro packaged versions.

Current behavior is much better I think.  You have to know to manually remove 
"profile-run-stamp" if you want the -fprofile-generate + unittest to run again. 
 "make clean" does not remove it.  I don't know if that should be documented 
somewhere besides in the Makefile.

--

___
Python tracker 

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



[issue17852] Built-in module _io can lose data from buffered files at exit

2017-11-06 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

Yes, my bad.  I thought that accepting the pull would close the bug.

--
resolution:  -> fixed
stage: backport needed -> 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



[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-06 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

Hey, seems like this bug is not updated for a while. Can I work on this?

--
nosy: +CuriousLearner

___
Python tracker 

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



[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Sanyam, you definitely can.  Step #1 would probably be to port the patch to git 
master and turn it into a GitHub PR.

--

___
Python tracker 

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



[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-06 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

Thanks for the heads up! I'll do that ;)

--

___
Python tracker 

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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Roy Williams

Roy Williams  added the comment:

Ignore my comment re: pathlib, it looks like PathLike is defined in `os` and 
not `pathlib`.

--

___
Python tracker 

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



[issue31681] pkgutil.get_data() leaks open files in Python 2.7

2017-11-06 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests:  -4016

___
Python tracker 

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



[issue31028] test_pydoc fails when run directly

2017-11-06 Thread Neil Schemenauer

Change by Neil Schemenauer :


--
pull_requests: +4258

___
Python tracker 

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



[issue28907] test_pydoc fails if build is in sub-directory

2017-11-06 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

Pretty sure the fix for bug 31028 also fixed this.  Closing.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> test_pydoc fails when run directly

___
Python tracker 

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



[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-06 Thread Steve Dower

Change by Steve Dower :


--
assignee:  -> steve.dower
stage:  -> needs patch
type:  -> compile error
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



[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-06 Thread Sanyam Khurana

Change by Sanyam Khurana :


--
pull_requests: +4259

___
Python tracker 

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



[issue19982] Add a "target" parameter to runpy.run_path and runpy.run_module

2017-11-06 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

Hey ncoghlan,

Does this issue makes sense to be worked on for Python 3.7?

--
nosy: +CuriousLearner

___
Python tracker 

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



[issue28708] Low FD_SETSIZE limit on Windows

2017-11-06 Thread desbma

desbma  added the comment:

I just want to say that I strongly support either bumping the value of 
FD_SETSIZE to something a lot higher than 512, or making it configurable from 
Python code.

I am the author of a program that makes heavy use of asyncio. Some Windows 
users have reported errors when using big directory trees, that I could not 
reproduce on Linux. Then I found the note about the SelectorEventLoop 
limitation in the doc 
https://docs.python.org/3/library/asyncio-eventloops.html#windows

I can't use ProactorEventLoop because I support Python 3.4 which does not have 
it. I had to work around this limitation by calling run_until_complete 
periodically to limit the number of pending tasks. 

I sincerely think this the kind of thing that can hurt the global usage of 
asyncio. 
Hell I can do 600 IO tasks in parallel if I want to with 
concurrent.futures.ThreadPoolExecutor, why can't I do the same with asyncio?

--
nosy: +desbma

___
Python tracker 

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



[issue27169] __debug__ is not optimized out at compile time for anything but `if:` and `while:` blocks

2017-11-06 Thread Neil Schemenauer

Change by Neil Schemenauer :


--
nosy: +nascheme

___
Python tracker 

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



[issue24340] co_stacksize estimate can be highly off

2017-11-06 Thread Neil Schemenauer

Change by Neil Schemenauer :


--
nosy: +nascheme

___
Python tracker 

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



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

2017-11-06 Thread Neil Schemenauer

Change by Neil Schemenauer :


___
Python tracker 

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



[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-06 Thread Steve Dower

Change by Steve Dower :


--
keywords: +patch
pull_requests: +4260
stage: needs patch -> patch review

___
Python tracker 

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



[issue31843] sqlite3.connect() should accept PathLike objects

2017-11-06 Thread Roundup Robot

Change by Roundup Robot :


--
keywords: +patch
pull_requests: +4261
stage:  -> patch review

___
Python tracker 

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



[issue31843] sqlite3.connect() should accept PathLike objects

2017-11-06 Thread Anders Lorentsen

Anders Lorentsen  added the comment:

Had my first go at a python patch. Added a test case for it, and all tests
passing when I test with

`./python -bb -E -Wd -m test -v test.test_sqlite -r -w -uall -R 3:2`

--
nosy: +Phaqui

___
Python tracker 

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



[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-06 Thread Steve Dower

Steve Dower  added the comment:


New changeset 30f4fa456ef626ad7a92759f492ec7a268f7af4e by Steve Dower in branch 
'master':
bpo-31957: Fixes version detection. (#4298)
https://github.com/python/cpython/commit/30f4fa456ef626ad7a92759f492ec7a268f7af4e


--

___
Python tracker 

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



[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-06 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4263

___
Python tracker 

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



[issue31962] test_importlib double free or corruption

2017-11-06 Thread Thomas Knox

New submission from Thomas Knox :

On a Raspberry Pi 3 running

Linux pi3 4.9.58-v7+ #1046 SMP Tue Oct 24 17:07:15 BST 2017 armv7l GNU/Linux

C(PP)FLAGS="-O6 -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 
-mfloat-abi=hard -ftree-vectorize"

Built with
./configure --enable-loadable-sqlite-extensions --enable-optimizations 
--disable-shared --with-lto --enable-ipv6 --with-threads

When the build phase is
...
Running code to generate profile data (this can take a while):
make run_profile_task
make[1]: Entering directory '/home/pi/Downloads/Python-3.6.3'
: # FIXME: can't run for a cross build
./python -m test.regrtest --pgo || true
Run tests sequentially
...

It errors and dies with
0:23:56 load avg: 0.87 [176/405] test_importlib
*** Error in `./python': double free or corruption (!prev): 0x014166e0 ***
Fatal Python error: Aborted

Thread 0x685ff460 (most recent call first):
  File "", line 98 in acquire
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/test_importlib/test_locks.py", 
line 83 in _acquire
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/test_importlib/test_locks.py", 
line 93 in f
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/lock_tests.py", line 38 in task

Thread 0x76f04000 (most recent call first):
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/lock_tests.py", line 17 in 
_wait
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/lock_tests.py", line 56 in 
wait_for_finished
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/test_importlib/test_locks.py", 
line 99 in run_deadlock_avoidance_test
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/test_importlib/test_locks.py", 
line 113 in test_no_deadlock
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/case.py", line 605 in run
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/case.py", line 653 in 
__call__
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 122 in run
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 122 in run
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 122 in run
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 122 in run
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 122 in run
  File "/home/pi/Downloads/Python-3.6.3/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/support/__init__.py", line 
1765 in run
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/support/__init__.py", line 
1889 in _run_suite
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/support/__init__.py", line 
1933 in run_unittest
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/libregrtest/runtest.py", line 
172 in test_runner
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/libregrtest/runtest.py", line 
173 in runtest_inner
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/libregrtest/runtest.py", line 
137 in runtest
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/libregrtest/main.py", line 378 
in run_tests_sequential
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/libregrtest/main.py", line 457 
in run_tests
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/libregrtest/main.py", line 535 
in _main
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/libregrtest/main.py", line 509 
in main
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/libregrtest/main.py", line 584 
in main
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/regrtest.py", line 46 in _main
  File "/home/pi/Downloads/Python-3.6.3/Lib/test/regrtest.py", line 50 in 

  File "/home/pi/Downloads/Python-3.6.3/Lib/runpy.py", line 85 in _run_code
  File "/home/pi/Downloads/Python-3.6.3/Lib/runpy.py", line 193 in 
_run_module_as_main
Aborted

Every time. These exact same parameters and flags worked with 3.6.2 with no 
issue, but they die on 3.6.3

--
components: Build
messages: 305676
nosy: DNSGeek
priority: normal
severity: normal
status: open
title: test_importlib double free or corruption
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



[issue31962] test_importlib double free or corruption

2017-11-06 Thread Thomas Knox

Change by Thomas Knox :


--
components: +Tests

___
Python tracker 

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



[issue24340] co_stacksize estimate can be highly off

2017-11-06 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

The WIP pull request PR# 2827 seems to help. The following code prints 86 on 
python3.6 and 25 with PR 2827 applied.

def g():
try: pass
except ImportError as e: pass
try: pass
except ImportError as e: pass
try: pass
except ImportError as e: pass
try: pass
except ImportError as e: pass
try: pass
except ImportError as e: pass
try: pass
except ImportError as e: pass
print(g.__code__.co_stacksize)

--

___
Python tracker 

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



[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread STINNER Victor

Change by STINNER Victor :


--
type:  -> enhancement
versions:  -Python 2.7, Python 3.6, Python 3.8

___
Python tracker 

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



[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset ad455cd9243319b896c86074ffeb3bf78a82f4ec by Victor Stinner (Nir 
Soffer) in branch 'master':
bpo-31945: Configurable blocksize in HTTP(S)Connection (#4279)
https://github.com/python/cpython/commit/ad455cd9243319b896c86074ffeb3bf78a82f4ec


--

___
Python tracker 

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



[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Thank you Nir Soffer for this nice enhancement. Sadly, since it's a new 
feature, it cannot be backport to Python 3.6 nor 2.7, since it's a new feature.

--

___
Python tracker 

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



[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

The commit message contains much more information than the NEWS and What's New 
entries. Maybe the What's New entry can be completed, I don't know. In the 
meanwhile, I close the issue :-) Nir: Feel free to create a new PR if you want 
to complete the What's New entry ;-)

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



[issue30952] include Math extension in SQlite

2017-11-06 Thread Big Stone

Big Stone  added the comment:

Hi Victor,

I would like to use math functions, specifically "exp(sum(log(x)))", on the 
Sqlite motor shipped embedded with Python on Windows.

It's an important corner case of what I miss in Sqlite motor, that forced me to 
(wait to) rely on SQLServer (or other big iron).

In my other hobby of Python-in-Scientific-cursus of France, having not a fully 
enabled SQLite (in its mathematic abilities) is also a problem.

Maybe there are other more important outstanding issues about embedded-SQlite 
integration with Python, but that one is hard to workaround.

--

___
Python tracker 

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



[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2017-11-06 Thread STINNER Victor

New submission from STINNER Victor :

http://buildbot.python.org/all/#/builders/47/builds/127

(...)
gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fprofile-use -fprofile-correction  -I. 
-I./Include-DPy_BUILD_CORE -o Objects/setobject.o Objects/setobject.c
Objects/setobject.c: In function ‘PySet_Clear’:
Objects/setobject.c:2579:1: internal compiler error: in create_edge, at 
cgraph.c:850
 };
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Makefile:1584: recipe for target 'Objects/setobject.o' failed
make[1]: Leaving directory 
'/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build'
make[1]: *** [Objects/setobject.o] Error 1


pythoninfo from the previous build:

* GCC 6.3.0 20170516
* os.uname: posix.uname_result(sysname='Linux', 
nodename='enable-optimizations-bot', release='4.9.0-3-amd64', version='#1 SMP 
Debian 4.9.30-2+deb9u2 (2017-06-26)', machine='x86_64')
* platform.platform: Linux-4.9.0-3-amd64-x86_64-with-debian-9.1

http://buildbot.python.org/all/#/builders/47/builds/126/steps/3/logs/stdio

--
components: Build
messages: 305682
nosy: gregory.p.smith, haypo, nascheme
priority: normal
severity: normal
status: open
title: AMD64 Debian PGO 3.x buildbot: compilation failed with an internal 
compiler error in create_edge
type: performance
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



[issue30952] [Windows] include Math extension in SQlite

2017-11-06 Thread STINNER Victor

Change by STINNER Victor :


--
title: include Math extension in SQlite -> [Windows] include Math extension in 
SQlite

___
Python tracker 

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



[issue31960] Protection against using a Future with another loop only works with await

2017-11-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I'm not sure what the desired semantics for Futures and multiple loops is.  On 
the one hand, there is little point in having two event loops in the same 
thread at once (except for testing purposes).  On the other hand, the Future 
implementation is entirely not thread-safe (btw, the constructor optimistically 
claims the done callbacks are scheduled using call_soon_threadsafe(), but the 
implementation actually calls call_soon()).

--

___
Python tracker 

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



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

2017-11-06 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

The attached pyperformance report compares cpython:master to 
nascheme:unwind_stack.  If I've done the tests correctly, the unwind_stack 
version is slightly faster.

--
Added file: https://bugs.python.org/file47253/perf_unwind_stack.txt

___
Python tracker 

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



[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-06 Thread Steve Dower

Steve Dower  added the comment:


New changeset a6ffec2e88437ed4fecb10cb359cf2fb64781e9a by Steve Dower (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31957: Fixes version detection. (GH-4298) (#4300)
https://github.com/python/cpython/commit/a6ffec2e88437ed4fecb10cb359cf2fb64781e9a


--

___
Python tracker 

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



[issue28791] update sqlite to latest version before beta 1

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

Oh wow, I didn't even know that Python included a copy of SQLite for Windows 
and macOS installers! I added it to my list of "embedded libraries" :-)
http://haypo-notes.readthedocs.io/cpython.html#embedded-libraries

--
nosy: +haypo

___
Python tracker 

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



[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2017-11-06 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

Hi Victor,

My first guess is that the build bot is not cleaning the fprofile
information after updating the source tree.  A few options:

- remove the profile-run-stamp file after checking out new code

- call "make profile-removal" after checkout of new code

- I can try to modify the makefile so that profile-run-stamp depends
  on the source files (.h, .c, etc).  I think that would make it
  re-generate automatically if the sources change.

On 2017-11-06, STINNER Victor wrote:
> 
> New submission from STINNER Victor :
> 
> http://buildbot.python.org/all/#/builders/47/builds/127
> 
> (...)
> gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 
> -Wall -Wstrict-prototypes-std=c99 -Wextra -Wno-unused-result 
> -Wno-unused-parameter -Wno-missing-field-initializers 
> -Werror=implicit-function-declaration -fprofile-use -fprofile-correction  -I. 
> -I./Include-DPy_BUILD_CORE -o Objects/setobject.o Objects/setobject.c
> Objects/setobject.c: In function ‘PySet_Clear’:
> Objects/setobject.c:2579:1: internal compiler error: in create_edge, at 
> cgraph.c:850
>  };
>  ^
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See  for instructions.
> Makefile:1584: recipe for target 'Objects/setobject.o' failed
> make[1]: Leaving directory 
> '/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build'
> make[1]: *** [Objects/setobject.o] Error 1
> 
> 
> pythoninfo from the previous build:
> 
> * GCC 6.3.0 20170516
> * os.uname: posix.uname_result(sysname='Linux', 
> nodename='enable-optimizations-bot', release='4.9.0-3-amd64', version='#1 SMP 
> Debian 4.9.30-2+deb9u2 (2017-06-26)', machine='x86_64')
> * platform.platform: Linux-4.9.0-3-amd64-x86_64-with-debian-9.1
> 
> http://buildbot.python.org/all/#/builders/47/builds/126/steps/3/logs/stdio
> 
> --
> components: Build
> messages: 305682
> nosy: gregory.p.smith, haypo, nascheme
> priority: normal
> severity: normal
> status: open
> title: AMD64 Debian PGO 3.x buildbot: compilation failed with an internal 
> compiler error in create_edge
> type: performance
> versions: Python 3.7
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue30952] [Windows] include Math extension in SQlite

2017-11-06 Thread Peter Otten

Peter Otten <__pete...@web.de> added the comment:

A possible workaround is to use create_function():

>>> import sqlite3, math
>>> db = sqlite3.connect(":memory:")
>>> db.execute("select sin(?);", (math.pi,)).fetchone()
Traceback (most recent call last):
  File "", line 1, in 
sqlite3.OperationalError: no such function: sin
>>> db.create_function("sin", 1, math.sin)
>>> db.execute("select sin(?);", (math.pi,)).fetchone()
(1.2246467991473532e-16,)

--
nosy: +peter.otten

___
Python tracker 

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



[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

I would prefer to catch os.lchmod() exception and reminds that lchmod() doesn't 
work. Search for _O_TMPFILE_WORKS in Lib/tempfile.py for a Python example of 
code trying to use a function, or falls back on something else.

(I gave other examples for C code in a comment on PR 4267.)

--
nosy: +haypo

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:

FYI I already started a thread on python-dev:
[Python-Dev] Partial support of a platform
https://mail.python.org/pipermail/python-dev/2017-November/150238.html

--

___
Python tracker 

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



[issue31884] [Windows] subprocess set priority on windows

2017-11-06 Thread STINNER Victor

New submission from STINNER Victor :

Please describe the issue.

--
nosy: +haypo
title: subprocess set priority on windows -> [Windows] subprocess set priority 
on windows
versions:  -Python 3.8

___
Python tracker 

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



[issue31770] crash and refleaks when calling sqlite3.Cursor.__init__() more than once

2017-11-06 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset e56ab746a965277ffcc4396d8a0902b6e072d049 by Victor Stinner (Oren 
Milman) in branch 'master':
bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() 
more than once (#3968)
https://github.com/python/cpython/commit/e56ab746a965277ffcc4396d8a0902b6e072d049


--

___
Python tracker 

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



[issue31770] crash and refleaks when calling sqlite3.Cursor.__init__() more than once

2017-11-06 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4264

___
Python tracker 

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



[issue31770] crash and refleaks when calling sqlite3.Cursor.__init__() more than once

2017-11-06 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4265

___
Python tracker 

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



  1   2   >