Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12381
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12170
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10376
___
___
Python-bugs-list mailing list
Xuanji Li xua...@gmail.com 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 rep
Xuanji Li xua...@gmail.com 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
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3451
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11588
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11874
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9723
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11837
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5115
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11872
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5723
___
___
Python-bugs-list mailing list
Xuanji Li xua...@gmail.com 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 rep...@bugs.python.org
http://bugs.python.org
Xuanji Li xua...@gmail.com 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
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5231
___
___
Python-bugs-list mailing list
Xuanji Li xua...@gmail.com 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 rep...@bugs.python.org
http
Xuanji Li xua...@gmail.com 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 with trailing
New submission from Xuanji Li xua...@gmail.com:
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 xua...@gmail.com added the comment:
Yes, I think we should close it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Xuanji Li xua...@gmail.com 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 rep
Xuanji Li xua...@gmail.com 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[array_len]
will also be optimized to a nop
Xuanji Li xua...@gmail.com 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
Xuanji Li xua...@gmail.com 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 rep...@bugs.python.org
http
Xuanji Li xua...@gmail.com 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
Xuanji Li xua...@gmail.com added the comment:
Also, the patch for request.py contains a debug statement, print(data)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Xuanji Li xua...@gmail.com 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
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10680
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9938
___
___
Python-bugs-list mailing list
Changes by Xuanji Li xua...@gmail.com:
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10702
___
___
Python-bugs-list mailing list
Xuanji Li xua...@gmail.com 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
Xuanji Li xua...@gmail.com 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 rep
Xuanji Li xua...@gmail.com 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 rep
Xuanji Li xua...@gmail.com 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
Xuanji Li xua...@gmail.com 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 rep...@bugs.python.org
http://bugs.python.org/issue10695
Xuanji Li xua...@gmail.com added the comment:
I'll try working on a patch.
--
nosy: +xuanji
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5863
Xuanji Li xua...@gmail.com added the comment:
eric: sorry, that has been fixed in issue_3243_py3k_7.patch
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Xuanji Li xua...@gmail.com 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 rep
Xuanji Li xua...@gmail.com 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.Iterable
Xuanji Li xua...@gmail.com 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.Iterable
Changes by Xuanji Li xua...@gmail.com:
Removed file: http://bugs.python.org/file19892/issue_3243_py3k_5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Xuanji Li xua...@gmail.com 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.com
Xuanji Li xua...@gmail.com added the comment:
And my version too...
--
Added file: http://bugs.python.org/file19901/issue_3243_py3k_6.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Xuanji Li xua...@gmail.com 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
___
Python
Xuanji Li xua...@gmail.com 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
exceptions were
Xuanji Li xua...@gmail.com added the comment:
bumping...can someone review this? The reported bug seems valid enough.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10464
Xuanji Li xua...@gmail.com 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
len(data
Xuanji Li xua...@gmail.com 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
iterable body but we
Xuanji Li xua...@gmail.com 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
Xuanji Li xua...@gmail.com added the comment:
What a timely coincidence. I'll try out the change soon.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Xuanji Li xua...@gmail.com 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 xua...@gmail.com 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 rep...@bugs.python.org
http://bugs.python.org/issue3243
Xuanji Li xua...@gmail.com added the comment:
I tried running bug.c using the svn head of python and got this:
Could not find platform independent libraries prefix
Could not find platform dependent libraries exec_prefix
Consider setting $PYTHONHOME to prefix[:exec_prefix]
Fatal Python error
Xuanji Li xua...@gmail.com 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 rep...@bugs.python.org
http
Xuanji Li xua...@gmail.com 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 behave exactly like hasattr(str
Xuanji Li xua...@gmail.com 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: +xuanji
Xuanji Li xua...@gmail.com 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
Xuanji Li xua...@gmail.com 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 shlex does
Xuanji Li xua...@gmail.com added the comment:
Hi eric, what doc change are you referring to?
--
status: pending - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10366
Xuanji Li xua...@gmail.com 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
Changes by Xuanji Li xua...@gmail.com:
Removed file: http://bugs.python.org/file19658/issue_10464_testcase.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10464
Xuanji Li xua...@gmail.com added the comment:
Sorry, patch had a mistake
--
Added file: http://bugs.python.org/file19666/issue_10231_testcase.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10464
Xuanji Li xua...@gmail.com 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 if its
Xuanji Li xua...@gmail.com 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
64 matches
Mail list logo