Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue27713>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
I write a patch for this trivial fix along with a corresponding test. Hope it
helps. :)
--
keywords: +patch
Added file: http://bugs.python.org/file44112/issue27414.patch
___
Python tracker
<http://bugs.python.
Xiang Zhang added the comment:
Oops! I am on the way regenerating the CA output to catch up with hg tip, but
after a meeting you have done it.
Thanks for your work, Serhiy. And excellent job as for issue27574.
--
___
Python tracker
<h
Xiang Zhang added the comment:
If you don't want to manually parse it, the lib has to. Currently, bz2
delegates all the raw data parsing (compression/decompression) to the
underlying C library. Unfortunately the bzip2 library doesn't expose the header
info which means to get compres
Xiang Zhang added the comment:
> It can be more efficient is make bytes.__repr__ accepting not only bytes, but
> objects supporting the buffer protocol.
I like this idea. v2 implements this.
--
Added file: http://bugs.python.org/file44119/bytearray_repr_v2
Xiang Zhang added the comment:
We don't have to change Lib/test/test_capi.py. It has already got a repeated
init and fini test[1]. All we need to do is increase the loop number[2]. I have
tried with 15, the test case fails reliably. And with the previous patch
applied, it won't
Changes by Xiang Zhang :
--
nosy: +xiang.zhang
___
Python tracker
<http://bugs.python.org/issue24853>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xiang Zhang added the comment:
Serhiy, the message added in Misc/NEWS should be in Library section not Core
and Builtins section.
--
___
Python tracker
<http://bugs.python.org/issue16
New submission from Xiang Zhang:
>From doc [1], when create_module returns a non-module instance, m_methods,
>m_traverse, m_clear, m_free must be NULL. But actually in the codes, only
>m_traverse, m_clear, m_free are checked and emitting consistent errors. If
>m_methods is NULL,
Xiang Zhang added the comment:
> The cleanest way to refactor and fix this that comes to mind would be to make
> static _get_object_name() and _add_methods_to_object() functions in
> moduleobject.c (which omit any strict type checks), and then call those from
> PyModule_GetNa
Xiang Zhang added the comment:
Nice point. I'll write a patch to fix this these days.
--
___
Python tracker
<http://bugs.python.org/issue27782>
___
___
Pytho
Xiang Zhang added the comment:
Thanks for your review, Victor. :) Leave a reply.
--
___
Python tracker
<http://bugs.python.org/issue27558>
___
___
Python-bug
Xiang Zhang added the comment:
> initialize/run script/finalize will crash the second time
I don't think so since we already get a test case in test_capi that does
init/fini repeatedly. It does not crash.
So I agree to close
Xiang Zhang added the comment:
Thanks Petr. I'd appreciate it if you are willing to review the patch.
Upload a patch to fix this, along with tests and doc updating.
But here is something different. In PEP489, it is explicitly stated that
"Py_mod_create slot is not responsible f
Xiang Zhang added the comment:
Victor, upload a new patch, changing the test case to the approach you prefer.
;)
--
Added file: http://bugs.python.org/file44137/issue27558_v3.patch
___
Python tracker
<http://bugs.python.org/issue27
Xiang Zhang added the comment:
Martin, I write the v3 patch to apply the comments. It preserves *table* as
mandatory and move the test_translate to BaseBytesTest to remove duplicates.
--
title: make bytes/bytearray delete a keyword argument -> make bytes/bytearray
translate's
Changes by Xiang Zhang :
--
nosy: +davin
___
Python tracker
<http://bugs.python.org/issue27749>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
New submission from Liang Zhang:
This was copied from Chapter 5 Data Structure in Python language tutorial.
The link I was looking for:
https://docs.python.org/2.7/tutorial/datastructures.html
Some thing might be incorrect and need you to update them in
(5.1.4. List Comprehensions)
It
Liang Zhang added the comment:
Oh my god! You're right!
--
___
Python tracker
<http://bugs.python.org/issue23299>
___
___
Python-bugs-list mailing list
Changes by Zhang Yun :
--
components: Tests
files: test_ssl.log
nosy: cloud2han9
priority: normal
severity: normal
status: open
title: ERROR: test_dh_params (test.test_ssl.ThreadedTests)
versions: Python 3.4
Added file: http://bugs.python.org/file40077/test_ssl.log
New submission from Kevin Zhang:
OS: Windows Server 2008 R2 Enterprise
I'm remote desktop to the server and try to install Python3.5 released version.
Remote desktop user/privilege: administrator
There is no window about installation pop up after I double clicked
python-3.5.0.exe.
I
Kevin Zhang added the comment:
I have installed Python2.7 and Python3.4 on this server before.
Python3.4 installation works well after I failed to executed python-3.5.0.exe.
Thanks again.
--
___
Python tracker
<http://bugs.python.org/issue25
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
New submission from Deli Zhang:
It's well known that in quoted-printable encoding the "CRLF" can be encoded to
"=CRLF".
For example, in attachment file test.eml, the last line is "test message.=CRLF"
But after the mail is sent via SMTP and received by mail se
1201 - 1300 of 1760 matches
Mail list logo