Martin Panter added the comment:
For the record, the SMTP scenario was Issue 17498, where code that is about to
raise an exception attempts an RSET command that could also fail.
I do think each change in my patch is essentially the same case: restoring the
invariant expected by the __exit__()
Devin Jeanpierre added the comment:
Adding haypo since apparently he's been touching signals stuff a lot lately,
maybe has some useful thoughts / review? :)
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5315
New submission from Devin Jeanpierre:
The code attached runs a while loop that prints, and has a signal handler that
also prints. There is a thread that constantly fires off signals, but this is
just to ensure the condition for the bug happens -- this is a bug with signal
handling, not
Martin Panter added the comment:
I left a couple comments on Reitveld. The main question is: is there any reason
why we can’t poll PyErr_CheckSignals() directly the tkinter EventHook loop,
rather than juggling a new SIGINT handler then reraising it? That way we might
trigger other Python
New submission from Jyrki Wahlstedt:
On OS X (with MacPorts) the following happens:
===
DEBUG: Environment:
CC='/usr/bin/clang'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_jwa_work_macports-trunk_dports_python_py-gdbm/py35-gdbm/work/.CC_PRINT_OPTIONS'
Jyrki Wahlstedt added the comment:
This worked ok in a3… (not in a4 anymore)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24282
___
___
Ned Deily added the comment:
The problem you are seeing is due to MacPort's non-standard method of building
the gdbm module separately in a stand-alone build instead of during the normal
building of the complete Python standard library. As of 3.5.0a4 with
49910ff21ba5 for Issue20184,
Mark Shannon added the comment:
I don't understand why this has been closed.
I agree with Jim's analysis.
Lookups do not change the dict and the choice of lookdict_* variant depends
solely on the set of keys.
In fact, lookdict_split *doesn't* replace itself, it merely calls look_dict,
Jyrki Wahlstedt added the comment:
Thanks for the quick follow-up! I'll get the work done at our end:)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24282
___
Ronald Oussoren added the comment:
Ned: Keeping darwin as the platform tag is fine with me. It is slightly ugly
because it doesn't match the platform tag used by distutils/setuptools, but is
also something that most users won't use directly.
That said: there was some talk about supporting iOS
Serhiy Storchaka added the comment:
It is not obvious that the patch is needed. If you have ready patch and good
benchmark results, you could reopen the issue. Otherwise status quo wins.
--
nosy: +serhiy.storchaka
___
Python tracker
Serhiy Storchaka added the comment:
Opened separate issue24284 for inconsistency in startswith/endswith.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24243
___
New submission from Serhiy Storchaka:
The behavior of startswith in corner case is inconsistent between str and bytes
in Python 3, str and unicode in Python 2, and between str in Python 2 and
Python 3.
Python 3:
''.startswith('', 1, 0)
True
b''.startswith(b'', 1, 0)
False
Python 2:
Petr Viktorin added the comment:
Yes, you did find an error. Thanks for reporting it!
Here is a fix with a test case.
--
Added file: http://bugs.python.org/file39493/fix-pep489-submodule.patch
___
Python tracker rep...@bugs.python.org
New submission from Ronald Oussoren:
PyObjC has an extension that's imported as objc._objc. This works fine on
version upto the 3.5 beta (checkout from earlier today).
With that I get the following exception:
Python 3.5.0b1+ (default:7255af1a1c50+, May 25 2015, 11:46:18)
[GCC 4.2.1
Ronald Oussoren added the comment:
The attached patch appears to fix the issue. This appears to be an off-by-one
error.
--
stage: - needs patch
type: - behavior
Added file: http://bugs.python.org/file39494/issue-24285.txt
___
Python tracker
Martin Blais added the comment:
Adding information that tells developers where the memory for those returned
areas is stored and as you mention, its lifetime guarantees w.r.t. to the
Python object, would go a long way towards making this more clear. The
questions that immediately came to my
Martin Blais added the comment:
Oh, and yes, just adding this info at the top would be fine IMO. It shouldn't
have to be repeated.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24278
___
Ronald Oussoren added the comment:
See issue 24285, I ran into the same issue as mention in msg244008. That issue
has a patch.
--
nosy: +ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24268
Petr Viktorin added the comment:
issue 24268 has a patch with a test case.
--
nosy: +encukou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24285
___
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24283
___
___
Python-bugs-list
R. David Murray added the comment:
I think this can only be applied in a feature release (and I think it should
be, because of the backward-compatibility-with-python2 issue). However, since
this is potentially controversial, we need some more opinions.
--
nosy: +r.david.murray
Antoine Pitrou added the comment:
RuntimeError: reentrant call inside _io.BufferedWriter name='stdout'
As the exception message suggests: the IO stack is not reentrant. If an ongoing
IO call is interrupted by a signal, and the signal handler calls again into the
IO stack, this situation is
Matthias Bussonnier added the comment:
Yes, you did find an error. Thanks for reporting it!
Here is a fix with a test case.
Thanks, I was unsure if there would have been side effect or other things to
fix. I would have submitted a patch otherwise.
Thanks.
--
Devin Jeanpierre added the comment:
It doesn't do any of those things in Python 2, to my knowledge. Why aren't we
willing to make this work?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24283
STINNER Victor added the comment:
It doesn't do any of those things in Python 2, to my knowledge.
Well, even if Python 2 doesn't warn you, threading_print_test.py is also wrong
on Python 2. Python 3 is better because it warns you :-)
Why aren't we willing to make this work?
It would be
Eric Snow added the comment:
@Jim,
You've got some good questions. I'll look into them today.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Eric Snow added the comment:
@mrab
gah! I could swear I originally had the _odict_clear_node first and had
switched them due to a segfault. It even crossed my mind on Friday but I
didn't pursue it. I'm guessing I did put the _odict_clear_node call first at
some point but lost that fix
Eric Snow added the comment:
I'm going to echo the previous comment that maybe trying to emulate the
existing dict implementation too carefully just adds complexity.
The whole dance with _odict_get_index and _odict_resize is due to the
requirement that OrderedDict maintain O(1) operation for
Tal Einat added the comment:
Attached is a slightly revised patch.
This mostly fixes minor documentation wording and formatting issues, including
those pointed out by Chris Barker on the python-dev mailing list.
Also, since it has been decided to support complex values only in a separate
Eric V. Smith added the comment:
Just to clarify:
If not specified, the default presentation type for floats is g. Since you
didn't specify f in your example, it's using g. For presentation type g,
the precision (3 in your case) is the total number of significant digits. So
12.34 first
Eric Snow added the comment:
Should dictobject.h get a bit more changes? In particular, should the
following be expanded?
#define PyDictKeys_Check(op) (Py_TYPE(op) == PyDictKeys_Type)
#define PyDictItems_Check(op) (Py_TYPE(op) == PyDictItems_Type)
#define PyDictValues_Check(op)
Changes by Berker Peksag berker.pek...@gmail.com:
--
resolution: - duplicate
stage: needs patch - resolved
status: open - closed
superseder: - PEP 489 -- Multi-phase extension module initialization
___
Python tracker rep...@bugs.python.org
Eric Snow added the comment:
@Mark, great idea. I wish we'd discussed it more at PyCon 2013 when I was
working on preserving OrderedDict's O(1) deletion. :)
TBH, I don't have any problems with improvements. In fact, I'd be quite happy
if folks jumped in and improved what I've done or even
Mark Shannon added the comment:
I realise that I am bit late to the party, but I would like to point out that a
smaller, arguably simpler, and almost certainly faster alternative design
exists.
This design simply consists of an array of (prev, next, key) nodes attached to
the base dict.
The
Stefan Behnel added the comment:
I noticed that my patch isn't entirely correct. If the exception value is a
tuple, both PyErr_SetObject() and PyErr_NormalizeException() use it directly as
*argument tuple* for the exception instantiation call, i.e. they essentially
unpack it into separate
Raymond Hettinger added the comment:
Should this be backported? IMO, it is a bug.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23488
___
___
New submission from Raymond Hettinger:
Currently, ElementTree doesn't support comments and processing instructions in
the prolog. That is the typical place to put style-sheets and document type
definitions.
It would be used like this:
from xml.etree.ElementTree import ElementTree,
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
priority: release blocker -
stage: - patch review
versions: +Python 3.6 -Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24254
Changes by Eric Snow ericsnowcurren...@gmail.com:
Added file: http://bugs.python.org/file39496/3b2a9026d48e.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
STINNER Victor added the comment:
It may be a stretch to get this into 3.5, but the final change should be
pretty small.
Changing the default type of class dictionaries is a huge change. IMO it should
be deferred to Python 3.6.
--
nosy: +haypo
STINNER Victor added the comment:
Sorry, I give up on this issue. I don't know how to fix it, nor if it's
possible to fix it.
--
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
I'm no more interested to work on this issue, so I just close it. It was more a
reminder for myself than a real issue.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
Eric Snow added the comment:
I've moved this to 3.6. Small as the patch might be, there just isn't enough
urgency to warrant making use of an exception to get it into 3.5. If
__definition_order__ were still on the table then I'd probably still push for
3.5. :)
--
STINNER Victor added the comment:
Sorry for not being more available for feedback on patches. I chose to write
the final patch because patches were not updated to take in account my latest
comments.
I hope that this issue helps you at least the process for reviewing patches ;-)
--
Roundup Robot added the comment:
New changeset 623e07ea43df by Victor Stinner in branch '3.4':
Issue #23840: tokenize.open() now closes the temporary binary file on error to
https://hg.python.org/cpython/rev/623e07ea43df
New changeset a640d268ba97 by Victor Stinner in branch '3.5':
(Merge 3.5)
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
priority: normal - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24254
___
Eric Snow added the comment:
Per discussion on python-dev, I'm tabling the __definition_order__ part to 3.6.
I'll open a thread on python-ideas on it later and open a new issue here if I
get a positive response.
So this issue is just about making OrderedDict the default namespace type for
Eric Snow added the comment:
At present the only remaining issues with the patch are:
* 10 leaked refs in test_collections
* a failing test in test_enum
===
key: __members__
result: OrderedDict([('red', Color.red:
Nick Coghlan added the comment:
This is *not* about changing the default type of class dictionaries (which
I agree would be far too large a change to make without a PEP), it's only
about changing the ephemeral evaluation namespace used to execute the class
body.
--
Eric Snow added the comment:
This is not about changing the default type for class dictionaries. It is only
for changing the default type used during class definition. Essentially, we
are just changing the type of what is returned from `type.__prepare__`.
cls.__dict__ will remain a dict.
STINNER Victor added the comment:
Without more interested, I chose to defer this issue. Feel free to reopen it if
you need it for more use cases, or if you are interested to implement it.
--
resolution: - postponed
status: open - closed
___
Python
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24286
___
Eric Snow added the comment:
The failing test is not passing so I don't see any further blockers to
committing this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
Added file: http://bugs.python.org/file39499/c3fab329aa7f.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Eric Snow added the comment:
rather, it *is* passing now :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
___
Python-bugs-list
Martin Panter added the comment:
The ElementTree class imitates or wraps many methods of the Element class.
Since Element.append() and remove() already exist and act on children of the
element, I think the new ElementTree methods should be named differently. Maybe
something like
Eric Snow added the comment:
I've cleaned up the patch. I still want to make one last pass to check
re-entrancy concerns.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
Added file: http://bugs.python.org/file39500/ba1c6d40ca63.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23993
___
STINNER Victor added the comment:
Without a strong support, I don't want to put this in Python 3.5. It's too late
(we reached the feature freeze).
For Python 3.6, we may experiment using UTF-8 for Python filesystem encoding
when the LC_CTYPE locale is POSIX (C).
--
STINNER Victor added the comment:
I updated the list of modified functions in the PEP 475.
Except of the issue #23719, all other issues related to the PEP 475 have been
fixed. It's time to close this meta issue.
--
dependencies: -PEP 475: port test_eintr to Windows
resolution: -
New submission from Joshua Bronson:
Is it intentional that the second assertion in the following code fails?
```
from collections import OrderedDict
d = dict(C='carbon')
o = OrderedDict(d)
assert d == o
assert d.viewitems() == o.viewitems()
```
Since d == o, I'm surprised that d.viewitems()
Eric Snow added the comment:
Thanks for pointing out types.prepare_class. I've updated it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24254
___
Raymond Hettinger added the comment:
The change to __neg__ looked like a nice improvement and the same should
technique can be done to __pos__. Attaching a patch for those two.
--
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file39497/counter_pos_neg.diff
Changes by STINNER Victor victor.stin...@gmail.com:
--
versions: +Python 3.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23763
___
___
Eric Snow added the comment:
I've cleaned up all the ref leaks so now just the failing test_enum test
remains to be resolved.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Martin Panter added the comment:
I can’t imagine much code would rely on either old or new behaviour. If you
only put it into a feature release, would you have to document it as a change
in behaviour?
--
nosy: +vadmium
___
Python tracker
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24284
___
___
Jim Jewett added the comment:
Eric I realize that O (1) deletion is hard, and don't see a good way
around it without changing the implementation ... I just think that the
preserving the current C layout may be forcing an even more complicated
solution than neccessary. I am nervous about
Yury Selivanov added the comment:
rather, it *is* passing now :)
Eric, thanks for working on this! Could you please go through your patch and
replace // comments with /* .. */ ones? It would also be great if you can
clean-up XXX comments.
--
Eric Snow added the comment:
Ah, good point. I'll take care of all those.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
___
Changes by Yury Selivanov yseliva...@gmail.com:
--
priority: normal - deferred blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21998
___
___
Raymond Hettinger added the comment:
This looks like a bug in Python 2.7:
# Python2.7
from collections import Set
isinstance({1:2}.viewitems(), Set)
False
# Python3.5
from collections import Set
isinstance({1:2}.items(), Set)
True
I think the dictitems object needs to be registered as a
Martin Panter added the comment:
The Python 3 documentation was updated in Issue 8593 (revision 5d4a5655575f).
Perhaps some of the wording also applies to Python 2 and you can just copy it.
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
Martin Panter added the comment:
This is my understanding of where the buffers would be managed and what governs
their lifetimes, though I haven’t analyzed the code to verify:
s, z: str - UTF-8 cache - pointer for object lifetime
s*, z*: str - UTF-8 cache - buffer; bytes-like - buffer; until
Raymond Hettinger added the comment:
The fix looks something like this:
diff --git a/Lib/_abcoll.py b/Lib/_abcoll.py
--- a/Lib/_abcoll.py
+++ b/Lib/_abcoll.py
@@ -473,6 +473,7 @@
for key in self._mapping:
yield (key, self._mapping[key])
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file39502/fix_view_registry.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24286
Martin Panter added the comment:
urllib2_redirect_fix.2.patch adds a test.
I was tempted to remove the whole block of code setting the path to “/”, but
there is one minor disadvantage: if a redirect points to a so-called
“malformed” URL without any path component, like “http://example.net” or
Serhiy Storchaka added the comment:
This question looks similar to:
Should list compare equal to set when the items are equal?
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24286
Changes by Larry Hastings la...@hastings.org:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24286
___
___
Python-bugs-list
81 matches
Mail list logo