[issue27713] Spurious "platform dependent libraries" warnings when running make

2016-08-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue27713> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-14 Thread Xiang Zhang
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.

[issue16764] Make zlib accept keyword-arguments

2016-08-15 Thread Xiang Zhang
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

[issue27450] bz2: BZ2File should expose compression level as an attribute

2016-08-15 Thread Xiang Zhang
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

[issue27492] Enhance bytearray_repr with bytes_repr's logic

2016-08-15 Thread Xiang Zhang
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

[issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults

2016-08-15 Thread Xiang Zhang
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

[issue24853] Py_Finalize doesn't clean up PyImport_Inittab

2016-08-16 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue24853> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16764] Make zlib accept keyword-arguments

2016-08-16 Thread Xiang Zhang
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

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-16 Thread Xiang Zhang
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,

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-17 Thread Xiang Zhang
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

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-17 Thread Xiang Zhang
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

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-17 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your review, Victor. :) Leave a reply. -- ___ Python tracker <http://bugs.python.org/issue27558> ___ ___ Python-bug

[issue24853] Py_Finalize doesn't clean up PyImport_Inittab

2016-08-17 Thread Xiang Zhang
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

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-17 Thread Xiang Zhang
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

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-17 Thread Xiang Zhang
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

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-17 Thread Xiang Zhang
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

[issue27749] multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed

2016-08-17 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +davin ___ Python tracker <http://bugs.python.org/issue27749> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27746] ResourceWarnings in test_asyncio

2016-08-18 Thread Xiang Zhang
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

[issue27792] bool % int has inconsistent return type.

2016-08-18 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue27792> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-18 Thread Xiang Zhang
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

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-18 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue27794> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-18 Thread Xiang Zhang
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

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-19 Thread Xiang Zhang
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

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-19 Thread Xiang Zhang
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.

[issue27801] test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS

2016-08-19 Thread Xiang Zhang
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

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-19 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. -- ___ Python tracker <http://bugs.python.org/issue27740> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-19 Thread Xiang Zhang
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

[issue27713] Spurious "platform dependent libraries" warnings when running make

2016-08-19 Thread Xiang Zhang
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

[issue25746] test_unittest failure in leaks searching mode

2016-08-20 Thread Xiang Zhang
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

[issue27692] Clean serveral unnecessary NULL checks in exceptions.c

2016-08-20 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. :) -- ___ Python tracker <http://bugs.python.org/issue27692> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2016-08-20 Thread Xiang Zhang
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

[issue16764] Make zlib accept keyword-arguments

2016-08-21 Thread Xiang Zhang
Xiang Zhang added the comment: I think it's okay to close now. -- ___ Python tracker <http://bugs.python.org/issue16764> ___ ___ Python-bugs-list m

[issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP

2016-08-21 Thread Xiang Zhang
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

[issue27746] ResourceWarnings in test_asyncio

2016-08-21 Thread Xiang Zhang
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

[issue27823] Change bare AttributeError messages to be more informative

2016-08-21 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue27823> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27823] Change bare AttributeError messages to be more informative

2016-08-21 Thread Xiang Zhang
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

[issue27792] bool % int has inconsistent return type.

2016-08-21 Thread Xiang Zhang
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

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread Xiang Zhang
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

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your work too. ;) You does the most important change. -- ___ Python tracker <http://bugs.python.org/issue27792> ___ ___

