Xiang Zhang added the comment:
>From my observations, this is due to transport is forgotten to close in
>test_connect_accepted_socket. Upload a patch to add the close function.
--
keywords: +patch
nosy: +xiang.zhang
Added file: http://bugs.python.org/file44139/issue27746
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue27792>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
Thanks for your work too! ;) I agree to close.
--
___
Python tracker
<http://bugs.python.org/issue27558>
___
___
Python-bugs-list m
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue27794>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
David, issue2466_ismount_py2.7_port.patch does the py2.7 port. I also back port
other ismount test cases not existing in py2.7.
--
nosy: +xiang.zhang
Added file: http://bugs.python.org/file44145/issue2466_ismount_py2.7_port.patch
Xiang Zhang added the comment:
Thanks for your reply Mark. But I don't understand your message about the
assertion. There is now no assertion in PyList_New. The changed assertion
statement is in list_ass_subscript. If this confuses you I am quite sorry to
bring in a somewhat unrelated c
Xiang Zhang added the comment:
Just remove it. Regenerate the patch. As for list_resize, I have already fired
another issue27660.
--
Added file: http://bugs.python.org/file44147/List_New_Calloc_v2.patch
___
Python tracker
<http://bugs.python.
Xiang Zhang added the comment:
Yes. update_lines_cols is not always available. We can just treat it like other
methods like resize_term.
Upload a trivial patch to fix this.
--
keywords: +patch
nosy: +xiang.zhang
Added file: http://bugs.python.org/file44155/issue27801.patch
Xiang Zhang added the comment:
Ping.
--
___
Python tracker
<http://bugs.python.org/issue27740>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
> filename is going to be decoded inside of Py_CompileStringExFlags
Actually all I want to express is this, *filename* will be decoded inside. But
now the wording looks to me is that *filename* is already a decoded string when
passed. I don't want to
Xiang Zhang added the comment:
This is the design of getpath.c, when no exec/exec_prefix can be found it will
emit warning and use the default one. Fortunately it gives use the ability to
suppress the warnings. :) Simply set Py_FrozenFlag in _freeze_importlib.c can
solve this problem. Upload
Xiang Zhang added the comment:
Simple reproduction:
>>> pickle.dumps(unittest.loader._make_skipped_test('hello', RuntimeError,
>>> unittest.suite.TestSuite))
Traceback (most recent call last):
File "", line 1, in
_pickle.PicklingError: Can't
Xiang Zhang added the comment:
Ping. :)
--
___
Python tracker
<http://bugs.python.org/issue27692>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
Valgrind can also complain:
valgrind --leak-check=yes --suppressions=Misc/valgrind-python.supp Parser/pgen
./Grammar/Grammar Include/graminit.h Python/graminit.c
==6836== Memcheck, a memory error detector
==6836== Copyright (C) 2002-2015, and GNU GPL'd, by J
Xiang Zhang added the comment:
I think it's okay to close now.
--
___
Python tracker
<http://bugs.python.org/issue16764>
___
___
Python-bugs-list m
Xiang Zhang added the comment:
Thanks for your work too, Nick! :) Active reply from the core devs always gives
me more motivation to open source.
--
___
Python tracker
<http://bugs.python.org/issue27
Xiang Zhang added the comment:
The patch I submitted is about to solve the resource leak in the test suite.
Paul, your problem seems to need other triage.
--
___
Python tracker
<http://bugs.python.org/issue27
Changes by Xiang Zhang :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue27823>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
-1. I don't think this is equal to issue27794. I don't hope when I use `raise
AttributeError`, Python hides some magic and sets a message I totally don't
want. If you do want a good message, why not passing the messa
Xiang Zhang added the comment:
issue27792.patch tries to fix this.
BTW, Mark, do you think the fast path in long_mod is really needed? Actually
the same fast path has already existed in l_divmod.
--
keywords: +patch
Added file: http://bugs.python.org/file44185/issue27792.patch
Xiang Zhang added the comment:
Oh, sorry. I forgot about long_long. Actually I did think for a while to search
for a good function here. :( v2 uses long_long now.
> I agree that the fast paths need looking at; it seems there's a fair bit of
> redundancy there. But not in this is
Xiang Zhang added the comment:
Thanks for your work too. ;) You does the most important change.
--
___
Python tracker
<http://bugs.python.org/issue27792>
___
___
Xiang Zhang added the comment:
Ping.
--
___
Python tracker
<http://bugs.python.org/issue27660>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
Hi Georg, I left several comments on Rietveld. Hope it helps.
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue26
Xiang Zhang added the comment:
One solution I can think of is alter the constructor of property() and add an
optional name attribute to it. If users really care about the exception
message, they can set the attribute to the property's name. If they don't care,
everything remains t
Xiang Zhang added the comment:
v3 applies haypo's suggestion.
--
Added file: http://bugs.python.org/file44192/list_resize_v3.patch
___
Python tracker
<http://bugs.python.org/is
Xiang Zhang added the comment:
issue27683.patch tries to fix this. It alters the doc and refactors the
constructor, so there is no difference between different arguments
As for IPv6Network, it has the same problem.
--
nosy: +xiang.zhang
Added file: http://bugs.python.org/file44193
Changes by Xiang Zhang :
--
components: +Library (Lib)
nosy: +davin
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue27833>
___
___
Python-
Xiang Zhang added the comment:
Oh, sorry. Upload bot_failure_fix.patch to fix this.
--
Added file: http://bugs.python.org/file44207/bot_failure_fix.patch
___
Python tracker
<http://bugs.python.org/issue2
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue27833>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
Ping. :)
--
___
Python tracker
<https://bugs.python.org/issue27414>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
Thanks for the reply berker. It's nice to know this helper. :) But I'd like to
keep it as now since I don't see any real advantage to use it and swap_attr
will set the attribute even when it's absent
Xiang Zhang added the comment:
Guni, the behaviour is not consistent since your code is not that 'right'. You
can not expect a not 'right' snippet to behave correctly. You can do what the
programming guide says:
[1] consuming all items before join
[2] call q.cancel_join_th
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<https://bugs.python.org/issue27860>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
For the first issue, the doc says:
The cursor method accepts a single optional parameter cursorClass. If supplied,
this must be a custom cursor class that extends sqlite3.Cursor.
So I think we should check the type and then raise TypeError.
For the second issue
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<https://bugs.python.org/issue27863>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
I considered that but don't why decide to preserve it. But now that you mention
it, I'll do that later.
--
___
Python tracker
<https://bugs.python.o
Xiang Zhang added the comment:
issue27861_conn_cursor.patch tries to solve the first issue.
--
Added file: https://bugs.python.org/file44228/issue27861_conn_cursor.patch
___
Python tracker
<https://bugs.python.org/issue27
Xiang Zhang added the comment:
issue27861_conn_isolation_level.patch now adds argument type and value check
along with eliminating the potential sf.
--
Added file:
https://bugs.python.org/file44234/issue27861_conn_isolation_level.patch
___
Python
Xiang Zhang added the comment:
Yay, thanks for your work, Martin.
--
___
Python tracker
<https://bugs.python.org/issue27506>
___
___
Python-bugs-list mailin
Xiang Zhang added the comment:
Thanks for the comments, Serhiy and palaviv. I left some questions in reply to
them.
--
___
Python tracker
<https://bugs.python.org/issue27
Xiang Zhang added the comment:
If decide to follow the behaviour of code rather than doc, it's a different
story. issue27861_conn_cursor_v2.patch tries to solve the first issue. It now
preserve the previous behaviour treating factory as a callable not a cursor
type.
--
Added
New submission from Xiang Zhang:
This is a follow up of issue27861 and means to fix the second issue mentioned
in it.
pysqlite_connection_set_isolation_level now does not check allowed values and
when any part fails, it leaves the Connection object in an inconsistent state.
I'll wr
Xiang Zhang added the comment:
Delete by other test cases without restoring? Which is rather impossible to
happen. But I'd like it to stay like now. It is not complex and straight when
reading. I don't want to change it to swap_attr.
--
Xiang Zhang added the comment:
I am not a native speaker so I decide not to trap in the minor part. Could you
just fix the first point if there is no doubt? I'm okay with the second part
staying as now.
--
Added file: https://bugs.python.org/file44242/issue27740.
Xiang Zhang added the comment:
Thanks for the comments Serhiy. v3 now fixs all that.
--
Added file: https://bugs.python.org/file44245/issue27861_conn_cursor_v3.patch
___
Python tracker
<https://bugs.python.org/issue27
Xiang Zhang added the comment:
It's a trivial personal style choice I think. Do what you want if you'd like to
merge it.
--
___
Python tracker
<https://bugs.python.o
Xiang Zhang added the comment:
issue27881.patch tires to solve this. Hope to get feedback.
--
keywords: +patch
Added file: https://bugs.python.org/file44247/issue27881.patch
___
Python tracker
<https://bugs.python.org/issue27
Xiang Zhang added the comment:
Serhiy, I've updated the patch. Looking forward to your feedback.
--
Added file: https://bugs.python.org/file44265/issue27881_v2.patch
___
Python tracker
<https://bugs.python.org/is
Xiang Zhang added the comment:
Leave replies and make a trival change in v3. I don't change the other two just
as I state in the replies. But please do what you like.
--
Added file: https://bugs.python.org/file44266/issue27881_v3.patch
___
P
New submission from Xiang Zhang:
When supplied a custom string with upper returning a non-string,
pysqlite_connection_create_collation will fail assertion and crash. Serhiy, I
think we can use the same way in set_isolation_level to avoid this.
--
components: Library (Lib)
files
Xiang Zhang added the comment:
I think this is a bug.
According to the rfcs, "/" is a reserved character in query component and
continuous "/" in query component may be invalid and how to deal with it
depends on the server. But encoded "/", %2F, acts as data
Xiang Zhang added the comment:
The path with query component are unquoted entirely and then pass into
_url_collapse_path.
I think this behaviour is wrong and according to rfc3875 query component
should be left encoded in QUERY_STRING.
This patch seems to solve the problem. It passes the tests
New submission from Xiang Zhang:
According to rfc3986, section 3.4:
The query component is indicated by the first question
mark ("?") character and terminated by a number sign ("#") character
or by the end of the URI.
The characters slash ("/") and question
Changes by Xiang Zhang <18518281...@126.com>:
--
type: -> behavior
versions: +Python 3.6
___
Python tracker
<http://bugs.python.org/issue25232>
___
___
P
Xiang Zhang added the comment:
I add a testcase but I worry it's not in the right format. Please review it.
Partition is a good choice here.
--
Added file: http://bugs.python.org/file40584/multiple?.patch
___
Python tracker
<http://bugs.py
Xiang Zhang added the comment:
Add the testcase and use str.partition.
--
Added file: http://bugs.python.org/file40585/cgihander.patch
___
Python tracker
<http://bugs.python.org/issue24
Xiang Zhang added the comment:
I don't think this is a bug of Python. You should check your own
application to make sure you are parsing the right XML.
I run your code with the old uri and get the same traceback. The
cause is you are using xml parser to parse a html document which
is
Xiang Zhang added the comment:
>From the specification, void element has no end tag, so I think this
behaviour can not be called incorrect. For void element, only
handle_starttag is called.
And for start tag ends with '/>', actually HTMLParser calls
handle_startendta
Xiang Zhang added the comment:
I can reproduce this action on Ubuntu.
The forged readline.py in python's execution directory can steal the
permission of python and do something dangerous.
--
nosy: +xiang.zhang
___
Python tracker
Xiang Zhang added the comment:
Yes, there seems to still exist some defects not conforming to the
specification. I would like to investigate it. Maybe I can propose
a patch for it.
--
___
Python tracker
<http://bugs.python.org/issue24
Xiang Zhang added the comment:
I think this is a typo. The raise is left out.
In test_smtpd.py, it only tests the raise condition in SMTPServer but
not STMPChannel.
I add the raise and a corresponding test in SMTPDChannelTest.
--
keywords: +patch
nosy: +xiang.zhang
Added file: http
Xiang Zhang added the comment:
This test also fails on Ubuntu.
[1/1] test_builtin
test test_builtin failed -- Traceback (most recent call last):
File "/home/angwer/my-cpython/Lib/test/test_builtin.py", line 1588, in
test_input_no_stdout_fileno
self.assertEqual(status,
Xiang Zhang added the comment:
It's my fault. I forget to recompile. Now it works.
--
___
Python tracker
<http://bugs.python.org/issue24402>
___
___
Pytho
Xiang Zhang added the comment:
I think Mark is right. Since wb+ and rb+ have different behaviours they
should be treat separately.
But this behaviour treating wb+ and rb+ as the same is well tested and
seems to intended to do so.
--
nosy: +xiang.zhang
Changes by Xiang Zhang <18518281...@126.com>:
--
keywords: +patch
Added file: http://bugs.python.org/file40739/file_mode.patch
___
Python tracker
<http://bugs.python.org/i
Xiang Zhang added the comment:
I make a patch which now identifies the difference between wb+ and rb+,
and modifies the corresponding tests. Though I don't know whether this
need to be fixed.
--
___
Python tracker
<http://bugs.python.org/is
Xiang Zhang added the comment:
This is the right behaviour.
x=[1, 2, 3].append([1, 2, 3]) acts as:
x=([1, 2, 3].append([1, 2, 3])
Since append is a in-place operation it return None. Then x is None.
--
nosy: +xiang.zhang
___
Python tracker
New submission from Xiang Zhang:
In the first paragraph of
https://docs.python.org/3/extending/extending.html#intermezzo-errors-and-exceptions,
it is wrong to use the sentence "the second argument to raise" since
the raise syntax has been changed in Python3.
--
assignee: d
Xiang Zhang added the comment:
With this sentence
A second global variable stores the “associated value” of the exception (the
second argument to raise).
I think the phrase inside the parentheses is to explain the "associated value",
which is usually a string passed to the except
Xiang Zhang added the comment:
Oops, I misunderstand sys.exc_info all the time, sad :(
Now, both versions of doc are not correct. Please make them fixed.
--
___
Python tracker
<http://bugs.python.org/issue25
Xiang Zhang added the comment:
I fix my patch with David's comment.
--
Added file: http://bugs.python.org/file40766/doc_extending2.patch
___
Python tracker
<http://bugs.python.org/is
Xiang Zhang added the comment:
Yes, you are right martin. It seems the whole chapter needs more updates, not
only the bits I mentioned. I won't provide a new patch since I am not an
English native and I am not sure I can provide an accurate and right
description. Hope someone else may
Changes by Xiang Zhang <18518281...@126.com>:
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue25390>
___
___
Python-bugs-list
Xiang Zhang added the comment:
Actually what I intend is that the exception object passed to raise is the
exception instance raise finally throws (what is stored in the second
variable). So it seems wise not to do any more for me. A single sentence has
lead to confusion, not to mention more
Xiang Zhang added the comment:
I'm afraid we can't say negative epoch is handled successfully on Linux.
Use $ touch -d "1 Jan 1900" test as a test,
time.gmtime(os.fstat(f.fileno()).st_mtime) gives time.struct_time(tm_year=1899,
tm_mon=12, tm_mday=31, tm_hour=15, tm_min=54
Xiang Zhang added the comment:
You're right. Actually I do think of timezone when I do the experiment. But I
think different timezone will only affect the hour. It turns out I should learn
more about time.
--
___
Python tracker
Xiang Zhang added the comment:
It seems this is a typo. The args should be self.data. And since unicodeobject
doesn't support __rmod__, at least I think we should str(format) or remove
__rmod__ totally. I attach a patch.
--
nosy: +xiang.zhang
Added file: http://bugs.pytho
Xiang Zhang added the comment:
Quite sorry for making some mistakes. unicodeobject does get a __radd__ method.
It is added by addoperators though I cannot see it in PyNumberMethods. Now I
think just fixing the typo is enough.
--
Added file: http://bugs.python.org/file41066
Changes by Xiang Zhang <18518281...@126.com>:
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue25659>
___
___
Python-bugs-list
Xiang Zhang added the comment:
I don't think this is a bug. The HTML5 syntax spec tells:
If an attribute using the unquoted attribute syntax is to be followed by
another attribute or by the optional "/" (U+002F) character allowed in step 6
of the start tag syntax above, the
Xiang Zhang added the comment:
Hmm, can not say the behaviour is right. But since the HTML doesn't follows the
official rule, HTMLParser's behaviour is understandable and can not be
identified as incorrect.
--
___
Python trac
Changes by Xiang Zhang <18518281...@126.com>:
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue26187>
___
___
Python-bugs-list
Xiang Zhang added the comment:
Test your html file and can not get the AssertionError. Seems everything works
fine. Could you please provide more info?
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue26
Xiang Zhang added the comment:
After reading Issue26210, I can get the AssertionError when there is a
self.reset() in handle_endtag. I don't think it's proper to use reset in the
process of parsing. From the samples I find on Web, reset is commonly used to
set extra attributes on
Xiang Zhang added the comment:
reset just set some attributes to the initial states and it does not control
the parsing process. So reading the gohead function, even if reset is called in
handle_endtag and all data are discarded, it is still possible for the process
to move forward
Xiang Zhang added the comment:
Actually it does move forward since in goahead, it first store a "copy" of the
initial self.rawdata and use it to control the flow. If you make some change to
self.rawdata when parsing, for example call reset, goahead can not feel it. But
methods parse
Xiang Zhang added the comment:
Hmm, I don't know whether I am right or not. Let's wait for a core member to
clarify. If I am wrong, I am quite sorry.
I don't think invoking reset when parsing should raise an error(and I don't
know how to achieve that). When to in
Changes by Xiang Zhang <18518281...@126.com>:
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue26255>
___
___
Python-bugs-list
Changes by Xiang Zhang <18518281...@126.com>:
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue26457>
___
___
Python-bugs-list
Xiang Zhang added the comment:
In old ipaddr.py, IPv4Network('192.0.2.0/31').subnet() returns
[IPv4Network('192.0.2.0/32'), IPv4Network('192.0.2.1/32')], but ipaddress
returns only [IPv4Network('192.0.2.0/32')].
It seems simply change end to end+1 in
Xiang Zhang added the comment:
I propose a patch simply add one to end so that the broadcast address network
will appear in the result, which behaves the same as ipaddr.py. Corresponding
tests are added. All tests are passed but I am afraid some logic may break.
--
keywords: +patch
Changes by Xiang Zhang <18518281...@126.com>:
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue26478>
___
___
Python-bugs-list
Xiang Zhang added the comment:
I'd like to ping this channel.
I post a question on
https://groups.google.com/forum/#!topic/comp.lang.python/y8yDAAJJ9Sc to ask if
it is possible to directly get the attribute from AttributeError, which leads
me here.
--
nosy: +xiang.
Xiang Zhang added the comment:
The concerns mentioned by haypo seems to have existed in PEP473.
--
___
Python tracker
<http://bugs.python.org/issue18156>
___
___
Changes by Xiang Zhang :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue26578>
___
___
Python-bugs-list mailing list
Unsubscrib
Xiang Zhang added the comment:
Thanks for your review. Set quote to False when html.escape is OK to me. But
except for the usage in BaseHTTPRequestHandler, I think we should also set
quote to False for the usage in SimpleHTTPRequestHandler since they do not
appear in attribute either. And I
Changes by Xiang Zhang :
--
nosy: +gregory.p.smith, martin.panter
___
Python tracker
<http://bugs.python.org/issue26578>
___
___
Python-bugs-list mailin
Xiang Zhang added the comment:
I add two tests for html escaping. One for the error message and the other for
display name in SimpleHTTPRequesthandler.
--
Added file: http://bugs.python.org/file42204/_quote_html_to_html_escape_v2.patch
___
Python
New submission from Xiang Zhang:
In http.server, _quote_html is used to escape content for BaseHTTPServer. The
function has already been implemented by html.escape.
--
components: Library (Lib)
files: _quote_html_to_html_escape.patch
keywords: patch
messages: 261943
nosy: xiang.zhang
1101 - 1200 of 1629 matches
Mail list logo