Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue12381>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue10376>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue12170>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Xuanji Li added the comment:
Updated previous patch with test cases and renamed exit_on_argument_error flag
to exit_on_error.
--
Added file: http://bugs.python.org/file22172/issue9938_with_test.patch
___
Python tracker
<http://bugs.python.
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue9723>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue11874>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue11588>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue3451>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Xuanji Li added the comment:
I don't think it's best to create a new subclass to throw an ArgumentParserExit
exception; if I read the stack trace I'd see that an ArgumentError was thrown,
then caught, then an ArgumentParserExit was thrown, which IMHO is confusing. In
the
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue5723>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue11872>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue5115>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue11837>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Xuanji Li added the comment:
Hi, can someone look at the patch? There doesn't seem to be any objections to
it and it'll solve a long-standing issue.
Thanks!
--
___
Python tracker
<http://bugs.python.o
Xuanji Li added the comment:
the correct way is to provide a __getstate__ method for socket right? I have
implemented that in the attached patch.
--
keywords: +patch
nosy: +xuanji
Added file: http://bugs.python.org/file20803/issue11127.patch
Xuanji Li added the comment:
Is this issue from 2 years ago still open? I checked the docs and it seems to
be.
If it is, I would like to work on a patch and submit it soon.
--
___
Python tracker
<http://bugs.python.org/issue5
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue5231>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
New submission from Xuanji Li :
The documentation for zipfile describes ZipFile.comment as "The comment text
associated with the ZIP file." From reading this I expect that setting it to a
string is ok; however ZipFile.comment must actually be set to bytes (or a
bytes-like object
Xuanji Li added the comment:
I've attached a patch copying rep's patch from issue 10298, as i think it is
cleaner (but it seems to do the same thing as kevin's patch) together with 2
test cases.
David Murray: I'm not really sure what you mean by "test comments w
Xuanji Li added the comment:
Yes, I think we should close it.
--
___
Python tracker
<http://bugs.python.org/issue3243>
___
___
Python-bugs-list mailing list
Unsub
Xuanji Li added the comment:
fwiw I've always found this helpful for undefined behavior:
http://blog.regehr.org/archives/213 and, just as it says "x+1 > x" will be
optimized to a nop, by the same logic "v >= &array[0] && v < &array
Xuanji Li added the comment:
Ok, new patch that creates a zipfile (actually I used TESTFN2, all the other
tests seem to also use it)
--
Added file: http://bugs.python.org/file20200/Issue10694_2.diff
___
Python tracker
<http://bugs.python.
Xuanji Li added the comment:
Sorry, forgot to add: README.zip should have a \r\n at the end. Actually I just
zipped up README, ran echo "\r\n" >> README.zip and put it in Lib/test.
--
___
Python tracker
<http://bugs.py
Xuanji Li added the comment:
Hi KevinH, sorry if I gave the wrong impression that you must submit a patch
before anyone will look at the bug. I thought you wanted to provide a patch for
this. If you only want to report a bug that is ok, thanks for that.
I have confirmed your bug on the py3k
Xuanji Li added the comment:
Hi, it seems to me that section 4.6.5. Bytes and Byte Array Methods covers this
already. It says:
Bytes and bytearray objects, being “strings of bytes”, have all methods found
on strings, with the exception of encode(), format() and isidentifier(), which
do not
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue10702>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue9938>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Changes by Xuanji Li :
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue10680>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Xuanji Li added the comment:
Also, I am not familiar with the backward-comparability requirements of py3k,
but orsenthil's patch will break py3k code that relies on data being a string,
shouldn't this be mentioned somewhere?
Finally, I do not understand why my proposed change, w
Xuanji Li added the comment:
Also, the patch for request.py contains a debug statement, print(data)
--
___
Python tracker
<http://bugs.python.org/issue3
Xuanji Li added the comment:
Hello, sorry for commenting on a closed issue... but I think the documentation
change is incorrect. In urllib.request.rst, it says data is a string. However
as seen in the changes to test_urllib2.py, data must be a bytes object rather
than a string object. I
Xuanji Li added the comment:
Hi, is there any legacy code that would rely on "port" being stored as a string
rather than an integer?
--
___
Python tracker
<http://bugs.python.o
Xuanji Li added the comment:
Hi, I would like to take a look at whether your code works, can you provide an
zip file that is currently not read by zipfile but should be?
Also, I suggest you submit the code changes as a patch
(http://www.python.org/dev/patches/)
thanks!
--
nosy
Xuanji Li added the comment:
Alternatively, I think we can do a conversion to int in Telnet.__init__ (see
patch)
--
keywords: +patch
nosy: +xuanji
Added file: http://bugs.python.org/file20035/issue10695.patch
___
Python tracker
<h
Xuanji Li added the comment:
Sorry, I'm giving up.
The copyright notice for bz2module.c lists "Gustavo Niemeyer" as one of the
holders, is he the maintainer? Maybe he should be notified of this bug.
--
___
Python tracker
<http
Xuanji Li added the comment:
I'll try working on a patch.
--
nosy: +xuanji
___
Python tracker
<http://bugs.python.org/issue5863>
___
___
Python-bugs-list m
Xuanji Li added the comment:
eric: sorry, that has been fixed in issue_3243_py3k_7.patch
--
___
Python tracker
<http://bugs.python.org/issue3243>
___
___
Pytho
Xuanji Li added the comment:
thought of a better way, we can check if data is true; this will cover "" and
b"". this is in issue_3243_py3k_7.patch
--
Added file: http://bugs.python.org/file19902/issue_3243_py3k_7.patch
___
P
Xuanji Li added the comment:
Actually I don't think you can go around changing test_urllib2.py, they are
after all regression tests... and surely some users will send "" as data.
My patch handles the case of 0-length data specially, removing the need for 2)
Can call len
Xuanji Li added the comment:
And my version too...
--
Added file: http://bugs.python.org/file19901/issue_3243_py3k_6.patch
___
Python tracker
<http://bugs.python.org/issue3
Xuanji Li added the comment:
> > 2) Can call len but not buffer: assume len == #bytes
> Why do you need it at all?
Hmm, I'm looking at the the tests in urllib2 that fail if we omit this... in
test_urllib2 there are tests that do this:
req = Request("http://example.co
Changes by Xuanji Li :
Removed file: http://bugs.python.org/file19892/issue_3243_py3k_5.patch
___
Python tracker
<http://bugs.python.org/issue3243>
___
___
Python-bug
Xuanji Li added the comment:
attaching new patch. this implements the memoryview solution suggested by
pitrou. but it does contain this thing:
if not request.has_header('Content-length'):
if (not hasattr(data, '__read__') and
isinstance(data, collections.Itera
Xuanji Li added the comment:
attaching new patch. this implements the memoryview solution suggested by
pitrou. but it does contain this thing:
if not request.has_header('Content-length'):
if (not hasattr(data, '__read__') and
isinstance(data, collections.Itera
Xuanji Li added the comment:
orsenthil: Hi, i don't quite understand why iter() needs to be called
explicitly on data? As I understand it, if data is an iterable then you can use
a for loop on it directly.
--
___
Python tracker
Xuanji Li 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)
else
Xuanji Li 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
iterab
Xuanji Li 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
Xuanji Li added the comment:
bumping...can someone review this? The reported bug seems valid enough.
--
___
Python tracker
<http://bugs.python.org/issue10
Xuanji Li 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
Xuanji Li added the comment:
pitrou: that sounds good. I attached another patch.
--
Added file: http://bugs.python.org/file19879/issue_3243_py3k_3.patch
___
Python tracker
<http://bugs.python.org/issue3
Xuanji Li added the comment:
Changed according to Raymond's suggestion. I realized that there are some
classes (str, bytes, array.array) that are iterable but should not be handled
by the iteration logic provided by catlee. eg: if we iterate through b'a
message' we'd get
Xuanji Li added the comment:
What a timely coincidence. I'll try out the change soon.
--
___
Python tracker
<http://bugs.python.org/issue3243>
___
___
Pytho
Xuanji Li added the comment:
Hi Raymond, I assume you're referring to catlee's patch? 'str' has been changed
to 'data' in python 3.2
While porting the patch I ran into this issue, which is that isinstance(str,
collections.Iterable) doesn't be
Xuanji Li added the comment:
Hi, attached is a ported version of the patch that applies against py3k.
--
nosy: +xuanji
Added file: http://bugs.python.org/file19852/issue_3243_py3k.diff
___
Python tracker
<http://bugs.python.org/issue3
Xuanji Li added the comment:
I tried running bug.c using the svn head of python and got this:
Could not find platform independent libraries
Could not find platform dependent libraries
Consider setting $PYTHONHOME to [:]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
Xuanji Li added the comment:
That's good if it's so... can you explain why list_clear doesn't guarantee that
the list is empty? Why would XDECREF populate the list? I don't quite
understand it.
eli: are you writing a patch for this?
--
__
Xuanji Li added the comment:
Hi, I'm also looking at listobject.c also... if we want list.clear() to behave
exactly like del list[], we may be able to just call list_ass_slice on the
list. Similarly for list.copy which should behave like a=l[:]
--
nosy: +x
Xuanji Li added the comment:
The patch attached (issue_10464_fix) moves handling of the '#' character from
shlex to netrc, and makes netrc consider as comments lines whose first
not-whitespace character is '#' instead of all text following '#' (which is
what sh
Xuanji Li added the comment:
Hi eric, what doc change are you referring to?
--
status: pending -> open
___
Python tracker
<http://bugs.python.org/issu
Xuanji Li added the comment:
The issue seems to be that when shlex (the lexer that netrc uses) sees a '#'
character it thinks that the rest of the line is a comment. I am not sure what
the behavior of netrc should be - should it treat '#' as beginning a comment
only
Xuanji Li added the comment:
Sorry, patch had a mistake
--
Added file: http://bugs.python.org/file19666/issue_10231_testcase.diff
___
Python tracker
<http://bugs.python.org/issue10
Changes by Xuanji Li :
Removed file: http://bugs.python.org/file19658/issue_10464_testcase.diff
___
Python tracker
<http://bugs.python.org/issue10464>
___
___
Python-bug
Xuanji Li added the comment:
Included test case for the reported bug. Test fails on my machine. Also split
up test_case_1 (in order to put in the new test case cleanly)
--
keywords: +patch
nosy: +xuanji
Added file: http://bugs.python.org/file19658/issue_10464_testcase.diff
Xuanji Li added the comment:
Attached a patch to implement the suggested changes on 3.2. If the patch is ok
I can do the same for 3.1.
--
keywords: +patch
nosy: +xuanji
Added file:
http://bugs.python.org/file19591/issue10366_remove_unneeded_object_py3.2.diff
65 matches
Mail list logo