New submission from Sworddragon:
On a try/except-block if an exception raises (for example KeyboardInterrupt)
the except block could cause another exception and if this block tries to catch
it too the nested except block could cause another exception again. This goes
into an unlimited
Changes by Sworddragon sworddrag...@aol.com:
Added file: http://bugs.python.org/file31470/race_condition_slow.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18836
___
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18823
___
___
Ezio Melotti added the comment:
The third CTRL + C will cause a KeyboardInterrupt.
This is expected. The first ctrl+c interrupts the first sleep and goes in the
second try, executing the second sleep. The second ctrl+c interrupts the
second sleep and goes in the second except where it
Sworddragon added the comment:
Are you saying that if the user keeps hitting ctrl+c you would need an
endless chain of nested try/except in order to catch them all?
Correct. For example if I want to show the user the message Aborted instead
of a huge exception if he hits CTRL + C another
New submission from Tomi Pieviläinen:
In older versions (2.x, 3.2, 3.3) multiprocessing.reduction was only mentioned
in a one example, with a one comment after it. In the 3.4dev documentation even
this was dropped.
--
assignee: docs@python
components: Documentation
messages: 196184
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +jnoller, sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18837
___
___
Stefan Behnel added the comment:
BTW, I also like how short and clean iterparse() becomes when you move this
feature into the parser. It's basically just a convenience function that does
read(), feed(), and yield-from. Plus the usual bit of bolerplate code,
obviously.
--
Nick Coghlan added the comment:
Eli's summary left out an exchange between us that happened after he'd already
written the summary - he pointed out the same problem with the EventParser name
that you noticed: it's really an alternative XMLParser that exposes
read_events(), rather than an
Stefan Behnel added the comment:
iterparse's parser argument will be deprecated
No need to do that. Update the docs, yes, but otherwise keep the possibility to
improve the implementation later on, without going through a deprecation +
dedeprecation cycle. That would just confuse users IMHO.
Nick Coghlan added the comment:
Since parsers don't support changing the target after creation, I think it
makes sense to deprecate passing in a parser *instance*, and instead require
passing in a callback that accepts the target to use and *returns* an
appropriate parser object. The parser
Stefan Behnel added the comment:
I don't see adding one method to XMLParser as a design problem. In fact, it's
even a good design on the technical side, because if ET ever gains an
HTMLParser, then the implementation of this feature would be highly dependent
on the underlying parser, i.e. it
Stefan Behnel added the comment:
... instead require passing in a callback that accepts the target ...
That could be the parser class then, for example, except that there may be
other options to set as well. Plus, it would not actually allow iterparse to
wrap a user provided target. So, in
Stefan Behnel added the comment:
it's really about turning XMLParser's push API for events (where the events
are pushed into the target object by the parser calling the appropriate
methods), into an iterparse style pull API where the events can be retrieved
via calls to read_events().
New submission from Drekin:
On Windows, Python 3.3.2, when I run Python as a subprocess via Popen(py -i
somescript.py, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() and
somescript.py ends with exception, there is first interactive promt in
stderr output and then the traceback which is
Stefan Behnel added the comment:
in the long run we want the new class to just be a convenience API for
combining XMLParser and a custom target object, even if it can't be
implemented that way right now.
Just to be clear: I changed my opinion on this one and I no longer think that
it is a
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13107
___
Antoine Pitrou added the comment:
Unless the memory allocator actually supports it, this means you lose a whole
lot of memory for padding, though... Memory which will sit there unused at the
end of another cacheline.
Note that the current small object allocator, if not disabled, *should*
New submission from Marco Buttu:
Python 3.3::
import sys
print(sys.exit.__doc__)
exit([status])
Exit the interpreter by raising SystemExit(status).
If the status is omitted or None, it defaults to zero (i.e., success).
If the status is numeric, it will be used as the
STINNER Victor added the comment:
The default allocator for PyObject is PyType_GenericAlloc(). If the type has
the Py_TPFLAGS_HAVE_GC flag, PyType_GenericAlloc() calls _PyObject_GC_Malloc().
It is the case for the set type. _PyObject_GC_Malloc() adds an header of
sizeof(PyGC_Head) (12 bytes
Roundup Robot added the comment:
New changeset 187a678c6033 by Ezio Melotti in branch '2.7':
#18839: document that sys.exit() will not accept a non-integer numeric value as
exit status.
http://hg.python.org/cpython/rev/187a678c6033
New changeset 694e50a79638 by Ezio Melotti in branch '3.3':
Ezio Melotti added the comment:
Fixed, thanks for the report!
--
assignee: docs@python - ezio.melotti
nosy: +ezio.melotti
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: behavior - enhancement
versions: +Python 2.7, Python 3.3, Python 3.4
Roundup Robot added the comment:
New changeset 79ce25c70795 by Victor Stinner in branch 'default':
Issue #18408: _PyObject_Dump() now saves/restores the current exception
http://hg.python.org/cpython/rev/79ce25c70795
New changeset e63f19d0a651 by Victor Stinner in branch 'default':
Issue
Roundup Robot added the comment:
New changeset e63f19d0a651 by Victor Stinner in branch 'default':
Issue #18664, #18408: Rewrite PyErr_WriteUnraisable() to handle errors
http://hg.python.org/cpython/rev/e63f19d0a651
--
nosy: +python-dev
___
Python
Brett Cannon added the comment:
Please upload the patches as files to the issue, that way our review tool can
be used.
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18834
Antoine Pitrou added the comment:
What is the alignment of a cacheline? Can a line starts at any
address?
If it could, Raymond wouldn't be asking for this feature ;-)
Cachelines are typically aligned at whatever their size is. So,
a 64-byte cacheline will be aligned at a 64 bytes boundary.
New submission from Donald Stufft:
The Python tutorial tells, and even recommends, new users that they can use the
pickle module to serialize arbitrary objects. However it does not provide any
warning about the insecurity of unpickling arbtirary data. The text even goes
so far as to mention
Fred L. Drake, Jr. added the comment:
Advising the reader to be aware of the security warnings in the API
documentation seems sufficient.
JSON isn't intended to support arbitrary data, and that's what this section is
discussing. Another section about data interchange with other applications
Donald Stufft added the comment:
The section to me just seems to be about how to handle more than just strings,
it mentions numbers, lists, dictionaries, and class instances. Of those it
mentions, only the class instances are not able to handled out of the box by
JSON.
However like I said
Donald Stufft added the comment:
Further more the tutorial claims it's the standard way of persisting data which
in my experience it's far from that due to the security concerns. I've seen
very little actual use of pickle in the wild (and when it was used it was often
used by people who
stakingrainbow2 added the comment:
NewInterface
--
nosy: +stakingrainbow2
title: Remove -mno-cygwin from distutils - NewInterface
Added file: http://bugs.python.org/file31471/sa6.html
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
I updated parser_unicode.patch to the last Python version. The new patch has
just a minor nit: test_symtable does crash :-D
Fixed in new patch: parser_unicode-3.patch
--
Added file: http://bugs.python.org/file31472/parser_unicode-3.patch
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1944
___
___
Python-bugs-list
Changes by Ludwig Nussel ludwig.nus...@suse.de:
--
nosy: +lnussel
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13655
___
___
Python-bugs-list
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file21759/parser_unicode.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11619
___
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file31446/parser_unicode-2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11619
___
Changes by PJ Eby p...@telecommunity.com:
Removed file: http://bugs.python.org/file31471/sa6.html
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
Changes by PJ Eby p...@telecommunity.com:
--
title: NewInterface - Remove -mno-cygwin from distutils
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
Fred L. Drake, Jr. added the comment:
When I read ... that can take almost any Python object ..., I don't think
the recommendation is about just a few types.
The Zope and ZODB communities certainly use pickle extensively, we're aware of
the security implications, and we send pickled data
Steven D'Aprano added the comment:
I have changed the algorithm for statistics.sum to use long integer summation
of numerator/denominator pairs.
This removes the concerns Mark raised about the float addition requiring
correct rounding. Unless I've missed something, this now means that
Donald Stufft added the comment:
A description of the pickle module itself does not equate to the purpose of the
section. Given that this is a tutorial and previous section taught how to read
and write from files I would suggest that the purpose of the section was to
give them the next step
Vajrasky Kok added the comment:
Apparently, other attributes of the csv dialect beside delimiter, such as
escapechar and quotechar share the same problem.
import _csv
_csv.reader('foo', quotechar=b'')
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: quotechar
New submission from Steven D'Aprano:
math.isfinite currently raises ValueError when given a Decimal sNAN (signalling
NAN).
I've run into a situation where I'm calling isfinite() on a numeric value which
may be a Decimal sNAN, and it would be nice if it returned False.
On the other hand, see
Antoine Pitrou added the comment:
I would be ok with changing that part of the tutorial to use json. Since json
is much better known outside of the Python programming circles, and since its
output is human-readable, it's probably a better fit for the tutorial. pickle
can be mentioned as a
R. David Murray added the comment:
Then you catch KeyboardInterrupt and present your alternate text. I'm not
following what the problem is. In particular, once you've caught
KeyboardInterrupt, a second ctl-C *should* cause a normal program break,
otherwise you've locked the user into a
Changes by Éric Araujo mer...@netwok.org:
--
Removed message: http://bugs.python.org/msg196207
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
R. David Murray added the comment:
For anyone who wants to look in to this: according to the stack overflow
question and comments, this is a behavior change between python2 and python3.
--
nosy: +r.david.murray
___
Python tracker
Éric Araujo added the comment:
+1
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18830
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
By the way, there is one difference between json and pickle in this context:
json will output a text serialization, pickle a binary one. If serializing to a
binary file, users must do the (utf-8, most likely) encoding themselves.
--
New submission from Steven D'Aprano:
On issue 15544 Mark Dickinson suggested adding methods to float to match
methods on Decimal, giving type-agnostic ways of testing real numbers that
don't rely on converting to float. I don't see any sign that Mark raised a
feature request, so I'm taking
Eli Bendersky added the comment:
On Sun, Aug 25, 2013 at 10:40 PM, Stefan Behnel rep...@bugs.python.orgwrote:
Stefan Behnel added the comment:
Hmm, did you look at my last comment at all? It solves both the technical
issues and the API issues very nicely and avoids any problems of
Sworddragon added the comment:
The problem is simple: It is not possible to catch every exception in an
application. Even if you try to print a message and exit on an exception it is
always possible that the user will see a traceback.
--
___
Python
New submission from Martin Mokrejs:
Hi,
it happened to me that using faulthandler and python compiled with
--with-pydebug and C*FLAGS=-ggdb I got this stacktrace (will attach longer
version as a file):
(gdb) where
#0 0x7f0e3af8aacb in raise () from /lib64/libpthread.so.0
#1
Martin Mokrejs added the comment:
Should have included from the head of gdb output:
Program terminated with signal 6, Aborted.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18843
___
Joe Borg added the comment:
Can I confirm this is still in the trunk? I have 3.3.2 and am suffering from
the fact that `-u` isn't setting stdin to unbuffered. I'm have to run a flush
every command, which is awful.
--
nosy: +Joe.Borg, georg.brandl
versions: +Python 3.2, Python 3.3
R. David Murray added the comment:
I wonder if you could achieve what you want (which I always hope programs I use
never do[*]) by writing your own signal handler.
In any case, I don't believe there is a bug here. This is working as designed.
[*] There are many times I have found myself
Changes by Fred L. Drake, Jr. fdr...@gmail.com:
--
nosy: -fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18840
___
___
Python-bugs-list
Amaury Forgeot d'Arc added the comment:
This is a memory corruption.
Please look at the memory before the freed address (0x449e6900), maybe there is
an indication of some buffer overflow?
--
nosy: +amaury.forgeotdarc
___
Python tracker
Martin Mokrejs added the comment:
Would you please guide me what gdb commands I should issue for you? Thank you.
BTW, I ran memtest86+ few days ago, although this is non-ECC memory I think HW
is fine.
--
___
Python tracker rep...@bugs.python.org
Martin Mokrejs added the comment:
Grr, forgot to look into a file where I recorded STDERR.
Debug memory block at address p=0x449e6900: API 'o'
80 bytes originally requested
The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfb):
at p-7: 0xfb
at p-6: 0xfb
at
New submission from Alan Isaac:
The need for weighted random choices is so common that it is addressed as a
common task in the docs:
http://docs.python.org/dev/library/random.html
This enhancement request is to add an optional argument to random.choice, which
must be a sequence of
Madison May added the comment:
From urllib.parse:
uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
'wais', 'file', 'https', 'shttp', 'mms',
'prospero', 'rtsp', 'rtspu', '', 'sftp',
'svn', 'svn+ssh']
From
Stefan Behnel added the comment:
XMLParser knows nothing about Elements, at least in the direct API of today.
The one constructing Elements is the target.
Absolutely. And I'm 100% for keeping that distinction exactly as it is.
The read_events method proposed for the new class (currently
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +facundobatista, mark.dickinson, rhettinger, skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18841
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +facundobatista, mark.dickinson, rhettinger, skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18842
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Library (Lib)
nosy: +mark.dickinson, rhettinger, serhiy.storchaka
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18844
Changes by Serhiy Storchaka storch...@gmail.com:
--
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18830
___
___
Tim Peters added the comment:
Python's debug-mode memory allocators add some magic values before and after
each allocated chunk of memory, and check them when the chunk is freed to make
sure nobody overwrote them. In this case, someone did overwrite the byte at
p-5, where p is the address of
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18843
___
___
Python-bugs-list mailing
Martin Mokrejs added the comment:
Thank you for explanation what is going on. I called matplotlibs drawing
function to include 49308 dots and corresponding legend items with their
colors. That's all I can say. I am not a native English speaker so I don't know
what 'rogue extension modules'
Madison May added the comment:
+1. I've found myself in need of this feature often enough to wonder why it's
not part of the stdlib.
--
nosy: +madison.may
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18844
Antoine Pitrou added the comment:
Agreed with the feature request. The itertools dance won't be easy to
understand, for many people.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18844
Changes by Ned Deily n...@acm.org:
--
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18828
___
___
Python-bugs-list mailing list
Stefan Behnel added the comment:
Here is a proof-of-concept patch that integrates the functionality of the
IncrementalParser into the XMLParser. I ended up reusing most of Antoines
implementation and test suite. In case he'll look back into this ticket at some
point, I'll put a thank you
Stefan Behnel added the comment:
(I still wonder why I'm the one writing all the patches here when Eli is the
one who actually wants this feature ...)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17741
Changes by Ryan Gonzalez rym...@gmail.com:
Added file: http://bugs.python.org/file31477/cygwinccompiler.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18834
___
Changes by Ryan Gonzalez rym...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file31476/ccompiler.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18834
___
Stefan Behnel added the comment:
BTW, maybe read_events() still isn't the ideal method name to put on a parser.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17741
___
New submission from Martin Mokrejs:
While running my app testsuite I have another one which crashed.
Fatal Python error: Segmentation fault
Current thread 0x7fe8d3527700:
File /usr/lib64/python2.7/site-packages/matplotlib/transforms.py, line 2370
in get_matrix
File
Guido van Rossum added the comment:
On Sat, Aug 24, 2013 at 5:04 AM, Charles-François Natali
rep...@bugs.python.org wrote:
Before I post it for final review, I have three more questions:
1) In the documentation, I don't know how to best refer to files
object registered: is file descriptor OK,
Guido van Rossum added the comment:
Looks good. Go ahead and convert the rest of the socket constants. Then we
can consider other modules, e.g. select and os.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18720
Tim Peters added the comment:
Impossible to know, but since everything in the traceback comes from
matplotlib, the error is most likely in matplotlib.
--
nosy: +tim.peters
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18845
Tim Peters added the comment:
Memory corruption can be difficult to track down. Best thing you can do is
strive to find a test case as small and fast as possible that shows the same
kind of error.
By rogue extension module I just mean 3rd-party C code (like, for example,
matplotlib).
I
Eli Bendersky added the comment:
(I still wonder why I'm the one writing all the patches here when Eli is
the one who actually wants this feature ...)
Well, obviously because you're the only real programmer around here and the
rest of us are just a bunch of hand-wavy morons.
Seriously,
Roundup Robot added the comment:
New changeset df2fdd42b375 by Victor Stinner in branch 'default':
Close #11619: The parser and the import machinery do not encode Unicode
http://hg.python.org/cpython/rev/df2fdd42b375
--
resolution: - fixed
status: open - closed
STINNER Victor added the comment:
This issue has been fixed in issue #11619 by:
New changeset df2fdd42b375 by Victor Stinner in branch 'default':
Close #11619: The parser and the import machinery do not encode Unicode
http://hg.python.org/cpython/rev/df2fdd42b375
Thanks for the report!
(I
STINNER Victor added the comment:
This issue has been fixed in issue #11619 by:
New changeset df2fdd42b375 by Victor Stinner in branch 'default':
Close #11619: The parser and the import machinery do not encode Unicode
http://hg.python.org/cpython/rev/df2fdd42b375
Thanks for the report!
(I
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17588
___
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17741
___
___
Python-bugs-list
Rob Bairos added the comment:
Okay, thanks for looking into it.
Cheers
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18812
___
___
Tim Peters added the comment:
By the way, if memory serves, compiling with --with-pydebug changes the memory
layout of Python objects, so a Python compiled this way _cannot_ be used
successfully with extension modules that were compiled without the same
options. Did you rebuild your
Ethan Furman added the comment:
Stefan Behnel wrote:
... I still wonder why I'm the one writing all the patches ...
I imagine for the same reasons that I offered to write Enum: I had definite
ideas about how it should be, it is sometimes easier to explain with working
code than with prose,
Martin Mokrejs added the comment:
Yes, I have rebuilt all python modules but even gdb exited on startup due to
python ABI change. I am using Gentoo Linux
(https://bugs.gentoo.org/show_bug.cgi?id=482348) and unless python-updater
forgot to include some package in the listing of those needed to
Madison May added the comment:
I realize its probably quite early to begin putting a patch together, but
here's some preliminary code for anyone interested. It builds off of the
common task example in the docs and adds in validation for the weights list.
There are a few design decisions I'd
Valerie Lambert added the comment:
I've added a new test that uses fork() and os.abort(), then asserts
os.WCOREDUMP() is false.
However, this test is currently failing. Is my test incorrect, or is this an
issue with SuppressCoreFiles() itself?
If its a problem with the test I'm guessing it
Tim Peters added the comment:
Well, if you delete a giant list, and the list held the only references
remaining to the objects the list contained, then the memory for those objects
will be free'd, one object at a time. A debug build would then detect the
memory corruption in those objects.
Tim Peters added the comment:
Note that the same poster is also reporting memory corruption in issue 18843.
I suggest ignoring this one unless/until the earlier bug is resolved (memory
corruption can easily cause a segfault - or any other kind of error).
--
Eli Bendersky added the comment:
Aaron - could you describe your use case of passing a custom parser into
iterparse? We're currently considering deprecating the feature of passing a
parser into iterparse in a future release (this is being discussed in issue
17741).
--
New submission from SSmith:
python.exe sends its output to stderr instead of stdout.
Writing the following to the command line highlight the issue:
[ in]python.exe --version 1 null #redirects stdout to null
[out]Python 2.7.5
[ in]python.exe --version 2 null #redirects stderr to null
[out]
Phil Webster added the comment:
I've attached my work so far in order to get feedback before I head too far in
the wrong direction. I'm not sure if my addition of mock events and
AutoCompleteWindow is the right way to go and I'm open to any guidance.
--
keywords: +patch
Added file:
1 - 100 of 105 matches
Mail list logo