[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Martin Panter

New submission from Martin Panter:

While trying to port the example at 
https://docs.python.org/3.5/library/asyncio-task.html#example-future-with-run-until-complete
 to use “async def”, I discovered the ensure_future() function does not like 
the coroutine field name changes introduced in Issue 24400:

 asyncio.ensure_future(slow_operation(future))
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/proj/python/cpython/Lib/asyncio/futures.py, line 196, in __repr__
info = self._repr_info()
  File /home/proj/python/cpython/Lib/asyncio/tasks.py, line 105, in _repr_info
coro = coroutines._format_coroutine(self._coro)
  File /home/proj/python/cpython/Lib/asyncio/coroutines.py, line 242, in 
_format_coroutine
filename = coro.gi_code.co_filename
AttributeError: 'coroutine' object has no attribute 'gi_code'

I understand the gi_ names all changed to cr_, so I guess this code has to 
adjust as well.

--
components: asyncio
messages: 245727
nosy: gvanrossum, haypo, vadmium, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: asyncio.ensure_future() AttributeError with “async def” coroutines
type: behavior
versions: Python 3.5, Python 3.6

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



[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-24 Thread Armin Rigo

Armin Rigo added the comment:

Also, if we want to be paranoid, the _PyObject_GetAttrId() can return anything, 
not necessarily a string object.  This would make the following 
PyUnicode_FromFormat() fail.  So maybe you also want to overwrite failures in 
PyUnicode_FromFormat() with the final ImportError.  (It actually looks like a 
good--if convoluted--use case for exception chaining at the C level...)

--

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



[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-24 Thread Armin Rigo

Armin Rigo added the comment:

I'd guess so: if the PyObject_GetAttrId() fails, then ignore the rest of the 
code that was added in https://hg.python.org/cpython/rev/fded07a2d616 and jump 
straight to ``PyErr_Format(PyExc_ImportError, ...)``.

--

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



[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread STINNER Victor

STINNER Victor added the comment:

It's not the first time that a bug in found in _format_coroutine(). We need 
more unit tests!

Previous bug: https://github.com/python/asyncio/issues/222

--

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



[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-06-24 Thread Florian Bruhin

Florian Bruhin added the comment:

I've now updated to Python 3.4.3 and it's broken there as well.

I tried on two other Windows 8.1 machines (with Python 3.4.3 and 3.4.1 
respectively), and I can't reproduce there either...

It works with shell=True indeed.

I wonder why this is only broken on that one machine... It's a virtual machine 
which only has Firefox, Python, PyQt and a few Python packages installed - 
otherwise it's vanilla.

--

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



[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2015-06-24 Thread Zorceta

Zorceta added the comment:

 When provided object is not from a file

should be

'When `inspect` can't find the source file of provided object'.

My mistake.

--

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



[issue24497] test_decimal.py contains a dead link

2015-06-24 Thread mattyw

New submission from mattyw:

The comments in test_decimal contain a url for downloading tests written by  
Mike Cowlishaw:

Cowlishaw's tests can be downloaded from:   
   
www2.hursley.ibm.com/decimal/dectest.zip

Python 3.4.3 contains an updated url:
http://speleotrove.com/decimal/dectest.zip

It seems like the url should be updated in 2.7 as well

--
assignee: docs@python
components: Documentation
messages: 245734
nosy: docs@python, mattyw
priority: normal
severity: normal
status: open
title: test_decimal.py contains a dead link
versions: Python 2.7

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



[issue24496] Non-idiomatic examples in gzip docs

2015-06-24 Thread Jakub Kadlčík

New submission from Jakub Kadlčík:

Hello, I think there are awesome example code snippets in gzip documentation. 
No doubt, they helped me a lot.

The only problem is that they are not idiomatic. They look like C more than 
Python.

I suggest following patch

--
assignee: docs@python
components: Documentation
files: idiomatic-gzip.diff
keywords: patch
messages: 245729
nosy: FrostyX, docs@python
priority: normal
severity: normal
status: open
title: Non-idiomatic examples in gzip docs
type: enhancement
Added file: http://bugs.python.org/file39796/idiomatic-gzip.diff

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



[issue24496] Non-idiomatic examples in gzip docs

2015-06-24 Thread Martin Panter

Martin Panter added the comment:

It looks like this is for Python 2. I agree with the change, but I suggest 
back-porting revisions 35c53e7e2280, a01992e219c0 and ae1528beae67 (Issue 
21146) instead, to match the Python 3 documentation.

--
nosy: +vadmium
versions: +Python 2.7

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



[issue24497] test_decimal.py contains a dead link

2015-06-24 Thread mattyw

Changes by mattyw mat...@me.com:


--
keywords: +patch
Added file: http://bugs.python.org/file39797/24497.patch

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



[issue24450] Add cr_await calculated property to coroutine object

2015-06-24 Thread Martin Panter

Martin Panter added the comment:

For Benno’s original gi_yieldfrom property, I guess the 
asyncio.coroutines.CoroWrapper class would need updating. The GeneratorWrapper 
class for @types.coroutine probably should be updated too, since it already 
supports other internal generator properties.

--

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



[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-24 Thread Jorge Herskovic

Jorge Herskovic added the comment:

20,000+ iterations of the test suite with my homebuilt 3.4.3 throw no 
exceptions. 

Weirder and weirder. 

Any suggestions? Without any actual knowledge (unencumbered by the thought 
process), a concurrency issue in the interpreter itself is my guess. 
Especially since I can't reproduce it at all on other versions. 

I'll see if I can come up with a shorter, self-contained test that can 
illustrate the issue too.

--

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



[issue24450] Add cr_await calculated property to coroutine object

2015-06-24 Thread Armin Rigo

Changes by Armin Rigo ar...@users.sourceforge.net:


--
nosy:  -arigo

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I would prefer do not repeat the code, but I afraid this can affect the 
performance, and the performance of PyDict_GetItem is critical for Python.

--

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



[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-24 Thread Julien Palard

Changes by Julien Palard mandark@gmail.com:


--
status: open - closed

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



[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-24 Thread Julien Palard

Julien Palard added the comment:

OK, so, requests have a `timeout` and take it into account, and it solves my 
problem.

Yet I don't understand one little thing:

With both requests `timeout` parameter set or unset, the exact same 
http.client.py:_read_status call the same socket.readinto. With a `request` 
`timeout`, the socket.readinto uses the recvfrom syscall, but with a `request` 
`timeout`, readinto uses a `poll` syscall with the given timeout.

The root of the problem is that urllib3 ignores the `socket` `defaulttimeout`, 
I opened a ticket on this:

https://github.com/shazow/urllib3/issues/655#issuecomment-114835279

So this ticket can be considered closed.

--

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



[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-24 Thread Martin Panter

Martin Panter added the comment:

I assume you meant _without_ an explicit timeout setting in Requests, you see a 
recvfrom() system call, and _with_ an explicit timeout you see poll(). I guess 
that would be because Requests is using a blocking socket in the first case, 
and in the second case the timeout is implemented by waiting for data to be 
available before reading it.

--
resolution:  - third party
stage:  - resolved

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Please let this go forward as Serhiy has written it.   That is the way I wrote 
the existing known hash function.   You all should be focused on correctness, 
not on bike-shedding my and Serhiy's coding style.

--

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



[issue24504] os.listdir() error if the last folder starts not with the capital letter

2015-06-24 Thread STINNER Victor

STINNER Victor added the comment:

'Z:\Pr Files\norma' looks wrong '\n' is a single character, a new line. Try to 
write r'Z:\Pr Files\norma'.

https://docs.python.org/dev/reference/lexical_analysis.html#string-and-bytes-literals

--
nosy: +haypo

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



[issue24506] make fails with gcc 4.9 due to fatal warning of unused variable and empty macro in Parser/pgen.c

2015-06-24 Thread Karl Richter

New submission from Karl Richter:

`gcc` 4.9 is more restictive and recognizes that the empty definition of the 
`REQN` macro doesn't use some variables. It's more suitable to wrap the usage 
of the macro in the same preprocessor conditionals like the macro definition.

experienced with 41fbc222af8c503e1659250a36f4e293d864a92b

Patch attached. Tests pass (see 
https://semaphoreci.com/krichter/cpython/branches/empty_macro/builds/1 for 
details).

--
components: Build
files: 0001-removed-empty-definition-of-REQN-preprocessor-macro-.patch
keywords: patch
messages: 245781
nosy: krichter
priority: normal
severity: normal
status: open
title: make fails with gcc 4.9 due to fatal warning of unused variable and 
empty macro in Parser/pgen.c
versions: Python 2.7
Added file: 
http://bugs.python.org/file39806/0001-removed-empty-definition-of-REQN-preprocessor-macro-.patch

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



[issue24505] shutil.which wrong result on Windows

2015-06-24 Thread Bob Alexander

New submission from Bob Alexander:

Python session with 3.5b2

Showing existing error:
 from shutil import which

Works OK
 which(python)
'C:\\Python27\\python.EXE'

Also works OK
 which('C:\\Python27\\python.EXE')
'C:\\Python27\\python.EXE'

Fails
 which('C:\\Python27\\python')


Showing better results with my fix (attached):
 from which2 import which
 which(python)
'C:\\Python27\\python.exe'
 which('C:\\Python27\\python.exe')
'C:\\Python27\\python.exe'
 which('C:\\Python27\\python')
'C:\\Python27\\python.exe'

Problem is with the short-circuiting code near the beginning of the function. 
It fails to check the extensions for Windows when short-circuited.

My fix has a few other improvements -- efficiency and nicer output without 
those ugly upper-case extensions.

--
components: Library (Lib)
files: which2.py
messages: 245780
nosy: bobjalex
priority: normal
severity: normal
status: open
title: shutil.which wrong result on Windows
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file39805/which2.py

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Stefan Behnel

Stefan Behnel added the comment:

 I originally planned to make the next Cython release patch the Generator
 and Coroutine ABCs into collections.abc, but I now think it would be worth
 uploading an abc_backports package to PyPI instead that does that and on
 which asyncio, tornado and other packages could simply depend with a
 try-import.

Done:

https://pypi.python.org/pypi/backports_abc

Feedback welcome.

Stefan

--

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



[issue24504] os.listdir() error if the last folder starts not with the capital letter

2015-06-24 Thread Denis Gordeev

New submission from Denis Gordeev:

My code is:
mypath = 'Z:\Pr Files\norma'
file_list = [ f for f in listdir(mypath) if isfile(join(mypath,f))]

Error:
Traceback (most recent call last):
  File C:\Documents and Settings\Administrator\Desktop\uni\click zhenilo 
workshop\noise.py, line 13, in module
file_list = [ f for f in listdir(mypath) if isfile(join(mypath,f))]
WindowsError: [Error 123] The filename, directory name, or volume label syntax 
is incorrect: 'Z:\\Pr Files\norma/*.*'

It works all right, if the path is:
mypath = 'Z:\Pr Files\Norma'

--
components: Windows
messages: 245777
nosy: Denis Gordeev, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.listdir() error if the last folder starts not with the capital letter
versions: Python 2.7

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



[issue24504] os.listdir() error if the last folder starts not with the capital letter

2015-06-24 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
stage:  - resolved

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



[issue24497] test_decimal.py contains a dead link

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 37c827d9dda4 by Ned Deily in branch '2.7':
Issue #24497: update link in test_decimal comments
https://hg.python.org/cpython/rev/37c827d9dda4

--
nosy: +python-dev

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



[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-24 Thread Jorge Herskovic

Jorge Herskovic added the comment:

Finally able to repro on my old Mac Pro at work (Universal 64/32bit 3.4.3 from 
python.org, OS X 10.10.3). For some reason I can't quite fathom, there were two 
exceptions this time.

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/multiprocessing/util.py,
 line 286, in _exit_function
_run_finalizers(0)
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/multiprocessing/util.py,
 line 246, in _run_finalizers
items = [x for x in list(_finalizer_registry.items()) if f(x)]
RuntimeError: dictionary changed size during iteration
Exception ignored in: Finalize object, dead
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/multiprocessing/util.py,
 line 185, in __call__
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/multiprocessing/queues.py,
 line 207, in _finalize_close
  File 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py, 
line 342, in notify
TypeError: 'NoneType' object is not callable

--

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



[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-24 Thread Stefan Krah

Stefan Krah added the comment:

If it is a DNS failure, the timeout of 3s indeed looks too low for me.

On a misconfigured machine I'm easily getting timeouts of 20s, (not for
this particular test, just in general, e.g. when using ssh).

--

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3a78be4bcbde by Yury Selivanov in branch '3.4':
Issue #24400: Fix CoroWrapper for 'async def' coroutines
https://hg.python.org/cpython/rev/3a78be4bcbde

New changeset 338597d2e93b by Yury Selivanov in branch '3.5':
Issue #24400: Fix CoroWrapper for 'async def' coroutines
https://hg.python.org/cpython/rev/338597d2e93b

New changeset 2e4d604c449d by Yury Selivanov in branch 'default':
Issue #24400: Fix CoroWrapper for 'async def' coroutines
https://hg.python.org/cpython/rev/2e4d604c449d

--

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



[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Yury Selivanov

Yury Selivanov added the comment:

Should be fixed now. Thanks for discovering this, Martin!

Victor, I'll make a PR on github/asyncio with some refactoring or CoroWrapper 
etc.  The code became too cumbersome, and has to be properly refactored.  At 
least we should have one wrapper class for generator based coroutines, and 
another one for 'async def' ones.

--
resolution:  - fixed
stage: needs patch - resolved
status: open - closed

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



[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Martin Panter

Martin Panter added the comment:

Thanks for reviewing this Yury. Here is a new patch:

* Drop the “native” term; distinguish by referring to “async def” where 
necessary
* Add generator version of display_date() coroutine example
* Change chained coroutine example over to “async def” and updated sequence 
diagram
* Change one other example over (then I ran into Issue 24495)
* Include Yury’s new documentation for @types.coroutine from Issue 24325

--
Added file: http://bugs.python.org/file39798/async-doc.v3.patch

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



[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-24 Thread R. David Murray

R. David Murray added the comment:

It would have to be a misconfigured machine that doesn't have 'localhost' in 
/etc/hosts (so that a lookup of localhost goes through DNS).  Or, I suppose, 
one that prioritizes the resolver over /etc/hosts (is that even possible?)

I would think other tests would fail if DNS has a 20 second latency.  I think 
having localhost configured in /etc/hosts is a requirement for other tests, so 
if that really is the problem I'm not sure we should be fixing the test suite 
here.  On the third hand, it doesn't really matter in this case and we're 
already using 15 for other tests, so I have no objection to making the test 
consistent.

--

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



[issue21417] Compression level for zipfile

2015-06-24 Thread Jens Diemer

Changes by Jens Diemer bugs.python@jensdiemer.de:


--
nosy: +jens

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f4e738cb07f by Yury Selivanov in branch '3.5':
Issue #24495, #24400: Test asyncio.Task.repr in debug mode
https://hg.python.org/cpython/rev/8f4e738cb07f

--

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



[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f4e738cb07f by Yury Selivanov in branch '3.5':
Issue #24495, #24400: Test asyncio.Task.repr in debug mode
https://hg.python.org/cpython/rev/8f4e738cb07f

--
nosy: +python-dev

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



[issue19894] zipfile ignores deflate level settings in zipinfo object

2015-06-24 Thread Jens Diemer

Jens Diemer added the comment:

IMHO it should be possible to set compression level not only for DEFLATE.
And it should be similar with the tarfile API.

Seems that http://bugs.python.org/issue21417 will cover this.

--
nosy: +jens

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



[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


Added file: http://bugs.python.org/file39799/tulip_coro.png

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f4b702672beb by Yury Selivanov in branch '3.4':
asyncio: Merge changes from issue #24400.
https://hg.python.org/cpython/rev/f4b702672beb

--

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



[issue24498] Shoudl ptags and eptags be removed from repo?

2015-06-24 Thread R. David Murray

New submission from R. David Murray:

ctags directly supports python.  Is there any reason to keep the ptags and 
eptags scripts in Tools/scripts?

--
messages: 245744
nosy: r.david.murray
priority: normal
severity: normal
status: open
title: Shoudl ptags and eptags be removed from repo?

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



[issue24506] make fails with gcc 4.9 due to fatal warning of unused variable and empty macro in Parser/pgen.c

2015-06-24 Thread Meador Inge

Meador Inge added the comment:

What is the exact GCC revision and what are the error messages?  I just tried 
GCC 4.9.3 and GCC 4.10.0 and don't see the errors.

Also, what configure and make parameters did you use to trigger the error?
I did './configure --with-pydebug' and './configure' with 'make -j4'.

--
nosy: +meador.inge

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



[issue23883] __all__ lists are incomplete

2015-06-24 Thread Jacek Kołodziej

Jacek Kołodziej added the comment:

 Nice work with the check__all__() function.

Thank you! :)

 I left some comments on Reitveld. Also, it currently ignores items satisfying 
 either of these checks:

 * isinstance(module_object, types.ModuleType)
 * getattr(module_object, '__module__', None) not in name_of_module

 The first is largely redundant with the second, because module objects don’t 
 have a __module__ attribute. However I wonder if it would be better to drop 
 the second check and just rely on the ModuleType check, making the test 
 stricter. Or would this be too annoying in some cases (requiring a huge 
 blacklist)? If so, maybe make the name_of_module checking optional.

Could you please elaborate on making the test stricter?

I'd go with the first check + optional name_of_module. With second one alone, 
all freshly added test__all__ tests would need additional names in blacklists - 
not huge ones, but they would otherwise be unnecessary.
  
I've amended the patches and I'm waiting for review.

I've also thought of not only making name_of_module param optional, but to make 
it extra_names_of_module (so such param would be added to module.__name__ used 
in getattr(module_object, '__module__', None) in name of module check. It 
would account for less typing in general (module.__name__ occurs in almost all 
cases), but also less explicity. What do you think?

--
Added file: http://bugs.python.org/file39809/Issue23883_all.v3.patch

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



[issue24503] csv.writer fails when within csv.reader

2015-06-24 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Obvious possibility: input.csv is empty, so the loop never executes. You could 
always add prints within the loop as well, so you know it actually read 
something.

--
nosy: +josh.r

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



[issue16830] Add skip_host and skip_accept_encoding to HTTPConnection.request()

2015-06-24 Thread Martin Panter

Martin Panter added the comment:

I tend to think that this proposal should be rejected. If you need low-level 
control over the header fields, just use putrequest(), putheader() and 
endheaders() methods instead. And adding these flags to request() isn’t going 
to help with urlopen(), unless the Request class was extended in a similar way.

--
title: Add skip_host and skip_accept_encoding to httplib/http.client - Add 
skip_host and skip_accept_encoding to HTTPConnection.request()

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



[issue23883] __all__ lists are incomplete

2015-06-24 Thread Jacek Kołodziej

Changes by Jacek Kołodziej kolodzi...@gmail.com:


Added file: 
http://bugs.python.org/file39807/Issue23883_support_check__all__.v3.patch

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



[issue24502] OS X 2.7 package has zeros for version numbers in sub-packages

2015-06-24 Thread Jim Zajkowski

Jim Zajkowski added the comment:

Among the problems this causes, we can't correctly track which version is 
present on our Macs (~6,000 systems) for upgrading.

--Jim

--

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



[issue23883] __all__ lists are incomplete

2015-06-24 Thread Jacek Kołodziej

Changes by Jacek Kołodziej kolodzi...@gmail.com:


Added file: http://bugs.python.org/file39808/Issue23883_test_gettext.v2.patch

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



[issue24503] csv.writer fails when within csv.reader

2015-06-24 Thread Martin Panter

Martin Panter added the comment:

It’s working properly for me in 2.7.10:

$ cat -A input.csv
a,b,c$
1,2,3$
$ python2 testcase.py
$ cat -A output.csv
d,a,t,a^M$
d,a,t,a^M$
m,o,r,e, ,d,a,t,a^M$

--
nosy: +vadmium
stage:  - test needed

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



[issue24506] make fails with gcc 4.9 due to fatal warning of unused variable and empty macro in Parser/pgen.c

2015-06-24 Thread Karl Richter

Karl Richter added the comment:

It's a fatal warning of `gcc 4.9.2`, not an error (my bad) for `int i;` in 
`Parser/pgen.c` line 227. It might be ignored as well, but I think my approach 
is more elegant and deals with issues sooner than later.

--

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



[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Martin Panter

Martin Panter added the comment:

Hi Yury. It looks like you missed my updated /Doc/library/tulip_coro.dia file. 
Here it is separately, in case you are having trouble extracting it from the 
patch.

--
Added file: http://bugs.python.org/file39810/tulip_coro.dia

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



[issue19111] 2to3 should remove from future_builtins import *

2015-06-24 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Shouldn't it also disable the relevant fixers for map, filter, zip, etc. as 
appropriate? Otherwise a whole bunch of calls will be wrapper in list() or the 
like to mimic a behavior the code never had in Py2 in the first place.

--
nosy: +josh.r

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb6fb8e2f995 by Yury Selivanov in branch '3.5':
Issue #24325, #24400: Add more unittests for types.coroutine; tweak wrapper 
implementation.
https://hg.python.org/cpython/rev/eb6fb8e2f995

New changeset 7a2a79362bbe by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24325, #24400)
https://hg.python.org/cpython/rev/7a2a79362bbe

--

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



[issue24325] Speedup types.coroutine()

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb6fb8e2f995 by Yury Selivanov in branch '3.5':
Issue #24325, #24400: Add more unittests for types.coroutine; tweak wrapper 
implementation.
https://hg.python.org/cpython/rev/eb6fb8e2f995

New changeset 7a2a79362bbe by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24325, #24400)
https://hg.python.org/cpython/rev/7a2a79362bbe

--
nosy: +python-dev

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



[issue24499] Python Installer text piles up during installation process

2015-06-24 Thread Zach “The Quantum Mechanic” W

New submission from Zach “The Quantum Mechanic” W:

A minor visual bug that causes text to pile up in the installer window. 
Installation finished, python seems to run fine.

Operating System: Windows 8.1 64x
Installer: Python 3.5.0b2

--
components: Installation
files: python_installer_visual_error.png
messages: 245759
nosy: Zach “The Quantum Mechanic” W
priority: normal
severity: normal
status: open
title: Python Installer text piles up during installation process
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file39801/python_installer_visual_error.png

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



[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-24 Thread Jorge Herskovic

Jorge Herskovic added the comment:

Ok, sorry, one more important thing I omitted in the previous comment.

^^^ The second exception above seems to be related to a new test I added, one 
that includes a daemonic process which itself relies on daemonic threads. 

The cleanup of that seems to be FUBARed, and it makes the original exception 
much more likely to pop up as well.

--

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



[issue24494] Can't specify encoding with fileinput and inplace=True

2015-06-24 Thread R. David Murray

R. David Murray added the comment:

I presume this is because openhook could be anything, including something where 
the inplace code couldn't even find the file to rename.  On the other hand, 
Python is a consenting adults language, so we can assume you know what you 
are doing if you specify both.  I think this restriction could be relaxed, and 
am willing to review a patch proposal to so, if it comes with tests :).

--
nosy: +r.david.murray
stage:  - needs patch
type:  - enhancement
versions: +Python 3.6 -Python 3.4

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



[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-24 Thread Stefan Krah

Stefan Krah added the comment:

I think it's also possible to misconfigure /etc/nsswitch.conf.

When I opened this issue, my buildbot had the FreeBSD default
configuration.  I no longer have any FreeBSD machines, so I
cannot check this now.

--

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



[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e31aad001fdb by Yury Selivanov in branch '3.5':
Issue #24439: Improve PEP 492 related docs.
https://hg.python.org/cpython/rev/e31aad001fdb

New changeset d99770da3b2a by Yury Selivanov in branch 'default':
Merge 3.5 (issue #24439)
https://hg.python.org/cpython/rev/d99770da3b2a

--
nosy: +python-dev

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



[issue21417] Compression level for zipfile

2015-06-24 Thread Jens Diemer

Jens Diemer added the comment:

btw. hacked work-a-round is:

zlib.Z_DEFAULT_COMPRESSION = 9

--

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-24 Thread Yury Selivanov

Yury Selivanov added the comment:

 I would prefer do not repeat the code, but I afraid this can affect the 
 performance, and the performance of PyDict_GetItem is critical for Python.

Static function calls like that one will most likely be inlined by the 
compiler... But if you don't want to rely on that, maybe we can use a macro to 
avoid code duplication?

--
nosy: +yselivanov

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 But if you don't want to rely on that, maybe we can use a macro
 to avoid code duplication?

This will not make the code cleaner.

In any case this is other issue.

--
title: Avoid repeated hash calculation in C implementation of  
functools.lru_cache() - Avoid repeated hash calculation in C implementation of 
functools.lru_cache()

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



[issue23319] Missing SWAP_INT in I_set_sw

2015-06-24 Thread Matthieu Gautier

Matthieu Gautier added the comment:

A little ping.

With a new patch integrating the unit test.

--
Added file: http://bugs.python.org/file39800/ctypes_swap_uint_unittest.patch

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



[issue24507] CRLF issues

2015-06-24 Thread Rusi

New submission from Rusi:

While trying to freshly setup a CPython repo, encountered the following
CRLF issues:

Mixed file -- both LF and CRLF (line 29 LF rest CRLF)
Lib/venv/scripts/nt/Activate.ps1

Lib/test/decimaltestdata is a directory with mixed up files -- ie some CRLF 
some LF files

PCbuild/readme.txt: CRLF (explicit)
This is fine. Many of the following should (ideally/IMHO) be likewise CRLF (not 
BIN)

*.sln: CRLF but marked as BIN in hgeol

PC/example_nt/example.vcproj
Emacs shows as Dos file; But not picked up by file; maybe other such

Missing BIN pattern from .hgeol
*.pdf
Note that Doc/library/turtle-star.pdf exists
This is most likely a bug

Existent file-types with non-existent files in hgeol; Probably harmless
*.vsprops
*.mk
*.dsp
*.dsw

These seem straightforward CRLF files to me; why BIN in hgeol?
Lib/test/test_email/data/msg_26.txt
Lib/test/coding20731.py

--
components: Build
messages: 245793
nosy: RusiMody, zach.ware
priority: normal
severity: normal
status: open
title: CRLF issues
versions: Python 3.5

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



[issue24508] Backport 3.5's Windows build project files to 2.7

2015-06-24 Thread Steve Dower

Steve Dower added the comment:

Feel free to fix up msi.py as much as it needs. I don't particularly understand 
it - I just run it :)

--

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-24 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 to what Raymond says here. Concerns regarding code duplication need to be 
weighed against the likelihood of that code changing in the future, and the 
impact on the readability of each copy of the code in isolation.

In this particular case, I think the likelihood of future change is low, and 
the likely negative impact of consolidation on readability is high, so it makes 
sense to me to defer consolidation until there's a clear benefit to sharing the 
implementations.

--

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



[issue24505] shutil.which wrong result on Windows

2015-06-24 Thread R. David Murray

R. David Murray added the comment:

Could you please submit your proposal as a patch?  (A diff -u against the 
existing version).

--
nosy: +r.david.murray

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



[issue7406] int arithmetic relies on C signed overflow behaviour

2015-06-24 Thread Kevin Shweh

Kevin Shweh added the comment:

It looks like the fast paths for INPLACE_ADD and INPLACE_SUBTRACT in Python 2 
don't have the cast-to-unsigned fix, so they're still relying on undefined 
behavior. For example, in INPLACE_ADD:


/* INLINE: int + int */
register long a, b, i;
a = PyInt_AS_LONG(v);
b = PyInt_AS_LONG(w);
i = a + b;
if ((i^a)  0  (i^b)  0)
goto slow_iadd;

--
nosy: +Kevin Shweh

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



[issue24508] Backport 3.5's Windows build project files to 2.7

2015-06-24 Thread Zachary Ware

Zachary Ware added the comment:

Do you plan to use the old project files or the new?  For the new, there should 
be no change in Tools/msi, which would make fixing it very easy for me ;)

--

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



[issue23883] __all__ lists are incomplete

2015-06-24 Thread Martin Panter

Martin Panter added the comment:

I think names should be in __all__ even if they shadow builtins, at least in a 
new feature release. There is plenty of precedent, e.g. asyncio.TimeoutError; 
reprlib.repr(); threading.enumerate(). Modules with open() in __all__ include 
aifc, bz2, codecs, dbm, dbm.dumb, gzip, lzma, os, shelve, wave and webbrowser. 
Plus, pydoc ignores things excluded from __all__.

--

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



[issue24325] Speedup types.coroutine()

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9aee273bf8b7 by Yury Selivanov in branch '3.5':
Issue #24400, #24325: More tests for types._GeneratorWrapper
https://hg.python.org/cpython/rev/9aee273bf8b7

New changeset fa097a336079 by Yury Selivanov in branch 'default':
Merge 3.5 (issue #24325  #24400)
https://hg.python.org/cpython/rev/fa097a336079

--

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



[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9aee273bf8b7 by Yury Selivanov in branch '3.5':
Issue #24400, #24325: More tests for types._GeneratorWrapper
https://hg.python.org/cpython/rev/9aee273bf8b7

New changeset fa097a336079 by Yury Selivanov in branch 'default':
Merge 3.5 (issue #24325  #24400)
https://hg.python.org/cpython/rev/fa097a336079

--

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



[issue24501] configure does not find (n)curses in /usr/local/libs

2015-06-24 Thread Pete Lancashire

Changes by Pete Lancashire p...@petelancashire.com:


--
components: Build
nosy: petepdx
priority: normal
severity: normal
status: open
title: configure does not find (n)curses in /usr/local/libs
type: compile error
versions: Python 2.7

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



[issue24500] contextlib.redirect_stdout should redirect C output

2015-06-24 Thread Zahari Dim

Changes by Zahari Dim zaha...@gmail.com:


--
title: xontextlib.redirect_stdout should redirect C output - 
contextlib.redirect_stdout should redirect C output

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



[issue24500] xontextlib.redirect_stdout should redirect C output

2015-06-24 Thread Zahari Dim

New submission from Zahari Dim:

It is common to have an inflexible C wrapper with lots of undesired output. 
However it is not so trivial to supress (or redirect) that output from Python 
in a selective way. contextlib.redirect_stdout doesn't help, since it only 
changes sys.sdout, without touching the actual file descriptor. The following 
worked for my use case, which I adapted from here 
http://eli.thegreenplace.net/2015/redirecting-all-kinds-of-stdout-in-python/:

import sys
import os
from contextlib import contextmanager, redirect_stdout

@contextmanager
def supress_stdout():
devnull = open(os.devnull, 'wb')
try:
stdout_flieno = sys.stdout.fileno()
except ValueError:
redirect = False
else:
redirect = True
sys.stdout.flush()
#sys.stdout.close()
devnull_fileno = devnull.fileno()
saved_stdout_fd = os.dup(stdout_flieno)
os.dup2(devnull_fileno, stdout_flieno)

with redirect_stdout(devnull):
yield
if redirect:
os.dup2(stdout_flieno, saved_stdout_fd)

--
components: Extension Modules, Library (Lib)
messages: 245760
nosy: Zahari.Dim
priority: normal
severity: normal
status: open
title: xontextlib.redirect_stdout should redirect C output
type: enhancement
versions: Python 3.4

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



[issue24508] Backport 3.5's Windows build project files to 2.7

2015-06-24 Thread Zachary Ware

New submission from Zachary Ware:

Here's the (enormous) patch backporting 3.5's project files to 2.7.  It also 
takes care of adjusting the old project files to their new home in PC/VS9.0, 
and makes a couple of small adjustments in distutils.command.build_ext, FixTk, 
regrtest, and the Tcl/Tk tests to keep the test suite running properly.  I've 
run a couple of builds on the custom buildbots, and at this point there are no 
failures that I can see any reason to blame this patch for.

I would greatly appreciate some review, or at least 'review by testing' to make 
sure this doesn't completely break anybody's workflow.

Terry, I'm particularly interested in your feedback since I'm pretty sure you 
generally build from the VS GUI, which I usually avoid doing.  
PCbuild\pcbuild.sln *will not* work with the VS 2008 GUI, but it should work 
with any other VS, 2010 or newer.  If you'd prefer to continue using the 2008 
GUI, PC\VS9.0\pcbuild.sln should continue to work.  When using the new project 
files, though, this should also take care of the headache of making Tcl/Tk play 
the game; you shouldn't have to do anything extra to be able to use Tkinter.

Steve, I did not make any changes to Tools\msi, but I'd be happy to if it makes 
your job any easier.

Looking forward to your feedback,
Zach

--
assignee: zach.ware
components: Build, Windows
files: 2.7_project_files_backport.diff
keywords: patch
messages: 245795
nosy: paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Backport 3.5's Windows build project files to 2.7
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file39811/2.7_project_files_backport.diff

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



[issue23883] __all__ lists are incomplete

2015-06-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Serhiy: ftplib.Error does not actually appear to be documented. Perhaps it 
 should not be added to __all__ after all? (excuse the pun)

Agree. The list is only cursorily filtered result of some one-liners and can 
contain false names.

--

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



[issue23883] __all__ lists are incomplete

2015-06-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Adding new names to __all__ can have undesired effect and break user code (by 
hiding builtins as for tarfile.open). Perhaps not all documented names should 
be imported with import *. In any case it is too late for 3.5.

--
versions: +Python 3.6 -Python 3.5

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



[issue19111] 2to3 should remove from future_builtins import *

2015-06-24 Thread Milan Oberkirch

Milan Oberkirch added the comment:

The other fixers you mentioned are deactivated independently of this patch if 
an import from future_builtins exists. I gave it the same run_order as in the 
fix for __future__ imports which prevents 2to3 from deleting the calls before 
other fixers check for their existence.

--

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



[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Yury Selivanov

Yury Selivanov added the comment:

Committed. Thanks a lot, Martin!

--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue24450] Add cr_await calculated property to coroutine object

2015-06-24 Thread Frank Wierzbicki

Frank Wierzbicki added the comment:

This shouldn't be a problem for Jython.

--

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



[issue24501] configure does not find (n)curses in /usr/local/libs

2015-06-24 Thread Pete Lancashire

New submission from Pete Lancashire:

./configure does not find ncurses in /usr/local/lib, an older version of (one I 
don't want to use) copy exists in /usr/lib

checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking ncurses.h usability... no
checking ncurses.h presence... no
checking for ncurses.h... no

AIX O/S Version
7100-03-05-1524

IBM AIX C 
lslpp -h vac.C
  Fileset Level Action   Status   Date Time
  
Path: /usr/lib/objrepos
  vac.C  12.1.0.0   COMMIT   COMPLETE 06/18/15 14:35:28

Path: /etc/objrepos
  vac.C  12.1.0.0   COMMIT   COMPLETE 06/18/15 14:35:33

lslpp -h xlC.rte
  Fileset Level Action   Status   Date Time
  
Path: /usr/lib/objrepos
  xlC.rte12.1.0.1   COMMIT   COMPLETE 06/18/15 10:56:34
 12.1.0.3   COMMIT   COMPLETE 06/18/15 14:26:15


Environment Variables
OBJECT_MODE 64
PATH
/usr/local/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/buildsw/bin:/usr/bin/X11:/sbin:.:/usr/vac/bin:/usr/vacpp/bin
CC  xlc_r
CFLAGS  -qmaxmem=-1 -DSYSV -D_AIX -D_AIX71 -D_ALL_SOURCE -DFUNCPROTO=15 -O 
-I/usr/local/include
LDFLAGS -L/usr/local/lib64 -L/usr/local/lib -bmaxdata:0x8000 -brtl
LIBS
CPPFLAGS
CXX xlc++_r
CXXFLAGS-qmaxmem=-1 -DSYSV -D_AIX -D_AIX71 -D_ALL_SOURCE -DFUNCPROTO=15 -O 
-I/usr/local/include
CPP
CXXCPP
LDPATH  /usr/local/lib

ncurses version 5.9

ls /usr/local/lib/*curses*
/usr/local/lib/libncurses++.a  /usr/local/lib/libncurses.a
/usr/local/lib/libncurses_g.a


./configure --with-tcltk-includes='-I/usr/include' 
--with-tcltk-libs='-L/usr/lib' | tee configure.out

--
Added file: http://bugs.python.org/file39802/config.log

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



[issue24325] Speedup types.coroutine()

2015-06-24 Thread Yury Selivanov

Yury Selivanov added the comment:

I've committed new unittests from this patch (as they are applicable to pure 
Python implementation of the wrapper too)

The patch now contains only the C implementation of the wrapper and should be 
ready to be committed.  Larry?

--
Added file: http://bugs.python.org/file39803/types_coroutine_speedup.patch

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



[issue24450] Add cr_await calculated property to coroutine object

2015-06-24 Thread Yury Selivanov

Yury Selivanov added the comment:

Larry, what's your opinion on this?

cr_await is a new thing (trivial on the C level) on a new type, it shouldn't 
break anything.  gi_yieldfrom is identical to cr_await.  Can we add this to 3.5?

--

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



[issue23319] Missing SWAP_INT in I_set_sw

2015-06-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

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



[issue24500] provide context manager to redirect C output

2015-06-24 Thread R. David Murray

R. David Murray added the comment:

This was discussed in the original redirect_stdout issue (issue 15805).  It was 
suggested then that C level redirection was a separate issue, and should 
probably be something in the subprocess module.

--
components:  -Extension Modules
nosy: +r.david.murray
stage:  - needs patch
title: contextlib.redirect_stdout should redirect C output - provide context 
manager to redirect C output
versions: +Python 3.6 -Python 3.4

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



[issue24501] configure does not find (n)curses in /usr/local/libs

2015-06-24 Thread Pete Lancashire

Pete Lancashire added the comment:

added stdout of ./configure

--
Added file: http://bugs.python.org/file39804/configure.out

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



[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot

2015-06-24 Thread Zachary Ware

Zachary Ware added the comment:

Well, whatever it was, 44253ce374fc21402c15cbce9c2be0e184610882 seems to have 
fixed it.  As of build 35 on 3.x and build 31 on 3.5, test_asyncio passes on 
the Non-Debug Windows bot.

--
resolution:  - fixed
stage: needs patch - resolved
status: open - closed

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



[issue24503] csv.writer fails when within csv.reader

2015-06-24 Thread Wolfgang E. Sanyer

New submission from Wolfgang E. Sanyer:

I have a use case where I am using a csv.reader to loop through one file and 
trying to use a csv.writer to output to another file. However, when I do this, 
the csv.writer instance does not write anything to the output file.

ex:

import csv

with open(input.csv, rb) as input, open(output.csv, wb) as output:
reader = csv.reader(input)
writer = csv.writer(output)

for row in reader:
writer.writerow(data) # this writes out nothing

writer.writerow(more data) # this writes out something

--
components: Library (Lib)
messages: 245772
nosy: ezzieyguywuf
priority: normal
severity: normal
status: open
title: csv.writer fails when within csv.reader
type: behavior
versions: Python 2.7

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