[issue30046] csv: Inconsistency re QUOTE_NONNUMERIC

2017-04-13 Thread Xiang Zhang

Xiang Zhang added the comment:

boolean is not quoted since in Python it's a subclass of int so True and False 
are numeric. This is also the case with numeric objects defining __int__ or 
__float__ but doesn't get a corresponding string representation.

Since QUOTE_NONNUMERIC will converts data to float when reading, I think we may 
force the converting even when writing so the inconsistency would disappear. Or 
document this limitation.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue22117] Rewrite pytime.h to work on nanoseconds

2017-04-13 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
pull_requests: +1245

___
Python tracker 

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



[issue30045] Bad parameter name in re.escape()

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looked not correct to me but if you say "pattern" seems right I'm closing 
this issue.

I'll update the parameter name in PR 1048.

--
resolution:  -> works for me
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



[issue30060] Crash on Py_Finalize if Py_NoSiteFlag is used

2017-04-13 Thread Stephen Kelly

Stephen Kelly added the comment:

I found that if I build and run this code with Python 3, then I get a very 
different backtrace.

KernelBase.dll!7ff963466142()   Unknown
python36_d.dll!Py_FatalError(const char * msg) Line 1457C
python36_d.dll!PyEval_AcquireLock() Line 253C
mn.exe!main(int argc, char * * argv) Line 22C
[External Code] 

The failure is

 Py_FatalError("PyEval_AcquireLock: current thread state is NULL");

So, it is not clear to me what is incorrect about this code, but presumably I 
have done something incorrect here?

--

___
Python tracker 

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



[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

2017-04-13 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
pull_requests: +1246

___
Python tracker 

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



[issue30064] BaseSelectorEventLoop.sock_{recv, sendall}() don't remove their callbacks when canceled

2017-04-13 Thread Evgeny Kapun

New submission from Evgeny Kapun:

Code:

import asyncio as a
import socket as s

@a.coroutine
def coro():
s1, s2 = s.socketpair()
s1.setblocking(False)
s2.setblocking(False)
try:
yield from a.wait_for(loop.sock_recv(s2, 1), 1)
except a.TimeoutError:
pass
yield from loop.sock_sendall(s1, b'\x00')
yield
s1.close()
s2.close()

loop = a.get_event_loop()
loop.run_until_complete(coro())

Result:

Exception in callback BaseSelectorEventLoop._sock_recv(, 
True, , 1)
handle: , True, 
, 1)>
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/events.py", line 127, in _run
self._callback(*self._args)
  File "/usr/lib/python3.6/asyncio/selector_events.py", line 378, in 
_sock_recv
self.remove_reader(fd)
  File "/usr/lib/python3.6/asyncio/selector_events.py", line 342, in 
remove_reader
return self._remove_reader(fd)
  File "/usr/lib/python3.6/asyncio/selector_events.py", line 279, in 
_remove_reader
key = self._selector.get_key(fd)
  File "/usr/lib/python3.6/selectors.py", line 189, in get_key
return mapping[fileobj]
  File "/usr/lib/python3.6/selectors.py", line 70, in __getitem__
fd = self._selector._fileobj_lookup(fileobj)
  File "/usr/lib/python3.6/selectors.py", line 224, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
  File "/usr/lib/python3.6/selectors.py", line 41, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1

--
components: asyncio
messages: 291593
nosy: abacabadabacaba, yselivanov
priority: normal
severity: normal
status: open
title: BaseSelectorEventLoop.sock_{recv,sendall}() don't remove their callbacks 
when canceled
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



[issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 9b409ff41ceb2d7ea7e8d25a7bbf5eb7d46625f3 by Mariatta in branch 
'3.6':
[3.6] bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError 
(GH-949) (#1105)
https://github.com/python/cpython/commit/9b409ff41ceb2d7ea7e8d25a7bbf5eb7d46625f3


--
nosy: +Mariatta

___
Python tracker 

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



[issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1247

___
Python tracker 

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



[issue24139] Use sqlite3 extended error codes

2017-04-13 Thread Aviv Palivoda

Changes by Aviv Palivoda :


--
pull_requests: +1249

___
Python tracker 

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



[issue16379] SQLite error code not exposed to python

2017-04-13 Thread Aviv Palivoda

Changes by Aviv Palivoda :


--
pull_requests: +1248

___
Python tracker 

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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-13 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

_posixsubprocess.fork_exec() takes a sequence of file descriptors. It first 
validates it, and since the validation is passed uses it without checking for 
errors. But since __len__, __getitem__ and __int__ can execute user code and 
release GIL, errors can occur after the validation. This can cause a crash.

Proposed patch fixes this by the simplest way -- it restricts the type of a 
sequence to tuple and types of elements to int. Since _posixsubprocess is 
private module this shouldn't break third-party code.

Other issue with _posixsubprocess.fork_exec() was that it converts args to a 
tuple or a list and iterate it without checking if the size is changed.

--
components: Extension Modules
messages: 291595
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Insufficient validation in _posixsubprocess.fork_exec()
type: crash
versions: Python 3.5, 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



[issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 4d015a40a7b9c3c1b8cfbe81453187d700a43163 by Mariatta in branch 
'3.5':
[3.5] bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError 
(GH-949) (#1107)
https://github.com/python/cpython/commit/4d015a40a7b9c3c1b8cfbe81453187d700a43163


--

___
Python tracker 

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



[issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

PR has been backported into 3.5 and 3.6. Thanks all :)

--
stage: backport needed -> resolved
status: open -> closed
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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 97a40b7a5b2979fb17e1751c139fd4ba1ebd5276 by Mariatta (Nevada 
Sanchez) in branch '3.6':
bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-752)
https://github.com/python/cpython/commit/97a40b7a5b2979fb17e1751c139fd4ba1ebd5276


--
nosy: +Mariatta

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1250

___
Python tracker 

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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1251

___
Python tracker 

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



[issue30060] Crash on Py_Finalize if Py_NoSiteFlag is used

2017-04-13 Thread Stephen Kelly

Stephen Kelly added the comment:

The issue

 http://bugs.python.org/issue17978 

has a quite similar backtrace and there is discussion in

 http://bugs.python.org/issue17703#msg241412

about changing the TRASHCAN macro to access the _PyThreadState_Current directly 
instead of calling PyThreadState_Get (which is fatal for a nullptr). The very 
next thing the TRASHCAN macro does is check if the thread state is nullptr in a 
non-fatal way. 

Is there a reason not to apply that patch?

--

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 84c2d75489a84174d8993aea292828662e35a50f by Mariatta in branch 
'3.6':
Revert "bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-752)" 
(GH-1109)
https://github.com/python/cpython/commit/84c2d75489a84174d8993aea292828662e35a50f


--

___
Python tracker 

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



[issue30055] Missed testcleanup in decimal.rst

2017-04-13 Thread Stefan Krah

Stefan Krah added the comment:


New changeset 2c0b5c664ba7d36dc09788d3778d5b33e3fa1bd0 by Stefan Krah (Marco 
Buttu) in branch 'master':
bpo-30055: add testcleanup to leave a fresh context (#1094)
https://github.com/python/cpython/commit/2c0b5c664ba7d36dc09788d3778d5b33e3fa1bd0


--

___
Python tracker 

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



[issue30036] The bugs website doesn't use httpS by default

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks for the report.
Issue with the footer of python.org website can be filed at 
https://github.com/python/pythondotorg

Regarding the fact that bugs.python.org does not use https by default, it is 
being tracked here http://psf.upfronthosting.co.za/roundup/meta/issue463

I'm closing this and marking as duplicate.
Thanks :)

--
nosy: +Mariatta
resolution:  -> duplicate
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



[issue30055] Missed testcleanup in decimal.rst

2017-04-13 Thread Stefan Krah

Stefan Krah added the comment:

Thanks, looks good.  (I hope GitHub runs the doctests at Travis CI, locally 
most of them failed so I didn't bother to run the tests for this one.)

--
assignee: docs@python -> skrah
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30055] Missed testcleanup in decimal.rst

2017-04-13 Thread Marco Buttu

Marco Buttu added the comment:

We are not executing the doctests on Travis CI, but I executed them locally.  
That's why I realized there was a missed testcleanup.  The issue27200 wants to 
fix all doctests, and I actually completed the job, but three PRs are still 
opened, and I am waiting for review approval.  If you want to contribute to the 
reviews, look for 'bpo-27200' on the GitHub PRs.  I hope the doctest will be 
run on Travis as soon as possible.  Thanks, Marco

--

___
Python tracker 

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



[issue29284] Include thread_name_prefix in the concurrent.futures.ThreadPoolExecutor example 17.4.2.1

2017-04-13 Thread John Taylor

John Taylor added the comment:

Can this be added to Python 3.7?

https://docs.python.org/3.7/library/concurrent.futures.html#threadpoolexecutor-example

Thanks.

--

___
Python tracker 

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



[issue30055] Missed testcleanup in decimal.rst

2017-04-13 Thread Stefan Krah

Stefan Krah added the comment:

Ok great, maybe I'll take a look.

--

___
Python tracker 

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



[issue30059] No documentation for C type Py_Ellipsis

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are precedences in tuple.rst and method.rst.

--

___
Python tracker 

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



[issue29791] print documentation: flush is also a keyword argument

2017-04-13 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 61b9ac93712df8092a25223cd56fa6528359792b by Berker Peksag in 
branch 'master':
bpo-29791: Clarify that flush is keyword-only argument (#1093)
https://github.com/python/cpython/commit/61b9ac93712df8092a25223cd56fa6528359792b


--

___
Python tracker 

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



[issue29791] print documentation: flush is also a keyword argument

2017-04-13 Thread Berker Peksag

Changes by Berker Peksag :


--
pull_requests: +1252

___
Python tracker 

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



[issue29791] print documentation: flush is also a keyword argument

2017-04-13 Thread Berker Peksag

Changes by Berker Peksag :


--
pull_requests: +1253

___
Python tracker 

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



[issue30063] DeprecationWarning in json/encoder.py

2017-04-13 Thread R. David Murray

R. David Murray added the comment:

If a warning is causing iPython to hang, there is something seriously wrong 
with iPython.  A warning is just a message written to stderr, it doesn't affect 
the execution of the program.

The json module does not natively support datetime, so whatever is happening, 
it is being triggered by non-stdlib code (probably a json subclass in the vcs 
package you are working with).  I suggest you pursue this with the community 
that originated the vcs package.

--
nosy: +r.david.murray
resolution:  -> third party
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue30063] DeprecationWarning in json/encoder.py

2017-04-13 Thread R. David Murray

R. David Murray added the comment:

In case it wasn't clear: I seriously doubt that iPython is hanging due to the 
warning, I think something else must be happening and the warning is a red 
herring.

--

___
Python tracker 

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



[issue30066] anaconda3::traitsu::NotImplementedError

2017-04-13 Thread leopoldo

New submission from leopoldo:

the code below crash when run on anaconda3



import traits.api as trapi
import traitsui.api as trui

from traits.api import HasTraits, Str, Range, Enum

class Person(HasTraits):
name = Str('Jane Doe')
age = Range(low=0)
gender = Enum('female', 'male')

person = Person(age=30)

from traitsui.api import Item, RangeEditor, View

person_view = View(
Item('name'),
Item('gender'),
Item('age', editor=RangeEditor(mode='spinner')),
buttons=['OK', 'Cancel'],
resizable=True,
)


person.configure_traits(view=person_view)
---
NotImplementedError   Traceback (most recent call last)
 in ()
> 1 person.configure_traits(view=person_view)

/home/leopoldo/anaconda3/lib/python3.6/site-packages/traits/has_traits.py in 
configure_traits(self, filename, view, kind, edit, context, handler, id, 
scrollable, **args)
   2169 context = self
   2170 rc = toolkit().view_application( context, self.trait_view( 
view ),
-> 2171kind, handler, id, 
scrollable, args )
   2172 if rc and (filename is not None):
   2173 fd = None

/home/leopoldo/anaconda3/lib/python3.6/site-packages/traitsui/toolkit.py in 
view_application(self, context, view, kind, handler, id, scrollable, args)
289 
290 """
--> 291 raise NotImplementedError
292 
293 
#---

NotImplementedError:

--
messages: 291611
nosy: leopoldotosi
priority: normal
severity: normal
status: open
title: anaconda3::traitsu::NotImplementedError
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



[issue29791] print documentation: flush is also a keyword argument

2017-04-13 Thread Berker Peksag

Berker Peksag added the comment:


New changeset df9783720e40773e7854d2f4e4cfc93f0a2c08b8 by Berker Peksag in 
branch '3.5':
bpo-29791: Clarify that flush is keyword-only argument (GH-1093)
https://github.com/python/cpython/commit/df9783720e40773e7854d2f4e4cfc93f0a2c08b8


--

___
Python tracker 

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



[issue29791] print documentation: flush is also a keyword argument

2017-04-13 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 119d94ad37a99ecb0b8329467d04cd9d909e310e by Berker Peksag in 
branch '3.6':
bpo-29791: Clarify that flush is keyword-only argument (GH-1093)
https://github.com/python/cpython/commit/119d94ad37a99ecb0b8329467d04cd9d909e310e


--

___
Python tracker 

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



[issue29791] print documentation: flush is also a keyword argument

2017-04-13 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report!

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



[issue30066] anaconda3::traitsu::NotImplementedError

2017-04-13 Thread Berker Peksag

Berker Peksag added the comment:

Please report this to either traits or traitsui developers. This issue tracker 
is for issues with CPython and its standard library, not for third-party 
modules on PyPI.

--
nosy: +berker.peksag
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue30036] The bugs website doesn't use httpS by default

2017-04-13 Thread Berker Peksag

Berker Peksag added the comment:

I've changed the bugs.p.o link to use HTTPS at python.org.

--
nosy: +berker.peksag

___
Python tracker 

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



[issue27200] make doctest in CPython has failures

2017-04-13 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 7b2491a6aa5cdc1f8f9e3fd9df91f29ee69aa982 by Berker Peksag (Marco 
Buttu) in branch 'master':
bpo-27200: Fix pathlib, ssl, turtle and weakref doctests (GH-616)
https://github.com/python/cpython/commit/7b2491a6aa5cdc1f8f9e3fd9df91f29ee69aa982


--

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Nevada Sanchez, please create your PR against the master branch.
Once that is merged, we will backport it to the 3.6 branch.

Thanks :)

--

___
Python tracker 

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



[issue30021] Add examples for re.escape()

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 8fc7bc2b7631ee819ee614e47b6f44bacebe1574 by Serhiy Storchaka in 
branch 'master':
bpo-30021: Add examples for re.escape(). (#1048)
https://github.com/python/cpython/commit/8fc7bc2b7631ee819ee614e47b6f44bacebe1574


--

___
Python tracker 

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



[issue30021] Add examples for re.escape()

2017-04-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1254

___
Python tracker 

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



[issue30021] Add examples for re.escape()

2017-04-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1255

___
Python tracker 

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



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2017-04-13 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> rejected
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



[issue30021] Add examples for re.escape()

2017-04-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1256

___
Python tracker 

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



[issue30021] Add examples for re.escape()

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 936633282220768a6fec9bd6bb53ee9e3ec354df by Serhiy Storchaka in 
branch '3.6':
bpo-30021: Add examples for re.escape(). (#1048) (#1115)
https://github.com/python/cpython/commit/936633282220768a6fec9bd6bb53ee9e3ec354df


--

___
Python tracker 

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



[issue30021] Add examples for re.escape()

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset e2cf9a918439006fb27f67c1939d0370886650e7 by Serhiy Storchaka in 
branch '3.5':
bpo-30021: Add examples for re.escape(). (#1048) (#1116)
https://github.com/python/cpython/commit/e2cf9a918439006fb27f67c1939d0370886650e7


--

___
Python tracker 

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



[issue30021] Add examples for re.escape()

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 53ad68434ce914defcc1b734cce4b9b4d79ca3fc by Serhiy Storchaka in 
branch '2.7':
bpo-30021: Add examples for re.escape(). (#1048) (#1118)
https://github.com/python/cpython/commit/53ad68434ce914defcc1b734cce4b9b4d79ca3fc


--

___
Python tracker 

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



[issue30021] Add examples for re.escape()

2017-04-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Nevada Sanchez

Changes by Nevada Sanchez :


--
pull_requests: +1257

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset a6e395dffadf8c5124903c01ad69fefa36b1a935 by Mariatta (Nevada 
Sanchez) in branch 'master':
bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119)
https://github.com/python/cpython/commit/a6e395dffadf8c5124903c01ad69fefa36b1a935


--

___
Python tracker 

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



[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 22a594a0047d7706537ff2ac676cdc0f1dcb329c by Mariatta (Armin Rigo) 
in branch 'master':
bpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089)
https://github.com/python/cpython/commit/22a594a0047d7706537ff2ac676cdc0f1dcb329c


--
nosy: +Mariatta

___
Python tracker 

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



[issue29995] re.escape() escapes too much

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 5908300e4b0891fc5ab8bd24fba8fac72012eaa7 by Serhiy Storchaka in 
branch 'master':
bpo-29995: re.escape() now escapes only special characters. (#1007)
https://github.com/python/cpython/commit/5908300e4b0891fc5ab8bd24fba8fac72012eaa7


--

___
Python tracker 

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



[issue29995] re.escape() escapes too much

2017-04-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-13 Thread Gregory P. Smith

Gregory P. Smith added the comment:

nice find.  did anyone's code actually run into this issue?

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



[issue30065] Insufficient validation in _posixsubprocess.fork_exec()

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is hard to reproduce (especially the second issue) since in all cases in the 
stdlib a list passed to fork_exec() is just created by sorted() and doesn't 
have other references. But if someone is so insane that passes int-like objects 
with non-idempotent __int__ as file descriptors his can get a crash in debug 
build (or mystical bugs in release build). Added tests utilizes this, but this 
unlikely happens in real code.

I have found this issue during analyzing usages of PyObject_Size(), 
PySequence_Size() and PyMapping_Size() in issue30061.

--

___
Python tracker 

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



[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage: test needed -> backport needed

___
Python tracker 

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



[issue16379] SQLite error code not exposed to python

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I can't reproduce here, on Ubuntu 16.04, after running the test 500 times.

--

___
Python tracker 

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



[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-04-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, I can reproduce now.

--

___
Python tracker 

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



[issue29636] Specifying indent in the json.tool command

2017-04-13 Thread Daniel Himmelstein

Daniel Himmelstein added the comment:

@bob.ippolito thanks for pointing to jq as a reference implementation. I 
updated the pull request (https://git.io/vS9o8) to implement all of the 
relevant options. Currently, the PR supports the following mutually exclusive 
arguments:

--indent
--no-indent
--tab
--compact

These additions took 16 new lines of code in tool.py and 41 new lines of tests. 
However, I am happy to refactor the tests to be less repetitive if we choose to 
go forward with these changes.

@serhiy.storchaka I took a maximalist approach with respect to adding 
indentation options to GH #345. Although I know not all of the options may get 
merged, I thought we might as well work backwards.

However, the more I think about it, I do think every option above is a unique 
and valuable addition. I think that even with the changes, json.tool remains a 
lightweight wrapper json.load + json.dump.

--

___
Python tracker 

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



[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-04-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +1258

___
Python tracker 

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



[issue30067] _osx_support.py: misplaced flags in re.sub()

2017-04-13 Thread Jakub Wilk

New submission from Jakub Wilk:

Lib/_osx_support.py contains the following line:

flags = re.sub(r'-arch\s+\w+\s', ' ', flags, re.ASCII)

But the 4th re.sub() argument is the maximum number of substitutions, so this 
is equivalent to:

flags = re.sub(r'-arch\s+\w+\s', ' ', flags, count=256)

It was probably meant to be:

flags = re.sub(r'-arch\s+\w+\s', ' ', flags, flags=re.ASCII)


This bug was found using pydiatra:
http://jwilk.net/software/pydiatra

--
components: Library (Lib)
messages: 291631
nosy: jwilk
priority: normal
severity: normal
status: open
title: _osx_support.py: misplaced flags in re.sub()

___
Python tracker 

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



[issue30067] _osx_support.py: misplaced flags in re.sub()

2017-04-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +easy
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.5, 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



[issue28765] _sre.compile(): be more strict on types of indexgroup and groupindex

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since _sre.compile is not a public API, and is called only with exact 
list/dict/tuple types in the stdlib, I prefer to ignore possible differences 
between base classes and subclasses. This makes the code cleaner.

Searching on GitHub shows that usages of _sre.compile() in third-party code are 
not compatible with current _sre.compile() since all arguments now are 
mandatory and indexgroup must be a tuple, not None.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue29999] repr() of ImportError misses keyword arguments name and path

2017-04-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch also changes the repr of BaseException with a single argument. It no 
longer contains a trailing comma.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1259

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 2cdf087d1fd48f7d0f95b5a0b31b9a624fa84751 by Mariatta in branch 
'3.6':
[3.6] bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119) 
(GH-1122)
https://github.com/python/cpython/commit/2cdf087d1fd48f7d0f95b5a0b31b9a624fa84751


--

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1260

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

PR has been merged and backported to 3.6.
I also added Nevada Sanchez to Misc/ACKS.
Thanks all :)

--
resolution:  -> fixed

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 947629916a5ecb1f6f6792e9b9234e084c5bf274 by Mariatta in branch 
'master':
bpo-29869: Add Nevada Sanchez to Misc/ACKS (GH-1125)
https://github.com/python/cpython/commit/947629916a5ecb1f6f6792e9b9234e084c5bf274


--

___
Python tracker 

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



[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


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



[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1261

___
Python tracker 

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



[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-13 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1262

___
Python tracker 

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



[issue29880] python3.6 install readline ,and then cpython exit

2017-04-13 Thread Berker Peksag

Changes by Berker Peksag :


--
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset cbc46afa59dcc43c2c8c90ae7a0a0dc404325a89 by Mariatta in branch 
'3.6':
[3.6] bpo-29694: race condition in pathlib mkdir with flags parents=True 
(GH-1089). (GH-1126)
https://github.com/python/cpython/commit/cbc46afa59dcc43c2c8c90ae7a0a0dc404325a89


--

___
Python tracker 

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



[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset d7abeb7024b9755c291c29bdc8c4494246e975ad by Mariatta in branch 
'3.5':
[3.5] bpo-29694: race condition in pathlib mkdir with flags parents=True 
(GH-1089). (GH-1127)
https://github.com/python/cpython/commit/d7abeb7024b9755c291c29bdc8c4494246e975ad


--

___
Python tracker 

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



[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-13 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

I merged Armin's PR and backported tp 3.5 and 3.6.
Closing this now.
Thanks all :)

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



[issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs

2017-04-13 Thread Howie Benefiel

Howie Benefiel added the comment:

I'm going to make a note in the documentation. I should have a PR for it in 
about 1 day.

--
nosy: +Howie Benefiel

___
Python tracker 

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



[issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs

2017-04-13 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1263

___
Python tracker 

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



[issue30061] Check if PyObject_Size() raised an error

2017-04-13 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-13 Thread Xiang Zhang

New submission from Xiang Zhang:

In _io._IOBase.readlines, it straightly uses PyIter_Next(self). But 
iter(_io._IOBase) does more work than just returning itself.

>>> import _io
>>> f = _io._IOBase()
>>> f.close()
>>> f.readlines()
Traceback (most recent call last):
  File "", line 1, in 
ValueError: I/O operation on closed file.
>>> f.readlines(10)
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: '_io._IOBase' object has no attribute 'read'

--
components: IO
messages: 291641
nosy: xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: missing iter(self) in _io._IOBase.readlines
type: behavior
versions: Python 2.7, Python 3.5, 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



[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-13 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1264

___
Python tracker 

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