Serhiy Storchaka added the comment:
Can you please provide an example of data for which the tostring method fails?
I can't reproduce this on simple data.
import xml.etree.ElementTree as ET
ET.tostring(ET.XML('rootbq/bwerty/root'), method='text',
encoding='unicode')
'qwerty'
--
Changes by Hynek Schlawack h...@ox.cx:
--
title: symlinks incorrectly resolved on Linux - symlinks incorrectly resolved
on POSIX platforms
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6975
Serhiy Storchaka added the comment:
I found such example. It happens when the data contains XML entity.
ET.tostring(ET.XML('rootaamp;/root'), method='text',
encoding='unicode')
Traceback (most recent call last):
File stdin, line 1, in module
File
Olof Johansson added the comment:
Thank you for you feedback. I agree, the reason I wanted this was because of a
corner case, but otoh, the username:password syntax is the real corner case
imho. Of course, I understand that this must be supported for backwards
compatability.
(For fully RFC
Frank added the comment:
It happens whenever the method is called, regardless of input. I'm using HTML
that has been tidied first with HTML entities (if any) converted to unicode
values.
--
___
Python tracker rep...@bugs.python.org
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16912
___
___
Frank added the comment:
Scratch that, it happens whenever there are XML entities (lt;, quot; and
friends) that are appearing the text as you pointed out.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16913
Serhiy Storchaka added the comment:
Here is a patch for 3.3+. 2.7 and 3.2 are not affected.
--
keywords: +patch
stage: needs patch - patch review
versions: +Python 3.4
Added file: http://bugs.python.org/file28666/etree_itertext.patch
___
Python
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15948
___
___
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16894
___
___
Amaury Forgeot d'Arc added the comment:
In _ctypes.c there are (only!) two occurrences of the long type... both are
related to ctypes arrays and look suspect.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16865
New submission from gac:
I had cause to use smtplib to help me pinpoint why some outgoing mail was
failing, but found that while it offered verbose logging (via debuglevel 1)
this was without timestamps, making it difficult to make my case to the server
operator that it was a server-side
Marek Šuppa added the comment:
So what do you think should be done here?
Just removing the or --repository= part?
--
nosy: +mrshu
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16874
___
Berker Peksag added the comment:
I think the problem is the usage of `:option:`.
|:option:`--repository=url` or :option:`--repository=section`| should be
written like |:option:`--repository=*url*` or :option:`--repository=*section*`|
See:
-
Andrew Svetlov added the comment:
It's not a typo.
1. LoadError is inherited from OSError so LoadError exception is also caught.
2. Pointed code just resets cookie state and reraises exception, exception type
is saved.
The code is correct from my perspective.
--
Andrew Svetlov added the comment:
Eric, if you want to keep distutils2 issues on the tracker for a while — I'm ok
with that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13198
___
New submission from Antoon Pardon:
The documentation of socket.makefile states that its arguments are interpreted
the same way as by the built-in open() function. However the mode argument of
socket.makefile only allows 'r', 'w' and 'b'.
That some options are not allowed seems perfectly
Roundup Robot added the comment:
New changeset 8d6dadfecf22 by Eli Bendersky in branch '3.3':
Issue #16076: make _elementtree.Element pickle-able in a way that is compatible
http://hg.python.org/cpython/rev/8d6dadfecf22
New changeset 4c268b7c86e6 by Eli Bendersky in branch 'default':
Issue
New submission from Dražen Lučanin:
When running this script:
things = ['a', 'b']
things.append('c'
for a in things:
print a
I get the following output:
$ python script.py
File script.py, line 3
for a in things:
^
SyntaxError: invalid syntax
the SyntaxError is
New submission from Marco Buttu:
The PEP 3132 said:
... if seq is a slicable sequence, all the following assignments are equivalent
if seq has at least three elements:
a, b, c = seq[0], seq[1:-1], seq[-1]
a, *b, c = seq
[a, *b, c] = seq
But this doesn't happen for byte strings:
seq =
Eli Bendersky added the comment:
Fixed in 3.3 and default. Thanks for the good work, Daniel. A separate issue
can be opened for TreeBuilder.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker
Changes by Dražen Lučanin kermit...@gmail.com:
--
type: compile error - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16917
___
___
Ezio Melotti added the comment:
The colon is the first invalid char, for example this is valid python and works:
things = ['a', 'b']
things.append('c'
... for a in things)
things
['a', 'b', generator object genexpr at 0xb76dacfc]
In your case Python expects a genexp like things.append('c'
Mark Dickinson added the comment:
The error is in a missing parenthesis after the append call
Well, that's one *possible* cause of the error. But fixing that missing
parenthesis isn't the only way to make the code correct, and Python doesn't
have any reasonable way to guess which of the
Roundup Robot added the comment:
New changeset d965ff47cf94 by Eli Bendersky in branch '3.3':
Issue #16913: Fix Element.itertext()'s handling of text with XML entities.
http://hg.python.org/cpython/rev/d965ff47cf94
New changeset 9ab8632e7213 by Eli Bendersky in branch 'default':
Issue #16913:
Eli Bendersky added the comment:
Fixed. Thanks.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16913
___
Roundup Robot added the comment:
New changeset c46054b49b6c by Eli Bendersky in branch '3.3':
Update Misc/NEWS for issue #16076
http://hg.python.org/cpython/rev/c46054b49b6c
--
___
Python tracker rep...@bugs.python.org
Walter Dörwald added the comment:
I'd like to have this feature too. However the code should use
d if d is not None else {}
instead of
d or {}
For example I might want to use a subclass of dict (lowerdict) that converts
all keys to lowercase. When I use an empty lowerdict in
Eli Bendersky added the comment:
Attaching an alternative patch, that goes one (little) step further. Instead of
repeating the ignored list all over the place (code, docstrings, ReST docs),
the module exposes DEFAULT_IGNORES so everything can refer to it.
Also added some tests for this
Eli Bendersky added the comment:
Ariel, are you interested in pursuing this issue?
Serhiy, I see you assigned this to yourself - would you like to submit a patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14377
Serhiy Storchaka added the comment:
For better syntax error messages see issue1634034.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16917
___
Dražen Lučanin added the comment:
Yes, sure, I agree with both comments. Fors are a bit disambiguous in
this context in comparison to while loops. But something in the style
of Ezio's explanation might come in handy in the error output.
e.g.
SyntaxError: invalid syntax. , or ) expected in the
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16509
___
___
Ezio Melotti added the comment:
This would all be a bit simpler if an indent was obligatory after
inserting a newline in the middle of a command.
This is not such a bad idea, but it is not backward-compatible and it would be
inconsistent with how parentheses works in other situations.
R. David Murray added the comment:
For the record, this is a regression introduced by the fix for issue 9750. I
plan to commit the fix shortly, thanks for the report and patch.
--
nosy: +r.david.murray
stage: - commit review
type: crash - behavior
versions: +Python 2.7, Python 3.3,
R. David Murray added the comment:
For the record, this patch also introduced another regression (issue 15545).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9750
___
Barry A. Warsaw added the comment:
Note that this change is causing problems with genshi due to API backward
incompatibility. This is reported here:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1097783
The reason the user found it in Ubuntu first is that we track hg tip, but I've
Barry A. Warsaw added the comment:
Nosied Benjamin since this is a release issue. Re-opened, assigned to him, and
release blocked for 2.7.4.
--
assignee: - benjamin.peterson
nosy: +georg.brandl, larry
priority: normal - release blocker
status: closed - open
Roundup Robot added the comment:
New changeset 2cdb599172ab by R David Murray in branch '3.2':
#15545: fix sqlite3.iterdump regression on unsortable row_factory objects.
http://hg.python.org/cpython/rev/2cdb599172ab
New changeset 6a85894c428f by R David Murray in branch '3.3':
merge #15545: fix
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10182
___
___
Vinay Sajip added the comment:
d if d is not None else {}
Your intention makes sense, though I would prefer to write it as:
if d is None:
d = {}
return self.__class__(d, *self.maps)
--
___
Python tracker rep...@bugs.python.org
Andrew Svetlov added the comment:
Thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset 2cdb599172ab by R David Murray in branch '3.2':
#15545: fix sqlite3.iterdump regression on unsortable row_factory objects.
http://hg.python.org/cpython/rev/2cdb599172ab
New changeset 6a85894c428f by R David Murray in branch '3.3':
merge #15545: fix
Benjamin Peterson added the comment:
Actually, 2.7 should just use PyInt_FromSsize_t, which only promotes when
needed.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10182
___
R. David Murray added the comment:
Peter, I see you've made contributions before, but you don't show as having a
contributor agreement on file according to the tracker. Have you sent one in?
If not, would you, please?
Thanks again for the fix.
--
components: +Library (Lib) -None
Roundup Robot added the comment:
New changeset 0f5067d9e1d8 by Benjamin Peterson in branch '2.7':
use PyInt_FromSsize_t instead of PyLong_FromSsize_t (#10182)
http://hg.python.org/cpython/rev/0f5067d9e1d8
--
___
Python tracker rep...@bugs.python.org
Benjamin Peterson added the comment:
It's good you were able to report this before we released anything.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10182
___
New submission from Zachary Ware:
Here's the fix for test_codecs.py, I believe. I had a few headaches trying to
get this patch created without changing some of the characters or adding a BOM
to the file, and at one point the test was failing for no apparent reason.
This version of the patch
Changes by R. David Murray rdmur...@bitdance.com:
--
components: +email
nosy: +barry, r.david.murray
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16914
___
New submission from Zachary Ware:
Here's a fix for test_crypt.py, inspired by Ezio's mention of using setUpModule
in issue 16905.
I can't test this on a platform that actually has _crypt at the moment, but I
should be able to later today if nobody else has before then. Some tinkering
has
Serhiy Storchaka added the comment:
Patch rewritten using recursion. Non-recursive version is not stack limited
(and a little faster), but recursive version is perhaps more understandable.
Some comments added.
--
Added file: http://bugs.python.org/file28672/posix_realpath_2.patch
Serhiy Storchaka added the comment:
dict(a = i for i in range(10))
+SyntaxError: invalid syntax - ')' expected
The () are ok, the message is misleading.
dict(a = i) is valid syntax, the compiler expects ) instead of invalid
for.
'name' here is a bit vague.
The compiler
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: - ezio.melotti
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16919
___
Serhiy Storchaka added the comment:
Serhiy, I see you assigned this to yourself - would you like to submit a
patch?
Not right now. This is low priority for me too. But I want to see this feature
in 3.4.
--
___
Python tracker
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: - ezio.melotti
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16918
___
Ezio Melotti added the comment:
I'm not saying that these errors are wrong -- just that they are misleading
(i.e. they might lead the user on the wrong path, and make finding the actual
problem more difficult).
It should be noted that the examples I pasted don't include a full traceback
New submission from John Brearley:
Using a multiprocessing.connection listener, I can accept an incoming socket
OK, but when I do conn.recv(), I get memory error. The attached script
mpl_bug.py will readily reproduce the issues on WinXP WinVista, see sample
output below:
pre
c:\python
Changes by John Brearley brear...@magma.ca:
--
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16920
___
___
Python-bugs-list
New submission from Torsten Landschoff:
The documentation of CREATE_NEW_CONSOLE at
http://docs.python.org/3/library/subprocess.html#subprocess.CREATE_NEW_CONSOLE
states:
This flag is always set when Popen is created with shell=True.
This does not fit the code which does
if
John Brearley added the comment:
In V3.2.2.3, the conn.accept() was failing to resolve the socket address.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16920
___
New submission from Serhiy Storchaka:
import xml.etree.cElementTree as ET
ET.XML('rootempty //root').findtext('empty')
b''
--
components: XML
files: etree_finditer_empty.patch
keywords: patch
messages: 179580
nosy: eli.bendersky, serhiy.storchaka
priority: normal
severity: normal
Serhiy Storchaka added the comment:
I see yet one possible bug, using PyBytes_FromString() in list_join() on 3.2.
But I can't demonstrate an example.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16922
brian-cameron-oracle added the comment:
Since Modules/ossaudiodev.c has the following line (which is not surrounded by
any conditional #ifdef sort of things):
#include sys/soundcard.h
This means that the OSS plugin will only build on a system that has this header
file, so it is safe to check
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8145
___
___
R. David Murray added the comment:
I believe that the complete list of test files still located outside of
Lib/test are:
tkinter/test
distutils/tests
ctypes/tests
lib2to3/tests
sqlite3/test
unittest/test
That last is somewhat ironic since Michael opened the issue :).
I'm
Serhiy Storchaka added the comment:
Some general notes. Nitpick: check foo() 0 is more used than foo() == 0. An
exception raised after failed close() can hide original exception raised
before. I left more specific comments on Rietveld.
Only a small part of the proposed changes may be
Guido van Rossum added the comment:
I am sticking with my opinion from before: the code should be fixed. It
doesn't look like assignment to me.
I am fine with making this a feature only fixed in 3.4. (You can even fix
the docs in 3.3 as long as you fix them back for 3.4.)
Minor note for
Marek Šuppa added the comment:
Thanks for the review.
Do you think I should split it into multiple patches to make it easier to look
through?
It might be that some changes are completely wrong. This is the first time I
did something with cpython core code.
--
R. David Murray added the comment:
Talked to Michael in IRC. He isn't particularly in favor of the move of the
unittest tests, but doesn't object if someone else wants to do it. So,
unassigning the issue from him.
--
assignee: michael.foord -
Alexander Belopolsky added the comment:
ctypes/tests is within my area of interests and may prove to be one of the
harder pieces. I'll try to move it and report the results. I have not worked
with the rest, so unless it is truly trivial this will have to wait for another
volunteer.
Benjamin Peterson added the comment:
I honestly don't see the point of moving tests around.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10572
___
Antoine Pitrou added the comment:
Indeed, SSLSocket.__del__ doesn't seem to have a point.
--
nosy: +pitrou
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16900
___
Frank Wierzbicki added the comment:
Switched to unittest style away from doctests and created patch against 3.3.
Note that at this time test_dictcomp.py is identical in 3.3 and 3.4 so merging
should be pretty easy :)
--
Added file: http://bugs.python.org/file28676/dictcomp3.3.patch
Frank Wierzbicki added the comment:
This patch of test_dict_comp.py was made against 2.7. It differs from the 3.3
version only one line from test import test_support as support
--
Added file: http://bugs.python.org/file28677/dictcomp2.7.patch
___
New submission from Benjamin Peterson:
Now #16900 is fixed, we get gunk like this:
$ ./python -Wall Lib/test/regrtest.py -uall test_ssl
[1/1] test_ssl
/home/benjamin/dev/python/3.3/Lib/unittest/case.py:385: ResourceWarning:
unclosed ssl.SSLSocket object, fd=6, family=2, type=1, proto=0
Roundup Robot added the comment:
New changeset c8105251cc1f by Benjamin Peterson in branch '3.3':
remove __del__ because it's evil and also prevents the ResourceWarning on the
socket from happening (closes #16900)
http://hg.python.org/cpython/rev/c8105251cc1f
New changeset e23d51f17cce by
Serhiy Storchaka added the comment:
Well, here is a patch which add short_empty_elements flag (as for XMLGenerator)
to write(), tostring() and tostringlist() methods of ElementTree.
--
stage: needs patch - patch review
___
Python tracker
Brett Cannon added the comment:
Two reasons for collecting all of the tests in a single location:
1) Facilitates test discovery
2) It makes packaging of CPython easier for Linux distros that prefer to leave
the tests out of the core package
--
___
Serhiy Storchaka added the comment:
Oh, I forgot press Push All My Drafts button.
Actually only patch for _cursesmodule.c looks safe at first glance (but curses
maintainer can decide better). You can split the patch on several patches, but
be very careful. You should research the entire
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file28678/etree_short_empty_elements.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14377
___
Marek Šuppa added the comment:
That is probably right.
I was way too foolish to start with this but won't stop now.
I'll try to iterate on your feedback.
Thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15948
py.user added the comment:
Andrew Svetlov wrote:
LoadError is inherited from OSError
the comment for the function doesn't tell it
today it's inherited from OSError and tomorrow it may inherit from ANYError
--
___
Python tracker
Sven Brauch added the comment:
Here's another version now which I think could be used like this. All tests
have been adjusted. I'll append two patches, one just containing the changes to
the parser for ease of review, and one full diff which also contains changes to
the generated files and
Sven Brauch added the comment:
Attached is the full diff this time.
--
Added file: http://bugs.python.org/file28680/full.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16795
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16923
___
___
Python-bugs-list mailing
STINNER Victor added the comment:
./Python/traceback.c:write(fd, c, 1);
./Python/traceback.c:write(fd, \, 1);
./Python/traceback.c:write(fd, \, 1);
./Python/traceback.c:write(fd, \n, 1);
./Python/traceback.c:write(fd, \n, 1);
Oh, I wrote these ones.
STINNER Victor added the comment:
diff -r 0acc5626a578 Modules/faulthandler.c
@@ -445,7 +445,10 @@
-write(thread.fd, thread.header, thread.header_len);
+if (write(thread.fd, thread.header, thread.header_len) == -1) {
+PyErr_SetFromErrno(PyExc_IOError);
+
Sven Brauch added the comment:
The patch review tool currently throws errors on submitting any form
(http://pastie.org/pastes/5665048/text) so please forgive me for answering here
once more. I'll copy this information (patch + message) to the review as soon
as the website is working again.
Benjamin Peterson added the comment:
Could you post an example of the error, please?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16795
___
Sven Brauch added the comment:
The above post has an example for trying to add a patch, here's what happens
when I try to post a reply: http://pastie.org/pastes/5665144/text
I also tried with another web browser, so it's unlikely that it's the browser's
fault (but maybe the user's? ;)
Benjamin Peterson added the comment:
Ah, sorry, I was talking about the failure of optional arguments.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16795
___
Sven Brauch added the comment:
Ah, whops, I misunderstood that.
The error is rather generic:
Traceback (most recent call last):
File ./Lib/test/test_ast.py, line 796, in test_lambda
self._check_arguments(fac, self.expr)
File ./Lib/test/test_ast.py, line 596, in _check_arguments
Vladimir Rutsky added the comment:
Yes, I managed to pass and operate with matrices of complex numbers to pure C
and Fortran programs by using Numpy and their ctype adapters (only for whole
matrices, they don't provide c_complex type; in general see
http://www.scipy.org/Cookbook/Ctypes for
Richard Oudkerk added the comment:
Why are you connecting to a multiprocessing listener with a raw socket? You
should be using multiprocessing.connection.Client to create a client connection.
Connection.send(obj) writes a 32 bit unsigned int (in network order) to the
socket representing the
Roundup Robot added the comment:
New changeset b8b26feb3e1a by R David Murray in branch '3.2':
#13934: document sqlite version strings, use correct one in test.
http://hg.python.org/cpython/rev/b8b26feb3e1a
New changeset cdf9142a0c84 by R David Murray in branch '3.3':
merge #13934: document
R. David Murray added the comment:
These patches are small enough a contributor agreement is not required, but it
would still be great if you would submit one, poq.
--
nosy: +r.david.murray
stage: patch review - committed/rejected
status: open - closed
New submission from Justin Eittreim:
When running multiple nested loops (to emulate the circumstances of a program
running multiple different modules at once,) each with their own try: except:
block (in this case for KeyboardInterrupt,) the order of operations seems to
fall out of place. As
Roundup Robot added the comment:
New changeset 2a417ad8bfbf by R David Murray in branch '2.7':
#15109: revert '%'-'format' changes in 4b105d328fe7 to fix regression.
http://hg.python.org/cpython/rev/2a417ad8bfbf
--
nosy: +python-dev
___
Python
Changes by R. David Murray rdmur...@bitdance.com:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15109
Todd Rovito added the comment:
I think getting this issue fixed makes sense, it would save time and remove
duplication.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16893
___
1 - 100 of 133 matches
Mail list logo