[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-08-22 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. -- ___ Python tracker <http://bugs.python.org/issue27660> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26331] PEP 515: Tokenizer: allow underscores for grouping in numeric literals

2016-08-22 Thread Xiang Zhang
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

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-22 Thread Xiang Zhang
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

[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-08-22 Thread Xiang Zhang
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

[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-23 Thread Xiang Zhang
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

[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-23 Thread Xiang Zhang
Changes by Xiang Zhang : -- components: +Library (Lib) nosy: +davin type: -> behavior ___ Python tracker <http://bugs.python.org/issue27833> ___ ___ Python-

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-23 Thread Xiang Zhang
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

[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-24 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue27833> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. :) -- ___ Python tracker <https://bugs.python.org/issue27414> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Xiang Zhang
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

[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-25 Thread Xiang Zhang
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

[issue27860] Improvements to ipaddress module

2016-08-25 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue27860> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27861] sqlite3 type confusion and multiple frees

2016-08-25 Thread Xiang Zhang
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

[issue27863] multiple issues in _elementtree module

2016-08-25 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue27863> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27861] sqlite3 type confusion and multiple frees

2016-08-26 Thread Xiang Zhang
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

[issue27861] sqlite3 type confusion and multiple frees

2016-08-26 Thread Xiang Zhang
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

[issue27861] sqlite3 type confusion and multiple frees

2016-08-26 Thread Xiang Zhang
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

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-27 Thread Xiang Zhang
Xiang Zhang added the comment: Yay, thanks for your work, Martin. -- ___ Python tracker <https://bugs.python.org/issue27506> ___ ___ Python-bugs-list mailin

[issue27861] sqlite3 type confusion and multiple frees

2016-08-27 Thread Xiang Zhang
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

[issue27861] sqlite3 type confusion and multiple frees

2016-08-27 Thread Xiang Zhang
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

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-27 Thread Xiang Zhang
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

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-27 Thread Xiang Zhang
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. --

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-27 Thread Xiang Zhang
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.

[issue27861] sqlite3 type confusion and multiple frees

2016-08-27 Thread Xiang Zhang
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

[issue27861] sqlite3 type confusion and multiple frees

2016-08-28 Thread Xiang Zhang
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

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-28 Thread Xiang Zhang
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

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-30 Thread Xiang Zhang
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

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-30 Thread Xiang Zhang
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

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-08-30 Thread Xiang Zhang
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

[issue23299] Documentation correction - 5.1.4. List Comprehensions

2015-01-22 Thread Liang Zhang
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

[issue23299] Documentation correction - 5.1.4. List Comprehensions

2015-01-22 Thread Liang Zhang
Liang Zhang added the comment: Oh my god! You're right! -- ___ Python tracker <http://bugs.python.org/issue23299> ___ ___ Python-bugs-list mailing list

[issue24761] ERROR: test_dh_params (test.test_ssl.ThreadedTests)

2015-07-30 Thread Zhang Yun
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

[issue25116] It failed to install Py3.5 on win2008R2

2015-09-14 Thread Kevin Zhang
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

[issue25116] It failed to install Py3.5 on win2008R2

2015-09-14 Thread Kevin Zhang
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

[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-09-23 Thread Xiang Zhang
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

[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-09-25 Thread Xiang Zhang
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

[issue25232] CGIRequestHandler behave incorrectly with query component consisting mutliple ?

2015-09-25 Thread Xiang Zhang
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

[issue25232] CGIRequestHandler behave incorrectly with query component consisting mutliple ?

2015-09-25 Thread Xiang Zhang
Changes by Xiang Zhang <18518281...@126.com>: -- type: -> behavior versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/issue25232> ___ ___ P

[issue25232] CGIRequestHandler behave incorrectly with query component consisting mutliple ?

2015-09-25 Thread Xiang Zhang
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

[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-09-25 Thread Xiang Zhang
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

[issue25253] AttributeError: 'Weather' object has no attribute 'dom'

2015-09-27 Thread Xiang Zhang
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

[issue25258] HtmlParser doesn't handle void element tags correctly

2015-09-28 Thread Xiang Zhang
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

[issue25288] readline.py file in current directory caused unexpected code execution.

2015-10-01 Thread Xiang Zhang
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

[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-10-02 Thread Xiang Zhang
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

[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-08 Thread Xiang Zhang
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

[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Xiang Zhang
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,

[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Xiang Zhang
Xiang Zhang added the comment: It's my fault. I forget to recompile. Now it works. -- ___ Python tracker <http://bugs.python.org/issue24402> ___ ___ Pytho

[issue25341] File mode wb+ appears as rb+

2015-10-10 Thread Xiang Zhang
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

[issue25341] File mode wb+ appears as rb+

2015-10-10 Thread 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

[issue25341] File mode wb+ appears as rb+

2015-10-10 Thread Xiang Zhang
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

[issue25363] x=[1,2,3].append([1,2,3]) bug

2015-10-10 Thread Xiang Zhang
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

[issue25381] Use old description of raise in Python3

2015-10-12 Thread Xiang Zhang
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

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread Xiang Zhang
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

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread Xiang Zhang
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

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread Xiang Zhang
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

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread Xiang Zhang
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

[issue25390] Can't define a typing.Union containing a typing.re.Pattern

2015-10-13 Thread Xiang Zhang
Changes by Xiang Zhang <18518281...@126.com>: -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue25390> ___ ___ Python-bugs-list

[issue25381] Doc: Use of old description of raise in Python3

2015-10-13 Thread Xiang Zhang
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

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-04 Thread Xiang Zhang
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

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-04 Thread Xiang Zhang
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

[issue25553] SMTP.data(msg) function may cause the last CRLF of msg lost if msg is quoted-printable encoding.

2015-11-04 Thread Deli Zhang
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

<    8   9   10   11   12   13   14   15   16   17   >