[issue28272] a redundant check in maybe_small_long

2017-03-01 Thread Oren Milman

Oren Milman added the comment:

ping (just to close the issue, I think)

--

___
Python tracker 

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



[issue29690] no %z directive for strptime in python2, doc says nothing about it

2017-03-01 Thread Mathieu Dupuy

New submission from Mathieu Dupuy:

➜  ~ cat dt.py 
from datetime import *
dt = datetime.strptime('+1720', '%z')
print(dt)
➜  ~ python2 dt.py 
Traceback (most recent call last):
  File "dt.py", line 2, in 
dt = datetime.strptime('+1720', '%z')
  File "/usr/lib/python2.7/_strptime.py", line 324, in _strptime
(bad_directive, format))
ValueError: 'z' is a bad directive in format '%z'
➜  ~ python3 dt.py
1900-01-01 00:00:00+17:20

We should either mention it in doc, either cherry-pick the code from python3

--
components: Library (Lib)
messages: 288782
nosy: deronnax
priority: normal
severity: normal
status: open
title: no %z directive for strptime in python2, doc says nothing about it
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue29679] Add @contextlib.asynccontextmanager

2017-03-01 Thread Nick Coghlan

Nick Coghlan added the comment:

In the specific case of contextlib, most of the APIs should be able to 
transparently support async/await without negatively impacting their 
synchronous behaviour, so after the python-dev discussion, I think one module 
with separate sync and async test suites is a good way to go for contextlib 
specifically: 
https://mail.python.org/pipermail/python-dev/2017-March/147520.html

However, as noted in that message, I *don't* think we can conclude that's going 
to be the right answer for the standard library in general - for many modules, 
a separate a or aio published via PyPI and potentially 
considered for stdlib inclusion later is going to make more sense.

--

___
Python tracker 

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



[issue22810] tkinter: "alloc: invalid block:" after askopenfilename

2017-03-01 Thread Todd Goldfinger

Todd Goldfinger added the comment:

This crashes reliably on Win10 with the same error message.  Place cursor after 
the 2 in the top spin box.  Type 0.

I have the following files in Anaconda3/tcl: tcl86t.lib, tcl86tg.lib, 
tclstub86.lib, tk86t.lib, tk86tg.lib, tkstub86.lib.


Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC 
v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

--
components: +Windows
nosy: +Todd Goldfinger, paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.6 -Python 2.7, Python 3.4
Added file: http://bugs.python.org/file46683/crash.py

___
Python tracker 

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



[issue29594] implementation of __or__ in enum.auto

2017-03-01 Thread Ethan Furman

Ethan Furman added the comment:

Serhiy, agreed.  Closing.

Marc, thanks, I see I missed supporting non-auto() combinations.  Feel free to 
open an issue for that at:

  https://bitbucket.org/stoneleaf/aenum

Either way I'll get that fixed.

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



[issue28129] assertion failures in ctypes

2017-03-01 Thread Oren Milman

Oren Milman added the comment:

The fix for issue #25659 already replaced the assertions in
CDataType_from_buffer and CDataType_from_buffer_copy with if statements (my
bad for missing that issue when I opened this one).
In addition, that fix added some tests, so I also added some, and created a
pull request.

I run the test module again, and on my Windows 10, the same tests failed with
and without my patches. However, on my Ubuntu 16.04 VM, none of the tests
failed.

--

___
Python tracker 

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



[issue28129] assertion failures in ctypes

2017-03-01 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +322

___
Python tracker 

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



[issue29679] Add @contextlib.asynccontextmanager

2017-03-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

At third alternative is to create an asynctools module to collect together 
tools that work with the async keyword but aren't dependent on asyncio.

--

___
Python tracker 

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



[issue29679] Add @contextlib.asynccontextmanager

2017-03-01 Thread STINNER Victor

Changes 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



[issue29302] add contextlib.AsyncExitStack

2017-03-01 Thread STINNER Victor

Changes 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



