Mark Dickinson dicki...@gmail.com added the comment:
Grr. Why wasn't this fix backported to the release maintenance branch before
2.6.6 was released? I've just had an application break as a result of
upgrading from 2.6.5 to 2.6.6.
Oh well, too late now. :-(
/grumble
--
nosy:
Senthil Kumaran orsent...@gmail.com added the comment:
Ouch. My mistake. Had not realize then, that code that actually broke things
was merged in 2.6.x and it had to be fixed too. :(
--
___
Python tracker rep...@bugs.python.org
Mark Dickinson dicki...@gmail.com added the comment:
Ah well, it turned out to be fairly easy to work around, at least. :-)
Just in case any other urllib2 users have to deal with this in 2.6.6 (and also
manage to find their way to this bug report :-): it's easy to monkeypatch your
way around
New submission from Emile Anclin emile.anc...@logilab.fr:
Considering following file:
$ cat pylint/test/input/func_unknown_encoding.py
# -*- coding: IBO-8859-1 -*-
check correct unknown encoding declaration
__revision__ = ''
$
When we try to find that module, imp.find_module raises
Stefan Krah stefan-use...@bytereef.org added the comment:
Without the patch, you see the warning if test_build_ext is run in
verbose mode. With the patch, the warning disappears.
--
___
Python tracker rep...@bugs.python.org
Xuanji Li xua...@gmail.com added the comment:
pitrou: actually that seems a bit suspect now... you need to handle 'data'
differently depending on its type, and while you can determine the type by
finding out when 'data' throws certain exceptions, it doesn't seem like what
exceptions were
Ned Deily n...@acm.org added the comment:
More data points: using the 2.7.1 release source tarball, the problem is
reproducible on 10.6 when dynamically linked to the Apple Tcl/Tk 8.5 and
executing in either 64-bit or 32-bit mode. It is not reproducible when using
ActiveState Tcl/Tk 8.5.9,
Xuanji Li xua...@gmail.com added the comment:
bumping...can someone review this? The reported bug seems valid enough.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10464
___
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
Hi, as I stated, the original patch was simply our original implementation.
Here is a new patch. It is simpler:
1) it exposes a gc.callbacks list where users can register themselves, in the
spirit of sys.meta_path
2) One can have
Antoine Pitrou pit...@free.fr added the comment:
Let's start bikeshedding the calling signature. I like having a
single callback, since multiple callables are a nuisance to manage.
IMO the callback should have a second argument as a dict containing
various statistics that we can expand over
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
You are right, Antoine.
How about a string and a dict? the string can be start and stop and we can
add interesting information to the dict as you suggest.
--
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
pitrou: actually that seems a bit suspect now... you need to handle
'data' differently depending on its type,
Yes, but you can't know all appropriate types in advance, so it's better
to try and catch the TypeError.
I don't understand your
Xuanji Li xua...@gmail.com added the comment:
I don't fully understand Lib/urllib/request.py either, I just ported it and ran
the unittests... it seems like what it does is that if you send an iterator
through as 'data' you can't know the length in advance, and rather than let the
len(data)
Changes by Ron Adam ron_a...@users.sourceforge.net:
--
nosy: +ron_adam
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10588
___
___
Davide Rizzo sor...@gmail.com added the comment:
len(data) will raise anyway.
No, it won't, if the iterable happens to be a sequence.
--
nosy: +davide.rizzo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Antoine Pitrou pit...@free.fr added the comment:
len(data) will raise anyway.
No, it won't, if the iterable happens to be a sequence.
Well, it seems the patch is confused between iterable and iterator. Only
iterators have a __next__, but they usually don't have a __len__.
The patch should
Nick Coghlan ncogh...@gmail.com added the comment:
Committed in r86889
The docs changes should soon be live at:
http://docs.python.org/dev/library/urllib.parse.html
If anyone would like to suggest changes to the wording of the docs for post
beta1, or finds additional corner cases that the new
Xuanji Li xua...@gmail.com added the comment:
davide: yeah, hasattr(lol, '__next__') == False, even though strings are
Iterable; so for strings and other such sequences the len(data) line will be
executed. So technically we shouldn't say No Content-Length specified for
iterable body but we
Senthil Kumaran orsent...@gmail.com added the comment:
Xuanji, a wording which does convey the approximate meaning is fine. I think,
the Exception error messages will help the people based on the Context.
- Lets have the ValueError raised from the urllib/request.py. Changing it to
Antoine Pitrou pit...@free.fr added the comment:
One way to check that it's bytes-compatible is to take a memoryview of it:
memoryview(babc)
memory at 0x1cf5120
memoryview(bytearray(babc))
memory at 0x1cf55a0
memoryview(array.array('b', babc))
memory at 0x1cf52a0
memoryview([babc])
Antoine Pitrou pit...@free.fr added the comment:
- Lets have the ValueError raised from the urllib/request.py. Changing
it to isinstance(data,collections.Iterable) as Antoine suggested is
okay here too.
Xuanji is right: it's not. We want bytes to be accepted, and it's an
iterable.
Antoine Pitrou pit...@free.fr added the comment:
You are right, Antoine.
How about a string and a dict? the string can be start and stop
and we can add interesting information to the dict as you suggest.
Looks good to me.
--
___
Python tracker
Daniel Stutzbach stutzb...@google.com added the comment:
How about a string and a dict? the string can be start and stop
and we can add interesting information to the dict as you suggest.
I like where this is headed. How about putting the string in the dict, too?
d['phase'] = 'start'
Antoine Pitrou pit...@free.fr added the comment:
Answering to myself, sorry. memoryview() does return the right answer of
whether the object supports the buffer interface, *however* it doesn't mean the
len() will be right. For example, take an array.array of ints:
memoryview(array.array(I,
Changes by R. David Murray rdmur...@bitdance.com:
--
assignee: - r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1079
___
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Committed in revision 86891. Keeping open to address Mac issue.
--
assignee: - belopolsky
components: +Macintosh
priority: normal - low
stage: commit review - needs patch
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
I am going to close this as rejected unless someone objects. The benefit is
too small to make users suffer through the deprecation process.
--
resolution: - rejected
status: open - pending
R. David Murray rdmur...@bitdance.com added the comment:
Note that none of your examples are valid encoded words, so given that email
currently does strict parsing, the fact that it is not attempting to decode
those words is technically correct.
However, I agree that it would be better for
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Adding #10587 because we need to figure out the exact meaning of str.isspace()
etc. first. It is possible that for proper operation shlex should consult
unicodedata directly.
--
dependencies: +Document the
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
I don't know how to reproduce the issue and without unit tests this patch
cannot be committed.
--
assignee: belopolsky -
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
hasattr(lol, '__next__') == False, even though strings are Iterable
FYI, magic methods are looked up on the class, not on the instance. That’s why
ABCs are the right thing to use here.
Scott Dial sc...@scottdial.com added the comment:
The patch includes unittests; the issue is that the tests pass without the
changes. That is an entirely different state to be in. The tests should be
committed unless somebody wants to object to the behavior that they are testing
(although I
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Committed revision 86893 that makes untabify.py respect encoding cookie in the
files it processes. I don't think there is anything else that needs to be done
here.
--
resolution: - fixed
stage: -
R. David Murray rdmur...@bitdance.com added the comment:
Kovid: so essentially what you are saying is that the windows platform is
broken with respect to MIME types and with respect to its security model. Why
am I not surprised? :)
You would have the same problem if software installation
Kovid Goyal ko...@kovidgoyal.net added the comment:
It is, of course, your decision, but IMO, since the mimetypes database in
windows appears to be always broken, the default behavior of the mimetypes
module in python 2.7 on windows is broken for most (all?) windows installs. For
me
R. David Murray rdmur...@bitdance.com added the comment:
I would expect that it would not be people new to mimetypes that would have the
issues, but people like you for whom the behavior on Windows has changed. And
this is indeed a concern.
The people involved in making the windows mimetypes
Martin v. Löwis mar...@v.loewis.de added the comment:
What is the issue that you are reporting? that the status quo should be
documented, or that isalpha is wrong? These are independent - don't mix them.
--
nosy: +loewis
___
Python tracker
Kovid Goyal ko...@kovidgoyal.net added the comment:
I actually had in mind people that (like me) develop primarily on unix and
assume that mimetypes works the same way on both windows and unix. Of course,
the changed behavior is also a concern.
At the very least, I would encourage the
Martin v. Löwis mar...@v.loewis.de added the comment:
The key requirement to consider for in POSIX compatible mode is, well, POSIX
compatibility, which is defined in
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
New submission from Daniel Stutzbach stutzb...@google.com:
The I/O ABC documentation has a blanket disclaimer at the top:
The abstract base classes also provide default implementations of some
methods in order to help implementation of concrete stream classes. For
example, BufferedIOBase
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10589
___
___
Python-bugs-list mailing
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
On Tue, Nov 30, 2010 at 1:53 PM, Martin v. Löwis rep...@bugs.python.org wrote:
..
What is the issue that you are reporting? that the status quo should be
documented, or that isalpha is wrong?
These are independent -
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Alexander, I don't see anything wrong with patch, nor anything compelling about
it either. It's your choice whether or not to apply.
--
___
Python tracker rep...@bugs.python.org
New submission from Thomas Ryan tom.a.r...@gmail.com:
In 3.1.3, 3.1.2, maybe earlier...
xml.sax.parseString(string, handler, error_handler=handler.ErrorHandler())
Source code requires bytes, not a string as implied by function name and by the
documentation.
Exception thrown for strings.
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
The original motivation for the patch was that if partial() objects are
guaranteed to be flat, it would simplify code that deals with them. See
issue4331 for one example.
With a conservative patch, however, it will
Glyph Lefkowitz gl...@twistedmatrix.com added the comment:
Would it be possible to have this reverted for 2.7.2 / 3.2.1, and restore
~/.local _and_ ~/Library as equally valid locations for python code?
As I tried to explain on the mailing list, this change basically introduces a
regression,
Antoine Pitrou pit...@free.fr added the comment:
Raymond, unless you object, I'd like to commit this before beta1.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8685
___
Changes by Philip Jenvey pjen...@underboss.org:
--
nosy: +pjenvey
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8685
___
___
Python-bugs-list
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Thx.
--
assignee: rhettinger - pitrou
resolution: - accepted
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8685
___
Barry A. Warsaw ba...@python.org added the comment:
Of course, you don't change configure directly, you change configure.in and let
autoconf update the configure (but you already know that I'm sure :).
The patch looks fairly reasonable, though I haven't tried it. One question:
does $SO have
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The value of get_config_var(SO) is the same as before, something like
.cpython-32.so by default on Linux. (see, I just moved the line SO=.$SOABI$SO
at the bottom of the patch).
In the C file dynload_shlib.c, I chose the names SO_BASE
Daniel Stutzbach stutzb...@google.com added the comment:
+io and doc people
Attached is a simple patch to add a table to the documentation summarizing the
I/O ABCs.
--
keywords: +patch
nosy: +benjamin.peterson, ezio.melotti, georg.brandl
Added file:
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
+1 on the basic idea of moving elements in the keys and values arrays at the
same time thereby eliminating the fragmented memory overhead of the sortwrapper
indirection.
I would like the patch to be restricted to just that
Changes by Fred L. Drake, Jr. fdr...@acm.org:
--
nosy: +d...@python, fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10589
___
___
Antoine Pitrou pit...@free.fr added the comment:
Modified patch committed in r86905. Thanks!
--
resolution: accepted - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
What does unsupported mean? Abstract would look more exact.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10589
___
Georg Brandl ge...@python.org added the comment:
Not sure what unsupported methods means. E.g. readinto is listed as
provided by RawIOBase in the doc text.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10589
New submission from Antoine Pitrou pit...@free.fr:
$ ./python -m test.regrtest -R 3:2 test_os
[1/1] test_os
[35351 refs]
[35351 refs]
[35352 refs]
beginning 5 repetitions
12345
[35351 refs]
[35351 refs]
[35352 refs]
test test_os failed -- Traceback (most recent call last):
File
Barry A. Warsaw ba...@python.org added the comment:
On Nov 30, 2010, at 10:12 PM, Amaury Forgeot d'Arc wrote:
The value of get_config_var(SO) is the same as before, something like
.cpython-32.so by default on Linux. (see, I just moved the line
SO=.$SOABI$SO at the bottom of the patch).
Cool,
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Let's test Linux at least, then.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10262
___
Daniel Stutzbach stutzb...@google.com added the comment:
What does unsupported mean? Abstract would look more exact.
It means they raise io.UnsupportedOperation when called (unless the subclass
overrides them to do something else).
They are not marked with @abstractmethod, so Abstract
Antoine Pitrou pit...@free.fr added the comment:
What does unsupported mean? Abstract would look more exact.
It means they raise io.UnsupportedOperation when called (unless the
subclass overrides them to do something else).
They are not marked with @abstractmethod, so Abstract would
Ned Deily n...@acm.org added the comment:
Patch looks good to me. Supplied test fails before and works after fix applied.
--
nosy: +ned.deily
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
Changes by Ned Deily n...@acm.org:
Removed file: http://bugs.python.org/file19666/issue_10231_testcase.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10464
___
Daniel Stutzbach stutzb...@google.com added the comment:
Other suggestions for a better name for that column are certainly welcome. :-)
Stub Methods?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10589
Antoine Pitrou pit...@free.fr added the comment:
Other suggestions for a better name for that column are certainly welcome. :-)
Stub Methods?
Fine with me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10589
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10478
___
___
Python-bugs-list mailing
Shannon -jj Behrens jji...@users.sourceforge.net added the comment:
Sorry, I just had a baby on Saturday. Hence, I'm a bit late getting to this.
It might take me a couple weeks.
--
___
Python tracker rep...@bugs.python.org
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Deferring to 3.3.
--
priority: normal - low
versions: +Python 3.3 -Python 2.7, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8425
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This does not conflict with the other proposed changes to timeit and it is
in-line with Guido's desire that to expose useful parts currently buried in the
command-line logic.
Amaury, you've shown an interest. Would you
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Antoine, what do you want to do with the one? Without a good test case the
OP's original issue is undiagnosable.
--
assignee: rhettinger - pitrou
versions: +Python 3.1
___
Python
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Any new logic should make maximum use of existing tools:
def __isub__(self, other)
if len(other) len(self)*8:
other = self other
. . .
# rest of isub unchanged
--
stage: patch review - needs
Shawn swal...@opensolaris.org added the comment:
I specifically mentioned *SPARC* as the performance problem area, but the reply
about 0.5s to dump fails to mention on what platform they tested
My problem is not undiagnosable. I'll be happy to provide you with even more
data files. But I
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Daniel, do you have time to work on this one?
If so, go ahead an make setobject.c accept any instance of collections.Set and
make the corresponding change to the ABCs:
def __or__(self, other):
if not
Brian Curtin cur...@acm.org added the comment:
Fixed in r86906. Split the shared setUp/tearDown into individual methods for
each part.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker
Daniel Stutzbach stutzb...@google.com added the comment:
Yes, I can take a stab at it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8743
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
No need to rush this for the beta. It's a bug fix and can go in at any time.
The important thing is that we don't break the C code. The __ror__ magic
method would still need to do the right thing and the C code needs to
New submission from Elias Zamaria mikez...@gmail.com:
If I try to pretty-print an ordered dictionary, it doesn't show nicely. Instead
of having each key-value pair on its own line, the whole thing shows up on one
long line, which wraps many times and is hard to read.
I can provide an example
Éric Araujo mer...@netwok.org added the comment:
Congratulations. Take the time you’ll need, if this doesn’t go into 3.2 it’ll
just be in 3.3.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1649329
Éric Araujo mer...@netwok.org added the comment:
I’m afraid there is no way, but a robust solution will be designed. See #7434.
--
nosy: +eric.araujo
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - general pprint rewrite
Ezio Melotti ezio.melo...@gmail.com added the comment:
Committed in r86908. I'll leave this open because there still a few things
(proposed in the previous message) that can be changed/improved.
--
___
Python tracker rep...@bugs.python.org
New submission from Raymond Hettinger rhettin...@users.sourceforge.net:
Nick, I may have found a straight-forward way to incorporate your idea for the
cache to support maxsize=None. Let me know what you think.
--
assignee: ncoghlan
components: Library (Lib)
files: cache.diff
keywords:
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
Added file: http://bugs.python.org/file19887/cache2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10593
___
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
Removed file: http://bugs.python.org/file19886/cache.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10593
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Attaching a rough concept of how to make the existing pprint module extendible
without doing a total rewrite. The actual handler is currently bogus (no
thought out), so focus on the @guard decorator and the technique for
Nick Coghlan ncogh...@gmail.com added the comment:
Nice!
You may still need to use the lock even for the simple unbounded case though -
incrementing hits and misses isn't atomic, so the statistics may be miscounted
if you get a hit or miss in different threads at the same time.
Xuanji Li xua...@gmail.com added the comment:
So, reading all your comments, I gather that my proposed patch for client.py
which is
try:
self.sock.sendall(data)
except TypeError:
if isinstance(data, collections.Iterable):
for d in t:
self.sock.sendall(d)
Ezio Melotti ezio.melo...@gmail.com added the comment:
s/regexp/regex/ done in r86910.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10273
Antoine Pitrou pit...@free.fr added the comment:
Raymond, I'll follow up in private with Shawn. All the recent performance
improvements done on JSON (in 3.2) mean the issue can be closed IMO.
--
resolution: - out of date
status: open - closed
___
Antoine Pitrou pit...@free.fr added the comment:
just to confirm: we WANT array.array(I, [1,2,3]) to have a content-
length of 12, right?
Yes, since it will emit 12 bytes in the body (you could actually have a test
for it).
--
___
Python tracker
New submission from INADA Naoki songofaca...@gmail.com:
http://docs.python.org/c-api/list.html#PyList_New
Note: If length is greater than zero, ...
s/length/len/
--
assignee: d...@python
components: Documentation
messages: 122974
nosy: d...@python, naoki
priority: normal
severity:
INADA Naoki songofaca...@gmail.com added the comment:
http://docs.python.org/c-api/list.html#PyList_GetItem
Return the object at position pos in the list pointed to by p
s/p/list/
--
___
Python tracker rep...@bugs.python.org
INADA Naoki songofaca...@gmail.com added the comment:
http://docs.python.org/c-api/list.html#PyList_GetItem
Return the object at position pos in the list pointed to by p
s/pos/index/
--
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10594
___
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Applied in r86911.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10593
___
Eli Bendersky eli...@gmail.com added the comment:
Thanks for the report,
Attaching a patch for Doc/c-api/list.rst in Python 3.2
If this is OK, I can backport the patch to other versions as well.
--
keywords: +patch
nosy: +eli.bendersky
Added file:
Eli Bendersky eli...@gmail.com added the comment:
I fuzzily recall there was somewhere a decision to use the American spelling of
some words, like s/behaviour/behavior/ appearing in this patch. Is this right,
or was it decided that it doesn't matter?
--
nosy: +eli.bendersky
status:
Eli Bendersky eli...@gmail.com added the comment:
Éric, also re your previous message, I personally would prefer seeing contrary
to what one can think removed altogether. IMHO it's too chatty for an official
document and doesn't really add new information over the sentence it follows.
INADA Naoki songofaca...@gmail.com added the comment:
OK, please.
On Wed, Dec 1, 2010 at 12:46 PM, Eli Bendersky rep...@bugs.python.org wrote:
Eli Bendersky eli...@gmail.com added the comment:
Thanks for the report,
Attaching a patch for Doc/c-api/list.rst in Python 3.2
If this is OK, I
Elias Zamaria mikez...@gmail.com added the comment:
I forgot to mention, someone came up with this suggestion
(http://stackoverflow.com/questions/4301069/any-way-to-properly-pretty-print-ordered-dictionaries-in-python/4303996#4303996).
It is not the best, but the output is better than how it
1 - 100 of 103 matches
Mail list logo