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
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
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, ...)``.
--
___
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
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
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
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:
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
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
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
___
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.
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.
Changes by Armin Rigo ar...@users.sourceforge.net:
--
nosy: -arigo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24450
___
___
Python-bugs-list
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
Changes by Julien Palard mandark@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24486
___
___
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
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
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.
--
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
___
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
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
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
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
Changes by Zachary Ware zachary.w...@gmail.com:
--
stage: - resolved
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24504
___
___
Python-bugs-list
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
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
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
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
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
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
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
Changes by Jens Diemer bugs.python@jensdiemer.de:
--
nosy: +jens
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21417
___
___
Python-bugs-list
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
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
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
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
___
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
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?
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
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)
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
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
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
___
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
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
___
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
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.
--
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
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
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
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
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:
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
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
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.
--
___
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)
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
___
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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.
--
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
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
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
Frank Wierzbicki added the comment:
This shouldn't be a problem for Jython.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24450
___
___
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
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:
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
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23319
___
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:
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
___
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 -
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
86 matches
Mail list logo