Georg Brandl added the comment:
There is already an enhanced theme:
https://github.com/ionelmc/sphinx-py3doc-enhanced-theme
I will have a look at it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23312
Akira Li added the comment:
I've removed mentioning of GIL and uploaded a new patch.
--
Added file:
http://bugs.python.org/file37850/docs-time.sleep-other-threads-are-not-blocked-2.diff
___
Python tracker rep...@bugs.python.org
Mark Summerfield added the comment:
Since this is a bit controversial, I've tried marking it as 'rejected' with
this comment.
I've also added a very brief explanation and link back to here on my web site:
http://www.qtrac.eu/pyenum.html
--
resolution: - rejected
Changes by Mark Summerfield m...@qtrac.eu:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23292
___
___
Python-bugs-list
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17088
___
___
Python-bugs-list
New submission from Akira Li:
Python 2.7.9 (default, Jan 25 2015, 13:41:30)
[GCC 4.9.2] on linux2
Type help, copyright, credits or license for more information.
import os, sys, tempfile
d = u'\u20ac'.encode(sys.getfilesystemencoding()) # non-ascii
if not os.path.isdir(d):
Ethan Furman added the comment:
Amusingly enough, I posted a question/answer to StackOverflow
(http://stackoverflow.com/q/28130683/208880) and so far the only other
respondent posted an answer with similar functionality to my own, and also
recommended that such a method be added to the base
SilentGhost added the comment:
It seems, if I read https://docs.python.org/3/reference/expressions.html#calls
correctly that the evaluation order of the function arguments is not defined in
general, as it depends on your use of keyword argument and exact function
signature. Naturally, f(a(),
R. David Murray added the comment:
The resolution of issue 16967 argues that this should probably be considered a
bug. It certainly goes against normal Python expectations. I think it should
also be considered to be of low priority, though.
--
nosy: +r.david.murray
priority: normal
New submission from Justin Eldridge:
The section titled Invoking Descriptors in the Python Language Reference [1]
says:
Class Binding
If binding to a new-style class, A.x is transformed into the call:
A.__dict__['x'].__get__(None, A).
This suggests that __get__ is looked
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20188
___
Neil Girdhar added the comment:
Fixed all tests except test_parser. New node numbers are not reflected here
for some reason.
--
Added file: http://bugs.python.org/file37854/starunpack18.diff
___
Python tracker rep...@bugs.python.org
New submission from Joshua Landau:
It is claimed that all expressions are evaluated left-to-right, including in
functions¹. However,
f(*a(), b=b())
will evaluate b() before a().
¹ https://docs.python.org/3/reference/expressions.html#evaluation-order
--
components: Interpreter
John Posner added the comment:
Per Martin's suggestion, deltas from issue21279.v5.patch:
* no change to patch for doc/library/stdtypes.rst
* doc string reflowed in patch for objects/unicodeobject.c
--
Added file: http://bugs.python.org/file37855/issue21279.v6.patch
New submission from Dave Notman:
# Python 3.3.1 (default, Sep 25 2013, 19:30:50)
# Linux 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:25:33 UTC 2013 i686 i686
i686 GNU/Linux
import re
splitter = re.compile( r'(\s*[+/;,]\s*)|(\s+and\s+)' )
ll = splitter.split( 'Dave Sam, Jane and Zoe' )
STINNER Victor added the comment:
Why do you use an unicode prefix? Does it work with a bytes prefix?
You should use Python 3 if you want the best Unicode support.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23315
Maries Ionel Cristian added the comment:
You can see that theme in action at
http://python-aspectlib.readthedocs.org/en/latest/
--
nosy: +ionel.mc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23312
Neil Girdhar added the comment:
Dict comprehensions work.
--
Added file: http://bugs.python.org/file37852/starunpack16.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
___
Neil Girdhar added the comment:
actually, we accept alternation, so maybe a bit to say whether we start with a
list or a dict followed by a length of the alternating sequence?
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
At a quick glance this does not seem like a reasonable patch...introducing
copies of two stdlib modules is basically a non-starter. Nor do I understand
from the description what the problem is that it is trying to solve.
--
nosy: +r.david.murray
Martin Panter added the comment:
I looked over your __ne__ removals from the library, and they all seem sensible
to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21408
___
Berker Peksag added the comment:
I've updated the patch for 3.5. I also have cleaned-up the documentation to
avoid duplicate content.
--
components: +Library (Lib) -XML
nosy: +berker.peksag
versions: +Python 3.5 -Python 3.4
Added file: http://bugs.python.org/file37860/issue1745722.diff
R. David Murray added the comment:
Neil: I presume you are speaking of your in-progress PEP patch, and not the
current python code? If so, please keep the discussion of handling this in the
context of the PEP to the PEP issue. This issue should be for resolving the
bug in the current code
Neil Girdhar added the comment:
Yes, sorry David. I got linked here from the other issue. In any case, in the
current code, the longest alternating sequence possible is 4. So one way to
solve this is to change the CALL_FUNCTION parameters to be lists and dicts only
and then process the
Neil Girdhar added the comment:
another option is to add a LIST_EXTEND(stack_difference) opcode that would
allow us to take the late iterable and extend a list at some arbitrary stack
position. I had to add something like that for dicts for the other issue, so
it would follow that pattern.
New submission from Serhiy Storchaka:
Debugging build crashes in some circumstances in str.decode() with error
handler which produces replacement string with length larger than malformed
data. For example the backslashreplace error handler produces 4-character
string for every illegal byte.
Changes by Steve Dower steve.do...@microsoft.com:
--
nosy: +steve.dower
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22286
___
___
Roundup Robot added the comment:
New changeset 2de90090e486 by Serhiy Storchaka in branch '3.4':
Issue #23321: Fixed a crash in str.decode() when error handler returned
https://hg.python.org/cpython/rev/2de90090e486
New changeset 1cd68b3c46aa by Serhiy Storchaka in branch 'default':
Issue
Serhiy Storchaka added the comment:
Yes, I see. The patch exposed existing bug in decoding error handing. See
issue23321 for this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22286
___
New submission from Devin Jeanpierre:
The port to reST missed the second example:
https://docs.python.org/release/2.5/lib/node867.html
This is still referred to in the docs, so it is not deliberate. For example,
the token module docs say The second example for the parser module shows how
to
Raymond Hettinger added the comment:
May be worth to move this test outside of the loop as in the
set_lookup function.
The loop used to be this way but testing showed no benefit, so a while back I
recombined it back to a j=0 start point and the code looked much nicer. I
don't really want
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8796
___
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15852
___
New submission from Matthieu Gautier:
I_set_sw function is missing a SWAP_INT.
This leads to wrong set of bitfield value.
Here is a script to reproduce:
--
from ctypes import *
class HEADER(BigEndianStructure):
_fields_ = ( ('pad', c_uint32, 16),
('v1', c_uint32,
Joshua Landau added the comment:
Amazing, thanks.
I also just uncovered http://bugs.python.org/issue23316; we'll need to support
a patch for that. In fact, bad evaluation order is why I haven't yet gotten
down my unification strategy. I wouldn't worry about extra opcodes when using
*args or
SilentGhost added the comment:
Looks like it works exactly as the docs[1] describe:
re.split(r'\s*[+/;,]\s*|\s+and\s+', string)
['Dave', 'Sam', 'Jane', 'Zoe']
You're using capturing groups (parentheses) in your original regex which
returns separators as part of a match.
[1]
Raymond Hettinger added the comment:
I had intentionally moved the entry-key == key test to be after the hash test.
Unlike dicts where exact key matches are norm, sets are used for deduping
(cased where keys are equal but not dups).
By moving the test inside the entry-key == hash test, we
Raymond Hettinger added the comment:
For the time being (while I working on other parts of sets), I'm holding-off an
anything that adds more lookkey variants. When the neatening-up and tweaking
of search routines comes to a close, I'll revisit this one because it looks
like there is a some
Roundup Robot added the comment:
New changeset 25ecf3d0ea03 by Benjamin Peterson in branch '3.4':
handle headers with no key (closes #19996)
https://hg.python.org/cpython/rev/25ecf3d0ea03
New changeset 29923a9987be by Benjamin Peterson in branch 'default':
merge 3.4 (#19996)
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23321
___
Robert Collins added the comment:
Right, and a usable API.
I believe that this will meet Guido's use case:
tb = TracebackException(*sys.exc_info, lookup_lines=False)
some time later
if should_show_tb:
lines = list(tb.format())
I'm not 100% sold on the public API being a
Serhiy Storchaka added the comment:
I have no strong preferences. This code is used very rarely and I have no any
example which exposes performance differences. But how large the benefit of
your patch? It doesn't make the C code more clean.
--
___
Neil Girdhar added the comment:
Dict displays work.
--
Added file: http://bugs.python.org/file37851/starunpack15.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
___
Changes by Chris Angelico ros...@gmail.com:
--
nosy: -Rosuav
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
___
___
Python-bugs-list mailing
Neil Girdhar added the comment:
All tests pass, polishing. Joshua, I'm still not sure how to do show the right
error for the function call with duplicate arguments…
--
Added file: http://bugs.python.org/file37853/starunpack17.diff
___
Python
Georg Brandl added the comment:
Are you ok with us copying parts of the enhancements?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23312
___
Maries Ionel Cristian added the comment:
Sure, take anything you want.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23312
___
___
R. David Murray added the comment:
Looks like the buildbots aren't happy with this change.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22286
___
R. David Murray added the comment:
That wording is a bit strong :).
On that issue I requested a patch without the reflow, because I prefer that.
Personally, I think it is in fact worth noting in the devguide that it is
better for doc patches to not reflow paragraphs so that it is easier to
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23320
___
___
Python-bugs-list
Martin Panter added the comment:
Adding a new patch that just fixes the typo error in the first patch
--
Added file:
http://bugs.python.org/file37859/default-ne-reflected-priority.v2.patch
___
Python tracker rep...@bugs.python.org
Neil Girdhar added the comment:
I assume this is the problem:
dis.dis('f(*a(), b=b())')
1 0 LOAD_NAME0 (f)
3 LOAD_NAME1 (a)
6 CALL_FUNCTION0 (0 positional, 0 keyword pair)
9 LOAD_CONST
Raymond Hettinger added the comment:
May be add the unicode specialization right in PyObject_RichCompareBool?
That's a possibility but it has much broader ramifications and might or might
not be the right thing to do. I'll leave that for someone else to pursue and
keep my sights on sets for
Neil Girdhar added the comment:
Sounds good. I'll stop working until I see your patch. I tried to make it
easy for you to implement your error idea wrt BUILD_MAP_UNPACK :)
--
___
Python tracker rep...@bugs.python.org
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23119
___
Roundup Robot added the comment:
New changeset 20f54cdf351d by Raymond Hettinger in branch 'default':
Issue #23119: Simplify setobject by inlining the special case for unicode
equality testing.
https://hg.python.org/cpython/rev/20f54cdf351d
--
nosy: +python-dev
Martin Panter added the comment:
Thanks for the reviews.
I agree about the new HTTPResponse flag being a bit awkward; the HTTPResponse
class should probably raise the ConnectionClosed exception in all cases. I was
wondering if the the HTTPConnection class should wrap this in a
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11822
___
___
Serhiy Storchaka added the comment:
What about just removing the dummy test inside the hash test? The benefit is
smaller but statistically sygnificant and always positive.
$ ./python -m timeit -s a = list(range(10**6)); s1 = set(a); s2 = set(a) --
s1 = s2
Unpatched: 10 loops, best of 3: 39.3
R. David Murray added the comment:
I believe that you are correct: special methods are looked up on the type, and
this is assumed implicitly in the Class Binding description. (This was not 100%
true in python2, but it is in current python3.) But the Class Binding
description is correct,
R. David Murray added the comment:
Oops, typoed the issue number.
New changeset 3a9b1e5fe179 by R David Murray in branch '3.4':
#23215: reflow paragraph.
https://hg.python.org/cpython/rev/3a9b1e5fe179
New changeset 52a06812d5da by R David Murray in branch 'default':
Merge: #23215: note that
Roundup Robot added the comment:
New changeset dd8a03e98158 by Serhiy Storchaka in branch 'default':
Issue #22286: The backslashreplace error handlers now works with
https://hg.python.org/cpython/rev/dd8a03e98158
--
nosy: +python-dev
___
Python
Serhiy Storchaka added the comment:
What timing results?
There is large chance that first tested entry is empty. May be worth to move
this test outside of the loop as in the set_lookup function.
i = mask; may be moved to the start of the loop.
--
Added file:
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21279
___
___
Raymond Hettinger added the comment:
Reopening this with a better patch that nicely tightens the inner-loop without
an algorithmic change or any downside.
Currently, the entry computation adds a constant (i+j), masks it (mask) to
wrap on overflow, scales it to a table index ( 4), and then
Roundup Robot added the comment:
New changeset 3a9b1e5fe179 by R David Murray in branch '3.4':
#23215: reflow paragraph.
https://hg.python.org/cpython/rev/3a9b1e5fe179
New changeset 52a06812d5da by R David Murray in branch 'default':
Merge: #23215: note that time.sleep affects the current
Roundup Robot added the comment:
New changeset 55ad65c4f9e2 by R David Murray in branch '3.4':
#23251: Note that time.sleep affects the calling thread only.
https://hg.python.org/cpython/rev/55ad65c4f9e2
New changeset 5e01c68cabbf by R David Murray in branch '2.7':
#23251: note that time.sleep
R. David Murray added the comment:
Thanks, Akira, but I did not use your patch, since it still had the paragraph
reflow in it.
--
resolution: - fixed
stage: commit review - resolved
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Oops, typoed the issue number. That should have been 23251.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23215
___
New submission from Akira Li:
It is suggested in https://bugs.python.org/issue23251
that only a core Python developer may reflow paragraphs
while submitting patches for the Python documentation.
It should be codified in devguide: I haven't found the
word *reflow* in it.
--
components:
70 matches
Mail list logo