Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Fixed in r84383.
--
resolution: duplicate - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4356
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
The example can be fixed by placing a b before the two string literals.
However, pretty much the whole document refers to strings and should refer to
byte sequences or the bytes type.
I thought there were automated tests that
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
As most of the code in this patch was copied from EnumValue and EnumKey, it
includes bugs from those functions that have since been fixed. I'm thinking of
Issue #2810, although there might have been other changes.
Instead of
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Raymond, do you agree with Ray's analysis?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8743
___
Antoine Pitrou pit...@free.fr added the comment:
Note that 3.x will give you the expected error message:
s = socket.socket()
wrapped = ssl.wrap_socket(s)
wrapped.recv(1)
Traceback (most recent call last):
File stdin, line 1, in module
File /home/antoine/py3k/__svn__/Lib/ssl.py, line 292,
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com:
In Issue 9212, I mused:
I sort of wonder if .register() should verify that the concrete class
provides all of the methods of the ABC.
Éric Araujo suggested I open that as an issue for consideration.
I have found a few
Antoine Pitrou pit...@free.fr added the comment:
I've added a _Py prefix in r84391, and also made the `shape` argument const.
If numpy people want this to be an official public API, they'll have to
contribute. Thanks.
--
resolution: - fixed
stage: - committed/rejected
status: open -
Jean-Paul Calderone inva...@example.invalid added the comment:
I'll be looking at it shortly. Py3.2 is still aways from release so there is
no hurry.
I would consider reviewing and possibly apply this change, but I don't want to
invade anyone's territory.
--
nosy: +exarkun
New submission from Michael Foord mich...@voidspace.org.uk:
As discussed on python-dev, a version of getattr that does static lookups -
bypassing the descriptor protocol, __getattr__, and __getattribute__. Initial
implementation by Nick Coghlan, amended and tests added by me.
Phillip Eby
Michael Foord mich...@voidspace.org.uk added the comment:
Tests require Python 3. Implementation works with Python 2 as well.
--
Added file: http://bugs.python.org/file18700/test_static.py
___
Python tracker rep...@bugs.python.org
Changes by Michael Foord mich...@voidspace.org.uk:
Removed file: http://bugs.python.org/file18700/test_static.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
___
Changes by Michael Foord mich...@voidspace.org.uk:
--
Removed message: http://bugs.python.org/msg115297
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
___
Michael Foord mich...@voidspace.org.uk added the comment:
Tests require Python 3. Implementation works with Python 2 as well.
--
Added file: http://bugs.python.org/file18701/test_static.py
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
+1 on the principle. This could help things like pydoc, especially on modern
Web frameworks which do incredibly ugly things (per-thread global variables,
descriptors executing tons of code etc.).
--
nosy: +pitrou
Changes by Michael Foord mich...@voidspace.org.uk:
--
Removed message: http://bugs.python.org/msg115296
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9732
___
Michael Foord mich...@voidspace.org.uk added the comment:
(Reposted as text was entirely duplicated - oops.)
As discussed on python-dev, a version of getattr that does static lookups -
bypassing the descriptor protocol, __getattr__, and __getattribute__. Initial
implementation by Nick
Daniel Urban urban.dani...@gmail.com added the comment:
Thanks for the corrections. I'm attaching the new patch as issue9212b.diff.
I'm using PyAnySet_Check to determine if the other argument is really a set,
but I'm not entirely sure, that this is correct. Please let me know if other
New submission from Juan José Conti jjco...@gmail.com:
I expected I could iterate over a DictProxy as I do over a regular dict.
from multiprocessing import Manager
m = Manager()
d = m.dict()
d
DictProxy object, typeid 'dict' at 0x98a240c
for x in d:
... print x
...
Traceback (most
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9549
___
___
Python-bugs-list mailing list
Antoine Pitrou pit...@free.fr added the comment:
I'm not sure which commit it is, but test_ssl has started failing on some
buildbots:
==
ERROR: test_errors (test.test_ssl.BasicSocketTests)
Antoine Pitrou pit...@free.fr added the comment:
Thinking about it, I'm not sure this would be a good idea to do this by
default. There is an ambiguity where it's not obvious if the buffer would
contain the whole data or only the bytes after the current position.
I think perhaps an explicit
Guido van Rossum gu...@python.org added the comment:
That would be too hard-headed. A complaint I often hear about Interfaces in
Java is that classes have a hard time if they choose not to implement a certain
method. It also would not be enough -- there are tons of ways you would be able
to
Antoine Pitrou pit...@free.fr added the comment:
Actually, it started failing exactly after r84352 (issue #9706).
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9711
Antoine Pitrou pit...@free.fr added the comment:
Some buildbots have started failing exactly after this commit:
==
ERROR: test_errors (test.test_ssl.BasicSocketTests)
Guido van Rossum gu...@python.org added the comment:
Just jumping in here with commentary from the side bench... I noticed you say
this does not always return the same results as dir(x). But since dir(x)
exists, perhaps it would make sense to match dir(x) as closely as possible?
I.e. if
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Would it be useful to provide a separate function to perform the check, which
could be used by lint-style tools as well as automated tests?
It would be great if every call to .register in the standard library had a
Michael Foord mich...@voidspace.org.uk added the comment:
Since the addition of __dir__, dir(obj) can return arbitrary values. Typically
(I guess) this will be used to add dynamically created attributes that this
function will fail to find - so it is *more* likely that we will fail to find
Michael Foord mich...@voidspace.org.uk added the comment:
(Or vice versa - getattr_static may succeed in finding members - like
descriptors that raise AttributeError when fetched - when getattr fails.)
--
___
Python tracker rep...@bugs.python.org
Guido van Rossum gu...@python.org added the comment:
Would it be useful to provide a separate function to perform the check, which
could be used by lint-style tools as well as automated tests?
It would be great if every call to .register in the standard library had a
corresponding test
Antoine Pitrou pit...@free.fr added the comment:
Patch committed in r84394 (py3k) and r84396 (3.1). Thank you Stefan!
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
versions: -Python 2.7
___
Python tracker
Guido van Rossum gu...@python.org added the comment:
Since the addition of __dir__, dir(obj) can return arbitrary values.
Typically (I guess) this will be used to add dynamically created attributes
that this function will fail to find - so it is *more* likely that we will
fail to find
Antoine Pitrou pit...@free.fr added the comment:
I would consider reviewing and possibly apply this change, but I don't
want to invade anyone's territory.
I don't think there would be any invasion. I think the patch is simple enough,
and seems to provide a nice benefit.
--
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Re-opening and re-titling the issue to that effect.
Proposed syntax and usage:
# in Lib/abc.py
class ABCMeta(type):
# ...
def has_methods(cls, subclass):
Returns True iff subclass implements the appropriate
v_peter leanmeandonothingmach...@gmail.com added the comment:
Any comments on the patch for 3.2?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9042
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Ok to remove it from Python 3.2. I don't think that it is necessary to update
Python 2.7 code/doc.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9549
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Please leave this for me.
Thank you.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8685
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9549
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
It would be nice to get this fixed before the next release.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9212
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
+1 for the basic idea.
It could use a better name, Sequence.has_methods(range) reads backwards to me.
Perhaps something like: Sequence.implemented_by(range) or
Sequence.verify_full_api(range) or some such.
Also, when the
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
I will aim to spend some time with this (and the similar Issue #9213) today
and/or tomorrow, so that it can be committed in time for 3.2a2.
--
resolution: - accepted
stage: unit test needed - patch review
New submission from Jim Fulton j...@zope.com:
I assume ABCs use some sort of cache for issubclass checks.
I also assume the cache doesn't use weakrefs, leading to leaks in classes
created on the fly (as is common in tests).
The attached script demonstrates the leak.
The leak doesn't seem to
Antoine Pitrou pit...@free.fr added the comment:
Done in r84397.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
versions: -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9549
New submission from Antoine Pitrou pit...@free.fr:
The Misc/cheatsheet file is totally outdated (the title “Python 2.3 Quick
Reference” already gives you a hint).
It is also not clear if it is meant for plain text viewing, or should be
formatted using an external program...
--
New submission from Jim Fulton j...@zope.com:
We often run test suites repeatedly using a debug build of python
to look for memory leaks.
We also got in the bad habit of using a fork of doctest. Recently, we've
switched away from our fork and have noticed a problem with the standard
doctest's
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: - jnoller
nosy: +jnoller
stage: - needs patch
type: - behavior
versions: +Python 3.1, Python 3.2 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9733
Changes by Éric Araujo mer...@netwok.org:
--
keywords: -patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9116
___
___
Python-bugs-list mailing
Changes by Éric Araujo mer...@netwok.org:
--
resolution: - duplicate
stage: needs patch - committed/rejected
status: open - closed
superseder: - Misc/cheatsheet needs updating
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
Merging nosy from duplicate report.
--
nosy: +pitrou, rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4819
___
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
nosy: -rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4819
___
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Committed r84400 which should fix the first test failure.
I'll take a look at the buildbots to see how it goes.
As for the second failure I have no idea at the moment.
--
___
Python tracker
STINNER Victor victor.stin...@haypocalc.com added the comment:
According to the Unicode standard the high and low surrogate halves used
by UTF-16 (...)
Yes, but in Python, U+DC80..D+DCFF range is used to store undecodable bytes.
Eg. 'abc\xff'.decode('ascii', 'surrogateescape') gives
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1552880
___
___
Python-bugs-list
Changes by Jean-Paul Calderone inva...@example.invalid:
--
nosy: -exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8685
___
___
Antoine Pitrou pit...@free.fr added the comment:
It is certainly still a problem with 3.x, but I don't find a way to exhibit it
here.
--
nosy: +pitrou
versions: +Python 3.1, Python 3.2
___
Python tracker rep...@bugs.python.org
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4111
___
___
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9729
___
___
Antoine Pitrou pit...@free.fr added the comment:
The patches were committed in r84403. Thank you very much!
--
resolution: - fixed
stage: unit test needed - committed/rejected
status: open - closed
versions: -Python 3.1
___
Python tracker
Georg Brandl ge...@python.org added the comment:
Fixed in r84407.
--
nosy: +georg.brandl
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9677
___
New submission from Dino Viehland di...@microsoft.com:
x = bytearray(b'abc')
y = memoryview(x)
del y[0:1]
This crashes CPython 3.1.1 and 2.7.
--
components: Interpreter Core
messages: 115333
nosy: dino.viehland
priority: normal
severity: normal
status: open
title: Del on memoryview
Antoine Pitrou pit...@free.fr added the comment:
Nice catch, thank you. I've fixed it in r84408 (py3k), r84410 (3.1) and r84411
(2.7).
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9737
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9737
Changes by Guido van Rossum gu...@python.org:
--
nosy: -gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1856
___
___
Python-bugs-list
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8685
___
___
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8425
___
___
Terry J. Reedy tjre...@udel.edu added the comment:
While refactoring the code for 2.7, I discovered that the description of the
heuristic for 2.6 and in the code comments is off by 1. items that appear more
than 1% of the time should actually be items whose duplicates (after the
first) appear
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2459
___
___
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9155
___
___
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1569291
___
___
Georg Brandl ge...@python.org added the comment:
Uh, if I understand correctly, this is akin to what PEP 380 does with generator
returns, just with a different exception.
As such, if I'm not mistaken, it is a) a new language feature for after the
moratorium and b) needs a competing PEP.
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2690
___
___
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Since this issue doesn't apply in Python 3 and (as I understand it) the 2.7
branch is only open to bug fixes, can we close this performance issue?
--
nosy: +stutzbach
___
Python
Changes by Brett Cannon br...@python.org:
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5362
___
Changes by Guido van Rossum gu...@python.org:
--
nosy: -gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2690
___
___
Python-bugs-list
Éric Araujo mer...@netwok.org added the comment:
Relying on str(cls) breaks if two classes have the same name, but I guess this
is not a concern outside of the interactive interpreter. Patch looks good to me.
--
stage: - patch review
___
Python
New submission from STINNER Victor victor.stin...@haypocalc.com:
Many C functions have bytes argument (char* type) but the encoding is not
documented. If would not be a problem if the encoding was always the same, but
it is not. Examples:
- format of PyUnicode_FromFormat() should be encoded
ipatrol ipatrol6...@yahoo.com added the comment:
Can this be added in a minor release? I came across wanting it while parsing
some html forms.
--
nosy: +ipatrol
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2340
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
The patch looks fine.
--
nosy: +rhettinger
resolution: - accepted
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9042
Brett Cannon br...@python.org added the comment:
No, only bugfixes can go into Python 2.7.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2340
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
r84429 creates Py_UNICODE_strcat() (change with the patch: return the right
value).
r84430 creates PyUnicode_strdup() (change with the patch: rename the function
from Py_UNICODE_strdup() to PyUnicode_strdup() and mangle the
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file18672/Py_UNICODE_strdup.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9425
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file18671/Py_UNICODE_strcat.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9425
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
The operator methods in setobject.c should be liberalized to accept instances
of collections.Set as arguments. For speed, they should continue to check
PyAnySet_Check(other) first and then if that fails, fall back to
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I'm marking this one as rejected. The timings have shown mixed results (some
favorable, some not). In general, there is a bias against expanding the number
of opcodes because 1) there aren't that many codes available, 2)
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Kelly, thanks for posting the idea.
I'm going to close this one for now
but it can be reopened if compelling
use cases arise.
--
resolution: - rejected
status: open - closed
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Am deferring this to Py3.3. There is a workaround available just using
duck-typing and I would like to wait until more more has been done on StructSeq
before setting committing to an new namedtuple Abstract Base Class (one
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Unassigning, this needs fresh thought and a fresh patch from someone who can
devote a little deep thinking on how to solve this problem cleanly. In the
meantime, it is no problem to simply cast the CSV tuples into named
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
priority: normal - low
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9269
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This proposal hasn't gotten much love or support and I'm no longer interested
in it. Aside from ''.join and '{}'.format, there doesn't seem to be many
common cases, so there's no big win here.
--
assignee:
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: rhettinger - terry.reedy
priority: normal - low
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4395
___
Benjamin Peterson benja...@python.org added the comment:
What's the point of '{}'.format() anyway given the format() builtin?
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6133
Benjamin Peterson benja...@python.org added the comment:
Will be fixed in 2.7.1.
--
nosy: +benjamin.peterson
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9734
Benjamin Peterson benja...@python.org added the comment:
I don't think this is very useful. You could just as well exclude the future
fixer completely.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7141
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Excluding the future fixer would only get me half of the way there. I would
still need to add from __future__ import print_statement to all of my scripts
if I want them to continue to work under 2.6.
(Well, for me
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Yes, but in Python, U+DC80..D+DCFF range is used to store undecodable bytes.
Eg. 'abc\xff'.decode('ascii', 'surrogateescape') gives 'abc\udcff'.
That's an inventive way of breaking the unicode standard :)
Anyway, why would you
Benjamin Peterson benja...@python.org added the comment:
2010/9/1 Daniel Stutzbach rep...@bugs.python.org:
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Excluding the future fixer would only get me half of the way there. I would
still need to add from __future__
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Well, I grant you that it's a bit of scope-creep, and if you want to reject it
on those grounds I can't blame you.
To me it seems like a relatively small change that would greatly help people
like myself who want to update
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
The operator methods in setobject.c should be liberalized to accept
instances of collections.Set as arguments.
Under this plan, set() and collections.Set will still have slightly different
behavior. collections.Set will be
Meador Inge mead...@gmail.com added the comment:
I believe this is slightly tricky because 'bdb.format_stack_entry' makes
references to '.f_locals' and 'bdb.format_stack_entry' is invoked in several
places in 'pdb'. One option would be to add a extra parameter to
'bdb.format_stack_entry' to
New submission from Case Van Horsen cas...@gmail.com:
In several modules, the output of help(some_module) is wider than 80
characters. This results in extra line wrapping and incorrect formatting of the
help text.
I've attached a single patch (doc_width1.diff) that corrects the issue for
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
Only bug-fixes are supposed to go into 2.7, so reclassifying.
--
assignee: - vinay.sajip
nosy: +vinay.sajip
versions: +Python 3.2 -Python 2.7
___
Python tracker rep...@bugs.python.org
100 matches
Mail list logo