New submission from Martin Panter:
I am trying to make LZMAFile (which implements BufferedIOBase) use a
BufferedReader in read mode. However this broke
test_lzma.FileTestCase.test_read1_multistream(), which calls read1() with the
default size argument. This is because BufferedReader.read1()
Tim Peters added the comment:
This is easy: Cowlishaw is wrong on this one, but nothing can be done about it
;-)
Confusion arises because most people think of 0**0 as a value (where it
certainly must be 1) while others seem to view it as some kind of shorthand for
expressing a limit (as the
Devin Jeanpierre added the comment:
I inferred from Serhiy's comment that if you override __iter__ to be efficient
and not use __getitem__, this overridden behavior used to pass on to index(),
but wouldn't after this patch.
--
___
Python tracker
Changes by Aleksi Torhamo alexerion+pythonb...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file37660/python_codec_crash_fix.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23215
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: docs@python - ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23144
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +haypo, lemburg, loewis, serhiy.storchaka
stage: - patch review
versions: -Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23215
Berker Peksag added the comment:
Hi Tommy, the patch is already committed to Python 3.5. See
https://docs.python.org/3.5/library/heapq.html#heapq.merge
--
nosy: +berker.peksag
stage: patch review - resolved
___
Python tracker rep...@bugs.python.org
New submission from Aleksi Torhamo:
Using a multibyte codec and a custom error handler that ignores errors to
encode a string that contains characters not representable in said encoding
causes exponential growth of the output buffer, raising MemoryError.
The problem is in
Tommy Carstensen added the comment:
I noticed 3.5 alpha1 is not released until February 1st. Is there any way I can
get my hands on this new functionality?
--
nosy: +Tommy.Carstensen
___
Python tracker rep...@bugs.python.org
Tommy Carstensen added the comment:
Yes, but 3.5 has not been pre-released yet.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
___
Steven D'Aprano added the comment:
Mark Dickson wrote:
I've talked to Mike Cowlishaw (the author of the specification)
about this particular issue, and the spec is not likely to
change on this point.
I'm curious about the rationale for the decision. As I'm sure you're aware, in
general
Martin Panter added the comment:
Here is a patch for the higher-level LZMAFile implementation to use Nikolaus’s
“max_length” parameter. It depends on Nikolaus’s patch also being applied.
I split out a _RawReader class that does the actual decompress() calls, and
then wrapped that in a
Martin Panter added the comment:
I think the simplest thing to do here would be to update the documentation to
match the usage. This patch does so, saying that all write() methods, as well
as the BytesIO() constructor, have to accept bytes-like objects. It also
expands some tests to verify
Martin Panter added the comment:
Here is a simple documentation patch to guarantee that at least one byte is
normally returned. This would make the method much more useful, and compatible
with the BZ2File and LZMAFile interfaces, allowing them to use BufferedReader,
as I propose to do in
Martin Panter added the comment:
I suspect this is not a bug but a misunderstanding of how communiate(), pipes,
daemon processes, etc, work. If communicate() didn’t wait for stderr to be
closed, then how would it know it had read all the data that was written into
the pipe?
I don’t have that
Antoine Pitrou added the comment:
Thank you for the patch! I posted a review.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23206
___
___
New submission from Thomas D.:
Hi,
to demonstrate the problem you need =systemd-217:
# python3.4
Python 3.4.2 (default, Oct 12 2014, 20:09:43)
[GCC 4.8.3] on linux
Type help, copyright, credits or license for more information.
import subprocess
sp = subprocess.Popen([/sbin/udevd, --daemon],
Antoine Pitrou added the comment:
Victor, your patch sounds ok to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19776
___
___
Antoine Pitrou added the comment:
The interesting discovery I made while reviewing the patch for issue
22906 is that there apparently *is* implicit chaining support in
PyErr_SetObject
Indeed, there is, and it should work properly (AFAIR there was quite a bit of
debugging to make this
New submission from STINNER Victor:
One pain point of asynchronous programming is to understand bugs and rebuild
the chain of callbacks / coroutines / tasks. I added the source traceback to
Handle, Future (Task) and CoroWrapper to help debugging.
Here is a new enhancement to provide more
INADA Naoki added the comment:
Patch update.
Now C version does escaping same way to Python version.
--
Added file: http://bugs.python.org/file37656/json-fast-unicode-encode.patch
___
Python tracker rep...@bugs.python.org
Raymond Hettinger added the comment:
The iteration usually has linear complexity
The iteration abstract method depends on indexing as well:
def __iter__(self):
i = 0
try:
while True:
v = self[i]
yield v
i += 1
Joakim Karlsson added the comment:
You shouldn't mix headers with and without the _DEBUG symbol defined. At least
on some versions of MSVC this can lead to errors as some standard headers start
referencing functions that are not available in both debug and release versions
of the MSV C
STINNER Victor added the comment:
Yury Selivanov proposed something different in the past: add a context (or a
context identifier) to tasks to be able to (indirectly) attach local variables
to tasks.
Add notion of context_id to event loop
https://code.google.com/p/tulip/issues/detail?id=165
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +benjamin.peterson
stage: - patch review
type: - enhancement
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22986
Raymond Hettinger added the comment:
I'm afraid you're getting lost in details that don't matter. We're trying to
make the index() method more useful so that searches and be restarted where
they left off.
--
___
Python tracker
Serhiy Storchaka added the comment:
This is because list.index() has start and stop parameters, and L.index(x) is
equivalent to L.index(x, 0, len(L)). In list.count() and list.remove() the
limit is dynamic during iteration, but in list.index() it is specified by
arguments before iterating. It
Raymond Hettinger added the comment:
This is a non-guaranteed behavior. It is allowed to be different from other
list methods. The behavior is also very old, stable, and has not been a
problem in practice. No good would come from changing it.
--
nosy: +rhettinger
resolution: - not
Pierre Nugues added the comment:
Hello David,
This is not the same issue as 23195. I tested the Greek letters on your
interactive console available at Python.org and this is not related to OS X.
The Greek sorting works for all the characters I tested except the ‘ῖ’
character, which is in the
Raymond Hettinger added the comment:
It seems to me that the problem here lies with the packages that use
__doc__+=sometext rather than with -OO which is doing exactly what it is
supposed to.
--
nosy: +rhettinger
___
Python tracker
STINNER Victor added the comment:
Which order do you expect? What is your OS? Result on Linux (Fedora 21) with
the french UTF-8 locale.
locale.setlocale(locale.LC_ALL, '')
'fr_FR.utf8'
locale.getlocale(locale.LC_COLLATE)
('fr_FR', 'UTF-8')
sorted(x)
['Ά', 'Γ', 'Η', 'Κ', 'Ν', 'Ο', 'έ', 'ί',
Nick Coghlan added the comment:
The interesting discovery I made while reviewing the patch for issue 22906 is
that there apparently *is* implicit chaining support in PyErr_SetObject:
https://hg.python.org/cpython/file/default/Python/errors.c#l70
Chris indicates that it doesn't seem to be
STINNER Victor added the comment:
2015-01-09 8:16 GMT+01:00 Serhiy Storchaka rep...@bugs.python.org:
May be make math.inf and math.nan special objects so that for all x (except
inf and nan):
What do you mean? Implement a subtype of float and override some methods?
x math.inf
x -math.inf
Marc-Andre Lemburg added the comment:
On 09.01.2015 09:33, Raymond Hettinger wrote:
I'm withdrawing this one. After more work trying many timings on multiple
compilers and various sizes and kinds of datasets, it appears that the
unicode specialization is still worth it.
The cost of
Devin Jeanpierre added the comment:
Does the spec have a handy list of differences to floats anywhere, or do you
have to internalize the whole thing?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23201
Pierre Nugues added the comment:
Hello Victor,
Thank you for your prompt answer.
Which order do you expect? What is your OS? Result on Linux (Fedora 21) with
the french UTF-8 locale.
You can try this ICU demo
http://demo.icu-project.org/icu-bin/locexp?_=eld_=frx=col and paste the list:
Ά
Serhiy Storchaka added the comment:
I afraid that the patch can change computational complexity. The iteration
usually has linear complexity, but indexing can has non-constant complexity.
E.g. for linked list it will cause quadratic complexity of index(). May be we
should have special case
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: Add loop-agnostic SSL implementation to asyncio - New SSL
implementation based on ssl.MemoryBIO
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22560
Raymond Hettinger added the comment:
this deserves to be spelled out in big red letters in
the documentation for the decimal module, along with
any other inconsistencies.
I think you lost all sense of proportion here. The decimal module is obliged
to follow the decimal spec (that is its
STINNER Victor added the comment:
the spec is not likely to change on this point.
In this case, we should just document the behaviour with a reference to the
General Decimal Arithmetic Specification.
--
nosy: +haypo
___
Python tracker
Raymond Hettinger added the comment:
The docs already reference the spec.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23201
___
___
STINNER Victor added the comment:
See also this feature request:
StreamReader needs a timeout
https://code.google.com/p/tulip/issues/detail?id=96
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23198
New submission from Martin Richard:
Hi,
I would like to submit 3 trivial modifications which break a cycle each. It is
not much, but those three cycles caused a lot of objects to be garbage
collected. They can now be freed using the reference counting mechanism, and
therefore, reduce the
Changes by Martin Richard mart...@martiusweb.net:
--
components: +asyncio
nosy: +gvanrossum, haypo, yselivanov
type: - performance
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23209
New submission from Ethan Furman:
The help() function explains range as being a virtual sequence, but that
phrase cannot be found anywhere in the docs.
Suggestion is to insert a phrase below:
The advantage of the range type over a regular list or tuple is
that a range object
is a virtual
Guido van Rossum added the comment:
All three changes look good to me. The selectors.py fix should be applied to
CPython first; the others to Tulip first.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23209
Steve Dower added the comment:
Right, so when using python34_d.dll you need the _d.pyd versions (and if you're
building your own .pyd you need to add the _d suffix too). There's nothing
wrong with this difference, since the debug and release builds are subtly
incompatible with each other, so
Ethan Furman added the comment:
On 01/09/2015 09:39 AM, Guido van Rossum wrote:
Please don't add this to the glossary and don't start using virtual (it is
my favorite example of terminology gone wrong in C++ as well as in colloquial
language). The terminology virtual sequence is only used
Ethan Furman added the comment:
Others have chimed in for removal of the word virtual, with the Best In Class
comment going to Guido for:
To me it is a poisonous buzzword that we're better without.
It has virtually no semantics left. :-)
--
assignee: docs@python -
components:
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: +demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23166
___
___
Ethan Furman added the comment:
Update: per Guido, we need to drop the word virtual from the help() for
range.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23210
___
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23014
___
Roundup Robot added the comment:
New changeset ab72f30bcd9f by Brett Cannon in branch 'default':
Issue #23014: Make importlib.abc.Loader.create_module() required when
https://hg.python.org/cpython/rev/ab72f30bcd9f
--
nosy: +python-dev
___
Python
Brett Cannon added the comment:
I think I would need to see exactly how you want the bytecode to change and
then think over any backwards-compatibility issues since this is doesn't come
up very often.
--
___
Python tracker rep...@bugs.python.org
Berker Peksag added the comment:
It's not correct that [The c_int] type is an alias for the c_long type on
32-bit systems. Actually it's an alias if int and long are the same size.
It's already documented at
https://docs.python.org/dev/library/ctypes.html#ctypes.c_int
On platforms
Steve Dower added the comment:
Yeah, unfortunately the only correct way to do this is to use a debug build of
Python. It isn't that difficult to build, but it is extra work and may not be
an option at all depending on context (for example, some businesses won't let
employees access source
Brett Cannon added the comment:
If Antoine or Ezio don't make any more comments or commit this themselves then
I will take the patch as-is and commit it next Friday.
Sorry for the delay, Demian, but December is always a slow month due to
holidays.
--
Demian Brecht added the comment:
Thanks for the response Brett and no worries, the delay is totally
understandable.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22992
___
Joakim Karlsson added the comment:
A complicating factor is that the debug and release versions of the dll:s seem
to behave differently, which makes it hard to replace one with the other.
For instance, in dynload_win.c, the suffix of files looked for are _d.pyd in
debug mode and .pyd in
R. David Murray added the comment:
I agree with Guido. Virtual is an abused word and I can't imagine anyone
searching on it unless they saw it used somewhere in the first place. Range is
a sequence, and the help docs are just a reminder. The Range docs clearly
explain the advantages of the
New submission from Geoffrey Spear:
This seems to be related to issue20605 where _socket.getaddrinfo() mysteriously
fails on some Snow Leopard systems but not others; I don't think the cause of
that one was ever explained but this appears to be the same error:
New submission from Ned Deily:
https://www.openssl.org/news/secadv_20150108.txt
--
components: Build, Macintosh, Windows
messages: 233780
nosy: ned.deily, ronaldoussoren, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Update
Roundup Robot added the comment:
New changeset 376c5398f28d by Victor Stinner in branch '3.4':
Issue #23209: Break some reference cycles in asyncio. Patch written by Martin
https://hg.python.org/cpython/rev/376c5398f28d
--
nosy: +python-dev
___
STINNER Victor added the comment:
Hi Martin, thanks for the patch. It looks good to me. I applied it to Tulip,
Python 3.4 and Python 3.5.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 79f33147949b by Benjamin Peterson in branch '3.4':
remove buzzword (closes #23210)
https://hg.python.org/cpython/rev/79f33147949b
New changeset 154ae3af0317 by Benjamin Peterson in branch 'default':
merge 3.4 (#23210)
Roundup Robot added the comment:
New changeset 7438f2e30908 by Victor Stinner in branch '3.4':
Issue #23209: Revert change on selectors, test_selectors failed.
https://hg.python.org/cpython/rev/7438f2e30908
New changeset 27cbc877447b by Victor Stinner in branch 'default':
(Merge 3.4) Issue
STINNER Victor added the comment:
Ooops, test_selectors fails because get_key() raises TypeError: 'NoneType'
object is not subscriptable when the selector is closed.
A different fix should be written.
I'm now using tox to run the Tulip test suite, I'm surprised that I didn't
notice the
Roundup Robot added the comment:
New changeset a216f349771b by Ned Deily in branch '2.7':
Issue #23212: Update OS X installer build OpenSSL to 1.0.1k.
https://hg.python.org/cpython/rev/a216f349771b
New changeset 849ec86651b4 by Ned Deily in branch '2.7':
Issue #23212: 2.7-specific OS X
New submission from Al Sweigart:
GrepDialog.py's findfiles() method lacks a unit test.
The comments in the unit test stub in test_grep.py correctly notes that since
findfiles() method does not rely on the GrepDialog class, it can be made into a
function.
The attached patch does the
Mark Dickinson added the comment:
This behavior seems to be required by the General Decimal Arithmetic
Specification (http://speleotrove.com/decimal/daexcep.html )
Yes, exactly. The decimal module strictly follows that specification. I don't
like the 0**0 - NaN result much either
Raymond Hettinger added the comment:
I'm withdrawing this one. After more work trying many timings on multiple
compilers and various sizes and kinds of datasets, it appears that the unicode
specialization is still worth it.
The cost of the lookup indirection appears to be completely
Nick Coghlan added the comment:
You can see the difference between the two cases in the bytecode:
dis.dis(import x.y.z)
1 0 LOAD_CONST 0 (0)
3 LOAD_CONST 1 (None)
6 IMPORT_NAME 0 (x.y.z)
9 STORE_NAME
Robert Kuska added the comment:
This commit (probably) breaks aarch64 python build.
See https://bugzilla.redhat.com/show_bug.cgi?id=1174037
Build was done with libffi 3.1.6, I have also tried with latest upstream libffi
version with same result.
(gdb) b ReturnRect
Function ReturnRect not
Martin Panter added the comment:
For what it’s worth, it would be better if compressed streams did limit the
amount of data they decompressed, so that they are not susceptible to
decompression bombs; see Issue 15955. But having a flexible-sized buffer could
be useful in other cases.
I
New submission from Florian Bruhin:
logging.basicConfig uses **kwargs and does not validate them.
This caused me to shoot myself in the foot multiple times by passing logLevel
instead of level accidentally, and then trying to figure out why my messages
don't get logged.
--
messages:
Berker Peksag added the comment:
The patch also needs documentation update for TarFile.extract():
https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extract
The tarfile documentation is located at Doc/library/tarfile.rst.
--
nosy: +berker.peksag
Steve Dower added the comment:
This change only has an effect of you're building with Visual Studio and our
fork of libffi. You seem to have an unrelated issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20160
Martin Panter added the comment:
Is there anything left for this bug or could it be closed? I can confirm my
v3.4.2 docs say “size” instead of “n” :)
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17003
Martin Panter added the comment:
Is the current documentation as accurate as it can be?
“The number of bytes returned may be less or more than requested”
To me this has always made this method practically useless. A valid
implementation could just always return b. I noticed the BZ2File.peek()
New submission from INADA Naoki:
I prefer ensure_ascii=False because it's efficient.
But I notice it is very slower.
On Python 3.4.2:
In [3]: %timeit json.dumps([{'hello': 'world'}]*100)
1 loops, best of 3: 74.8 µs per loop
In [4]: %timeit json.dumps([{'hello': 'world'}]*100,
Stefan Krah added the comment:
The behavior is already documented (power function):
at least one of x or y must be nonzero
The decimal docs are already so large that it is probably a bad
idea to add a warning.
--
___
Python tracker
eryksun added the comment:
It's not correct that [The c_int] type is an alias for the c_long type on
32-bit systems. Actually it's an alias if int and long are the same size.
Here's the relevant snippet from __init__:
if _calcsize(i) == _calcsize(l):
# if int and long have the
INADA Naoki added the comment:
I've copied test_encode_basestring_ascii.py and modify it for this patch.
--
Added file: http://bugs.python.org/file37654/test_encode_basestring.py
___
Python tracker rep...@bugs.python.org
Gustavo Temple added the comment:
Thank you, Victor!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22038
___
___
Python-bugs-list mailing list
STINNER Victor added the comment:
See also the Documentation: document AbstractServer, Server.sockets is
specific to asyncio event loops issue:
https://code.google.com/p/tulip/issues/detail?id=188
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
readlines() parameter name is not unified still (it can be hint, size,
sizehint). There is no obvious winner.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17003
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka
stage: - patch review
type: - performance
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23206
87 matches
Mail list logo