[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-03-01 Thread Aviv Palivoda

Aviv Palivoda added the comment:

I changed the patch to use SQLITE_VERSION_NUMBER and it looks way better. 
Thanks Serhiy

--

___
Python tracker 

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



[issue29594] implementation of __or__ in enum.auto

2017-03-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't think it is worthwhile. Using underscored names looks pretty pythonic 
to me.

--

___
Python tracker 

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



[issue29689] Asyncio-namespace helpers for async_generators

2017-03-01 Thread Scott Russ

Changes by Scott Russ :


--
nosy: +Scott Russ

___
Python tracker 

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



[issue29594] implementation of __or__ in enum.auto

2017-03-01 Thread Marc Guetg

Marc Guetg added the comment:

@ethan, didn't know about aenum, thanks for showing it to me. However it 
doesn't seem to support the behavior I'm after (or I'm doing something wrong)

import aenum

try:
class Foo(aenum.Flag):
a = aenum.auto()
b = a | aenum.auto()
except Exception as err:
print(err)

try:
class Bar(aenum.Flag):
a = aenum.auto()
b = aenum.auto() | a
except Exception as err:
print(err)

results in 
unsupported operand type(s) for |: 'int' and 'auto'
exceptions must derive from BaseException

where the latter might be a bug in the implementation.


I do realize that I'm stuck with this for the moment. My motivation with 
opening this thread was that I was wondering if such a feature would be 
worthwhile for the community. In case there is interest in this feature I would 
try to run the unit test and follow all the steps to try to push it through. 
However I save myself the work in case the community decides that the 
implementation is not worth it. Which would also be fine with me, as I monkey 
patched it for my code - so no problem on my end.

--

___
Python tracker 

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



[issue29689] Asyncio-namespace helpers for async_generators

2017-03-01 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue29689] Asyncio-namespace helpers for async_generators

2017-03-01 Thread Codey Oxley

New submission from Codey Oxley:

Expanding an async_generator to any container-type currently makes you do an 
async-for loop/comprehension. There are some third-party libs (aitertools) that 
have helpers but it would be nice for this to be upstream for list, tuple, 
dict, set, etc.

Usage might be:

expanded: List[int] = await asyncio.list(gen())

--
components: Library (Lib), asyncio
messages: 288773
nosy: Codey Oxley, gvanrossum, yselivanov
priority: normal
severity: normal
status: open
title: Asyncio-namespace helpers for async_generators
type: enhancement
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



[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-03-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> sqlite3_open_v2 - 2007-09-04 (3.5.0) alpha
> sqlite3_prepare_v2 - 2007-01-04 (3.3.9)
> sqlite3_close_v2 - 2012-09-03 (3.7.14)

There are compile-time checks for supporting SQLite older than 3.2.2.

I think it is better to use the preprocessor rather of autotools for 
conformance with the rest of code.

> What should I do for this to work on windows?

On Windows manually written PC/pyconfig.h is used rather of generated by 
configure pyconfig.h. If you change pyconfig.h, you should update PC/pyconfig.h 
too. But I think this is not needed in this case. Just use 
SQLITE_VERSION_NUMBER.

--

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2017-03-01 Thread Brett Cannon

Brett Cannon added the comment:

I had thought about trying to pull down the remote but it did seems 
unnecessarily messy when the SHA1 hash should match across various remotes only 
when the commits actually match.

--

___
Python tracker 

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



[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread R. David Murray

R. David Murray added the comment:

We don't make breaking changes unless there is strong motivation, which is 
lacking here.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-03-01 Thread Aviv Palivoda

Aviv Palivoda added the comment:

from https://www.sqlite.org/changes.html:
sqlite3_open_v2 - 2007-09-04 (3.5.0) alpha
sqlite3_prepare_v2 - 2007-01-04 (3.3.9)
sqlite3_close_v2 - 2012-09-03 (3.7.14)

In issue 29355 Ma Lin says that RHEL6 comes with SQLite 3.6.x. I think that 
removing that removing the check for sqlite3_prepare_v2 and sqlite3_open_v2 is 
fine but sqlite3_close_v2 need to stay.

> Don't forget about Windows where autotools are not used.

What should I do for this to work on windows?

--

___
Python tracker 

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



[issue29679] Add @contextlib.asynccontextmanager

2017-03-01 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Vinícius Dantas

Vinícius Dantas added the comment:

If it is tagged for future releases, whoever choose to update their Python
version should expect code breaking and API changes, shouldn't them? I
don't see code breaking as an issue against this request.

On 1 March 2017 at 14:33, Raymond Hettinger  wrote:

>
> Raymond Hettinger added the comment:
>
> It's too late to change this API.  As Serhiy says, it risks breaking code
> that is currently running and correct.
>
> Note the the __doc__ on functions is set to None when there is no
> docstring.  For better or worse, returning None is common in the Python
> world.
>
> --
> nosy: +rhettinger
> resolution:  -> rejected
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

-- 
Vinícius Dantas de Lima Melo
Graduando em Ciências e Tecnologia
Universidade Federal do Rio Grande do Norte (UFRN)
Escola de Ciências e Tecnologia (ECT)
Natal, Rio Grande do Norte
vinicius.gpp...@gmail.com viniciusdan...@bct.ect.ufrn.br
vinicius.dantasdelimam...@mail.utoronto.ca | Celular/Mobile Phone: +1 647
447 5737
Skype: viniciusdantas01

--

___
Python tracker 

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



[issue29302] add contextlib.AsyncExitStack

2017-03-01 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue29688] Document Path.absolute

2017-03-01 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
pull_requests: +321

___
Python tracker 

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



[issue29688] Document Path.absolute

2017-03-01 Thread Jim Fasarakis-Hilliard

New submission from Jim Fasarakis-Hilliard:

Method absolute of Path objects lacked documentation, proposed PR adds relevant 
method to docs.

--
assignee: docs@python
components: Documentation
messages: 288767
nosy: Jim Fasarakis-Hilliard, docs@python
priority: normal
severity: normal
status: open
title: Document Path.absolute
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



[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

It's too late to change this API.  As Serhiy says, it risks breaking code that 
is currently running and correct.

Note the the __doc__ on functions is set to None when there is no docstring.  
For better or worse, returning None is common in the Python world.

--
nosy: +rhettinger
resolution:  -> rejected
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



[issue29687] smtplib does not support proxy

2017-03-01 Thread Rares Vernica

New submission from Rares Vernica:

smtplib does not support connections through a proxy. The accepted workaround 
is something like:

```
import smtplib
import socks

socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, proxy_host, proxy_port)
socks.wrapmodule(smtplib)

smtp = smtplib.SMTP()
```

The side-effects of `socks.wrapmodule` impact other libraries which don't need 
to use the proxy, like `requests`. See here for a disucssion 
https://github.com/kennethreitz/requests/issues/3890

--
components: Library (Lib)
messages: 288765
nosy: rares
priority: normal
severity: normal
status: open
title: smtplib does not support proxy

___
Python tracker 

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



[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This can break a code that checks whether shortDescription() is None.

If you an empty string rather than None, just use the expression 
`shortDescription() or ''`.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Vinícius Dantas

Changes by Vinícius Dantas :


--
pull_requests: +319

___
Python tracker 

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



[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-03-01 Thread Martijn Pieters

Changes by Martijn Pieters :


--
pull_requests: +318

___
Python tracker 

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



[issue29686] Unittest - Return empty string instead of None object on shortDescription()

2017-03-01 Thread Vinícius Dantas

New submission from Vinícius Dantas:

I have been browsing around the unittest standard library, and I realized that 
TestCase's shortDescription() method at lib/pythonX.X/unittest/case.py returns 
None when the there is no docstring on the test that is running.
As shortDescription() should obviously return a string, I would recommend 
returning an empty string instead of None when no docstring is found.
This came to mind when I was using testscenario package, which only displays 
the scenarioname when shortDescription() returns something but None.
When we are starting from scratch a test suite, docstrings are left for another 
stage, when we have running (probably failed, if we are TDDing) unittests.
Last yet not least, I am sure it's a good practice to avoid returning None, 
which forces None-checks, returning empty strings, lists, objects of the return 
type expected from that function.

--
components: Tests
messages: 288763
nosy: viniciusd
priority: normal
severity: normal
status: open
title: Unittest - Return empty string instead of None object on 
shortDescription()
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue29302] add contextlib.AsyncExitStack

2017-03-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Looking at the code: we don't need to use iscoroutinefunction at all.  If we 
had separate methods for sync and async context managers, you can store the 
flag if a function is async or sync along with it.

So _exit_callbacks should store tuples `(is_async, cb)`, instead of just `cb`.

asyncio.iscoroutinefunction differs from inspect.iscoroutinefunction a little 
bit to support asyncio-specific debug coroutine wrapper functions.  We should 
avoid using any version of iscoroutinefunction here.

--

___
Python tracker 

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



[issue29302] add contextlib.AsyncExitStack

2017-03-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Alexander, 

You don't need asyncio.isocoroutinefunction. Please use 
inspect.iscoroutinefunction and inspect.iscoroutine.

Nick,

I'm +1 to have a separate class AsyncExitStack.

> - assume everything passed to it is a coroutine or an async context manager 
> by default

I would add a separate set of methods prefixed with 'a' to handle async context 
managers.

> - always require close() to be called via await

I'd only have one coroutine 'aclose()' that would internally close sync and 
async context managers in the right order.

> - either add synchronous variants of the default-to-async methods 
> (`enter_context_sync`, `push_sync`, `callback_sync`), or else make them 
> auto-adapt to handle both synchronous and asynchronous inputs

I'd use the 'a' prefix. We use it already to name magic methods: __aenter__, 
__aexit__, __aiter__.

> - rather than using `iscoroutinefunction`, instead always invoke callbacks 
> with await, and wrap synchronous callbacks supplied using the above methods 
> in simple one-shot iterators

I'd favour a more explicit approach: separate methods for handling sync and 
async.

Also, speaking about asyncio dependancy -- we shouldn't have it. Using 
asyncio.iscoroutinefunction is unnecessary, inspect.iscoroutinefunction should 
be used instead.

--

___
Python tracker 

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



[issue29685] test_gdb failed

2017-03-01 Thread Marco

New submission from Marco:

make test output

studio@linux:~/Python-3.6.0> ./python -m test -v test_gdb
== CPython 3.6.0 (default, Mar 1 2017, 15:51:48) [GCC 4.8.5]
==   Linux-4.4.49-16-default-x86_64-with-SuSE-42.2-x86_64 little-endian
==   hash algorithm: siphash24 64bit
==  cwd: /home/studio/Python-3.6.0/build/test_python_32667
==  encodings: locale=UTF-8, FS=utf-8
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
Run tests sequentially
0:00:00 [1/1] test_gdb
test test_gdb crashed -- Traceback (most recent call last):
  File "/home/studio/Python-3.6.0/Lib/test/libregrtest/runtest.py", line 152, 
in runtest_inner
the_module = importlib.import_module(abstest)
  File "/home/studio/Python-3.6.0/Lib/importlib/__init__.py", line 126, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 978, in _gcd_import
  File "", line 961, in _find_and_load
  File "", line 950, in _find_and_load_unlocked
  File "", line 655, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 205, in _call_with_frames_removed
  File "/home/studio/Python-3.6.0/Lib/test/test_gdb.py", line 46, in 
gdb_version, gdb_major_version, gdb_minor_version = get_gdb_version()
  File "/home/studio/Python-3.6.0/Lib/test/test_gdb.py", line 43, in 
get_gdb_version
raise Exception("unable to parse GDB version: %r" % version)
Exception: unable to parse GDB version: ''

test_gdb failed

1 test failed:
test_gdb

Total duration: 31 ms
Tests result: FAILURE

--
components: Tests
messages: 288760
nosy: MarcoC
priority: normal
severity: normal
status: open
title: test_gdb failed
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



[issue29410] Moving to SipHash-1-3

2017-03-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And needed microbenchmarks for different sizes, because the result should be 
relied on fitting the data in caches of different levels.

--

___
Python tracker 

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



[issue29679] Add @contextlib.asynccontextmanager

2017-03-01 Thread Yury Selivanov

Yury Selivanov added the comment:

> In formulating my question for the list, it occurred to me that while 
> asynccontextmanager doesn't need to depend on asyncio, the AsyncExitStack 
> proposed in issue 29302 likely will, which pushes me towards favouring the 
> `asyncio.contextlib.asynccontextmanager` approach.

As I said in [1], I think asynccontextmanager and AsyncExitStack should be 
framework agnostic and thus stay in the top level contextlib package.

IMO AsyncExitStack should not be dependent on asyncio, and if it is it means we 
would need to tweak its design to make it not to.  I'll take a look at the 
other issue to see if I can help.

[1] https://mail.python.org/pipermail/python-dev/2017-March/147505.html

--

___
Python tracker 

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



[issue27879] add os.syncfs()

2017-03-01 Thread Fred L. Drake, Jr.

Changes by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

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



[issue29680] gdb/libpython.py does not work with gdb 7.2

2017-03-01 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Victor, the gdb commit that you mentioned introduced gdb.GdbError which is 
different from gdb.error. [1]  The correct commit is 
621c83642d17cf523c20f55f2ed945a7ec95ea6a. [2]

[1] 
https://sourceware.org/gdb/current/onlinedocs/gdb/Exception-Handling.html#Exception-Handling
[2] 
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=621c83642d17cf523c20f55f2ed945a7ec95ea6a

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2017-03-01 Thread STINNER Victor

STINNER Victor added the comment:

This issue is an optimization, but I still don't see any significant speedup 
:-) Would it be possible to write at least one microbenchmark showing a 
speedup? Maybe hash()?

--
nosy: +haypo

___
Python tracker 

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



[issue29684] Minor regression in PyEval_CallObjectWithKeywords()

2017-03-01 Thread STINNER Victor

STINNER Victor added the comment:

Both PR have been merged, I close the issue.

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



[issue29684] Minor regression in PyEval_CallObjectWithKeywords()

2017-03-01 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +317

___
Python tracker 

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



[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-03-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Is detection in the configure script needed? What are SQLite versions in which 
_v2 APIs were added? What is minimal supported SQLite version?

Don't forget about Windows where autotools are not used.

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



[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> patch review
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



[issue29640] _PyThreadState_Init and fork race leads to inconsistent key list

2017-03-01 Thread Petr Viktorin

Petr Viktorin added the comment:

Here is a proof of concept patch from Jaroslav Škarvada. It fixes the problem 
by holding the mutex used for PyThread_create_key while forking.

To make it more than PoC it needs adding _PyThread_AcquireKeyLock and 
_ReleaseKeyLock (similar to _PyImport_AcquireLock() etc.) and calling those.  
Other than that, does this approach look reasonable?

--
keywords: +patch
nosy: +encukou
Added file: http://bugs.python.org/file46682/fork_hold_keymutex.patch

___
Python tracker 

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



[issue29680] gdb/libpython.py does not work with gdb 7.2

2017-03-01 Thread STINNER Victor

STINNER Victor added the comment:

It's a regression introduced in Python 3.6 by CPython change:
https://github.com/python/cpython/commit/d7d2bc8798da3b083e383e949ba01d61b78e4e4d

gdb.error was introduced in gdb 7.3 by the commit 
07ca107c2d958b45633ef0cdcce7219a95f0cf01:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;f=gdb/python/python.c;h=07ca107c2d958b45633ef0cdcce7219a95f0cf01

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



[issue29677] 'round()' accepts a negative integer for ndigits

2017-03-01 Thread Vedran Čačić

Vedran Čačić added the comment:

This is one of those things that show Python being extremely consistent within 
itself. Of course, docs should be clarified if needed, but the feature is 
desirable and useful.

--
nosy: +veky

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2017-03-01 Thread Lele Gaifax

Lele Gaifax added the comment:

Thank you Aviv, I applied your suggestions and opened a PR.

--

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2017-03-01 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +315

___
Python tracker 

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



[issue29684] Minor regression in PyEval_CallObjectWithKeywords()

2017-03-01 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +314

___
Python tracker 

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



[issue29684] Minor regression in PyEval_CallObjectWithKeywords()

2017-03-01 Thread INADA Naoki

New submission from INADA Naoki:

This issue is spin off issue29548.

PyEval_CallObjectWithKeywords(PyObject *func, PyObject *args, PyObject *kwargs)
should raise TypeError when kwargs is not dict.
But after this commit [1], assert(PyDict_Check(kwargs)) can be called when 
args==NULL.

[1] 
https://github.com/python/cpython/commit/155ea65e5c88d250a752ee5321860ef11ede4085

--
keywords: 3.6regression
messages: 288748
nosy: haypo, inada.naoki
priority: normal
severity: normal
status: open
title: Minor regression in PyEval_CallObjectWithKeywords()

___
Python tracker 

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



[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman

Brian Coleman added the comment:

I have now added a Github pull request here:
https://github.com/python/cpython/pull/376

--

___
Python tracker 

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



[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman

Changes by Brian Coleman :


--
pull_requests: +312

___
Python tracker 

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



[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-03-01 Thread Marco Buttu

Marco Buttu added the comment:

> I don't see this point. The other section titles are not about
> loops. The preceding chapter introduces while loops as a loop,
> not a statement, and this chapter talks about while and for
> loops further down the page.

What I mean is that currently in every section (of this chapter) about a 
statemet, the statement is qualified as "statement": "if Statements", "for 
Statements", "pass Statements", and "break and continue Statements, and else 
Clauses on Loops". The last one is not an exeption, bacause we have already 
introduced for and while, and writing "break and continue Statements, and else 
Clauses on for and while statements" IMO is redundant. 

I like the current structure of titles, because IMO helps beginners to better 
classify things (statements, functions, ...), and it is not clear to me the 
objective motivation for changing "for Statemets" to "for Loops", breaking the 
structure given by the original author.

--

___
Python tracker 

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



[issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc

2017-03-01 Thread Brian Coleman

New submission from Brian Coleman:

On PyMem_Malloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0.
On PyMem_Realloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0.
On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in 
co_extra->ce_extras to NULL.

I will add a GitHub PR for this shortly.

--
components: Interpreter Core
messages: 288745
nosy: brianfcoleman
priority: normal
severity: normal
status: open
title: _PyCode_SetExtra behaviour wrong on allocation failure and after realloc
type: resource usage
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



[issue29671] Add function to gc module to check if any reference cycles have been reclaimed.

2017-03-01 Thread Mark Dickinson

Changes by Mark Dickinson :


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



[issue29302] add contextlib.AsyncExitStack

2017-03-01 Thread Alexander Mohr

Alexander Mohr added the comment:

Thanks for the feedback Nick! If I get a chance I'll see about refactoring my 
gist into a base class and two sub-classes with the async supporting non-async 
but not vice-versa.  I think it will be cleaner.  Sorry I didn't spend too much 
effort on the existing gist as I tried quickly layering on async support to 
move on to my primary task.  After doing that I noticed that the code could use 
some refactoring, but only after taking the time deconstructing the impl to 
understand how the code works.

--

___
Python tracker 

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



[issue29594] implementation of __or__ in enum.auto

2017-03-01 Thread Ethan Furman

Ethan Furman added the comment:

aenum 2.0 [1] has been released.  Because it also covers Python 2.7 I had to 
enhance its auto() to cover |, &, ^, and ~ so that Enum classes could be 
properly created.

At this moment your choices are to use odd naming or aenum (with its enhanced 
auto).


[1] https://pypi.python.org/pypi/aenum

--
assignee:  -> ethan.furman

___
Python tracker 

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