[issue29453] Remove reference to undefined dictionary ordering in Tutorial

2017-02-05 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29453> ___ __

[issue29347] Python could crash while creating weakref for a given object

2017-02-04 Thread Xiang Zhang
Xiang Zhang added the comment: Saida, I changed your test program to use set instead of self created type (see attachment). I tested it under Py2.7 and it seems no crash happens. python test.py 1 1 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010] 0x101010101010101 0x1010101010101

[issue29347] Python could crash while creating weakref for a given object

2017-02-04 Thread Xiang Zhang
Xiang Zhang added the comment: But your weakref_crash.c doesn't look correct to me. Your test.object type doesn't support weak references at all. How could you use GET_WEAKREFS_LISTPTR then? See https://docs.python.org/3/extending/newtypes.html#weakref-support

[issue29347] Python could crash while creating weakref for a given object

2017-02-04 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, what's your test program? Would you mind show it? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29347] Python could crash while creating weakref for a given object

2017-02-04 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +fdrake ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29347> ___ __

[issue29347] Python could crash while creating weakref for a given object

2017-02-04 Thread Xiang Zhang
Xiang Zhang added the comment: After reading the code I could see the possibility. A weakref object gets two linkedlist pointers which are not initialized by new_weakref (actually they are initialized by insert_head or insert_after). But the weakref object is possible to be destroyed in [1

[issue29405] improve csv.Sniffer().sniff() behavior

2017-02-03 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- stage: patch review -> commit review ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue29405] improve csv.Sniffer().sniff() behavior

2017-02-03 Thread Xiang Zhang
Xiang Zhang added the comment: Sounds reasonable. IIUC if the sample data gets 11 lines the total could be 20. I also think the second min is redundant. Would you mind review my patch Milt? -- keywords: +patch stage: -> patch review type: behavior -> enhancement versions: +Pyth

[issue29438] SIGSEGV in PyObject_Malloc on python 3.6 and 3.7

2017-02-03 Thread Xiang Zhang
Xiang Zhang added the comment: I could reproduce this using Audric's command. And yes, debug build doesn't suffer from this crash. Nosy Victor. DEBUG:root:Called with: ['/tmp/minimal_crash.py', '-d', 'sqlite:///crash.db', '-v'] INFO:__main__:Connecting to DB 'sqlite:///crash.db

[issue29405] improve csv.Sniffer().sniff() behavior

2017-02-03 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29405> ___ __

[issue29347] Python 2.7.8 is crashing while creating weakref for a given object.

2017-02-03 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +xiang.zhang versions: -Python 3.3, Python 3.4 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-03 Thread Xiang Zhang
Xiang Zhang added the comment: This seems an regression from #18808, so nosy Tim and Antoine. Since _DummyThread is always alive and daemonic, I think the solution could be overriding is_alive in _DummyThread and always returning True. -- keywords: +patch nosy: +xiang.zhang stage

[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-03 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +pitrou, tim.peters ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29376> ___

[issue29378] Invalid example in documentation for PyErr_Fetch

2017-02-03 Thread Xiang Zhang
Xiang Zhang added the comment: I can't see any problem with the example either. So I just close this issue for now. But if you still think it gets problems please reopen it and tell your thoughts. -- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status

[issue29387] Tabs vs spaces FAQ out of date

2017-02-03 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. -t is not removed but only ignored in Py3 for backwards compatibility. And I am fine with the wording. -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29412] IndexError thrown on email.message.Message.get

2017-02-02 Thread Xiang Zhang
Xiang Zhang added the comment: This seems not related to #27931. The problem is that the receiver's content is only CFWS. It's just like it's empty and for the default policy, it checks `value[0] == '"'` in `get_word`. -- nosy: +xiang.

[issue29365] parallel make test or make install can fail building pgen when configure --enable-optimizations is used

2017-01-24 Thread Xiang Zhang
Xiang Zhang added the comment: > Making the suggested "make, make test, make install" process effectively > useless or at least take 3x longer than it should. About this, I once opened #29243. -- nosy: +xiang.zhang ___ Pyt

[issue29341] Missing accepting path-like object in docstrings of os module functions

2017-01-23 Thread Xiang Zhang
Xiang Zhang added the comment: I don't mean to sync the docstring and the documentation totally. But just like os.chown, there are some functions explicitly mention the acceptable types of path parameter in their docstrings. I think since they already mention the types, then make the list

[issue29338] Output the text signature in the help of a class

2017-01-23 Thread Xiang Zhang
Xiang Zhang added the comment: Things doesn't come to an end. :-( The enum test suite also gets a related test and make the buildbot fail: FAIL: test_pydoc (test.test_enum.TestStdLib) -- Traceback (most recent call last

[issue29338] Output the text signature in the help of a class

2017-01-23 Thread Xiang Zhang
Xiang Zhang added the comment: The buildbots are failing due to test_pydoc. :-( -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29212] Python 3.6 logging thread name regression with concurrent.future threads

2017-01-22 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +gregory.p.smith ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29212> ___ _

[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-21 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Serhiy. BTW, #16623 is about 2.7 and the cause is wrap doesn't handle unicode non-breaking spaces right. So it's not the same thing as here. -- resolution: -> fixed stage: commit review -> resolved status: open -&g

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-21 Thread Xiang Zhang
Xiang Zhang added the comment: > I'm even worse at that. :-( LoL. Okay I'll do that. :-) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-21 Thread Xiang Zhang
Xiang Zhang added the comment: > Maybe discuss this on Python-Dev? It's fine. Could you compose a mail instead of me? I am not good at that. :-( -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue29341] Missing accepting path-like object in docstrings of os module functions

2017-01-21 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- stage: -> needs patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29341> ___ __

[issue29341] Missing accepting path-like object in docstrings of os module functions

2017-01-21 Thread Xiang Zhang
New submission from Xiang Zhang: PathLike objects are added in 3.6 and they are mentioned in the documentation. But in some os module functions' docstrings, acceptable types of path parameter are mentioned and they are not altered to mention path-like object. For example: chown(path, uid, gid

[issue29092] Sync os.stat's doc and doc string

2017-01-21 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-21 Thread Xiang Zhang
Xiang Zhang added the comment: Ping for review for timestamptz-3.patch. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29099> ___ __

[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-21 Thread Xiang Zhang
Xiang Zhang added the comment: v2 addresses the comments. I didn't receive the review notification mail so just saw them today. :-( -- stage: -> patch review Added file: http://bugs.python.org/file46376/argparse-help-non-breaking-spaces-2.pa

[issue28735] Mock is equal to ANY but MagicMock is not

2017-01-20 Thread Xiang Zhang
Xiang Zhang added the comment: Kushal I think the OP is reporting `mock.MagicMock() == mock.ANY` is False while `mock.ANY == mock.MagicMock()` is True which is still the case in 3.7. A related issue is #25195. In that issue Serhiy has mentioned this behaviour(http://bugs.python.org/issue25195

[issue29325] pysqlite: Evaluate removal of sqlite3_stmt_readonly

2017-01-19 Thread Xiang Zhang
Xiang Zhang added the comment: Hi Ma Lin. If you find this is also a problem in sqlite3 module, feel free to open another issue against sqlite3. :-) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29325] pysqlite: Evaluate removal of sqlite3_stmt_readonly

2017-01-19 Thread Xiang Zhang
Xiang Zhang added the comment: pysqlite is not part of Python stdlib so here is not the right place. :-( Maybe you could go to https://github.com/ghaering/pysqlite for help. -- nosy: +xiang.zhang resolution: -> third party stage: -> resolved status: open -&g

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-19 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Ammar. :-) -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue29322] SimpleCV error on Raspberry Pi

2017-01-19 Thread Xiang Zhang
Xiang Zhang added the comment: Hi Michael, this bug tracker is meant for developing CPython. Your problem exists in your own codes or third party applications. You'd better report to the related parties. -- nosy: +xiang.zhang resolution: -> third party stage: -> resolved

[issue29307] ModuleNotFoundError when using literal string interpolation with invalid format specifier

2017-01-18 Thread Xiang Zhang
Xiang Zhang added the comment: It seems to be vendor's issue not CPython itself. This same issue also happens in Ubuntu 16.10's Python 3.6. Raise any exception can cause this: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) [GCC 6.2.0 20161005] on linux Type "help", "copyr

[issue29304] dict: simplify lookup function

2017-01-17 Thread Xiang Zhang
Xiang Zhang added the comment: Ahh, I got the same idea before. But then I persuaded myself that the first "lookup()" was deliberately extracted from the loop since it's highly possible there is no collision and you can hit the result (empty or not) the first time. -

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-17 Thread Xiang Zhang
Xiang Zhang added the comment: > "keywords and defaults," however, the kwdefs argument was never added to the > prototype. I don't think this is about the missing "kwdefs". I think "arrays of arguments, keywords and defaults" is a whole part descri

[issue29294] ctypes.windll.LoadLibrary refuses unicode argument

2017-01-17 Thread Xiang Zhang
Xiang Zhang added the comment: #29082 fixed it? -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29294> ___ ___

[issue29291] Misleading text in the documentation of re library for non-greedy match

2017-01-17 Thread Xiang Zhang
Xiang Zhang added the comment: This doesn't look like a bug in the doc to me. -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-17 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- keywords: +easy stage: -> needs patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue29292] Missing a parameter in PyEval_EvalCodeEx doc

2017-01-17 Thread Xiang Zhang
New submission from Xiang Zhang: The signature of PyEval_EvalCodeEx now gets a "PyObject *kwdefs" parameter but the doc doesn't mention it. -- assignee: docs@python components: Documentation messages: 285620 nosy: docs@python, xiang.zhang priority: normal severity: normal st

[issue16623] argparse help formatter does not honor non-breaking space

2017-01-16 Thread Xiang Zhang
Xiang Zhang added the comment: Ahh, sorry. I made a mistake. It's not the same as 29290. This is about 2.7. Although #20491 is closed but 2.7 seems not patched. Nosy Serhiy. -- nosy: +serhiy.storchaka resolution: fixed -> stage: resolved -> needs patch status: closed -

[issue16623] argparse help formatter does not honor non-breaking space

2017-01-16 Thread Xiang Zhang
Xiang Zhang added the comment: #29290 reports the same problem as here. -- nosy: +xiang.zhang resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> argparse breaks long lines on NO-BREAK SPACE ___ Python

[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-16 Thread Xiang Zhang
Xiang Zhang added the comment: I think this is a regression when coming to 3.x. In 2.7, r'\s+' is by default in ASCII mode and won't match unicode non-breaking spaces. In 3.x it's by default unicode mode so non-breaking spaces are replaced by spaces. I think we can just use [ \t\n\r\f\v

[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-16 Thread Xiang Zhang
Xiang Zhang added the comment: textwrap has been fixed in #20491 but this problem still exists. The reason seems to be that argparse replaces the non-break spaces with spaces: before self.whitespace_matcher.sub 'Disable default font-style: condensed. Also disables "M+\\xa01M"

[issue29235] Allow profile/cProfile to be used as context managers

2017-01-15 Thread Xiang Zhang
Xiang Zhang added the comment: > I suspect unit tests and documentation updates? Yes. Code alone is not enough. It's better to have tests and documentation. Also, it's appreciated to sign the CLA: https://www.python.org/psf/contrib/contrib-form/. :-) -- nosy: +xiang.zhang st

[issue29276] HTMLParser in Python 2.7 doesn't recognize image tags wrapped up in link tags

2017-01-14 Thread Xiang Zhang
Xiang Zhang added the comment: I can get the expected behaviour with the lastest 2.7 build. Python 2.7.13+ (2.7:0d4e0a736688, Jan 15 2017, 00:51:57) [GCC 5.2.1 20151010] on linux2 Type "help", "copyright", "credits" or "license" for more informatio

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-13 Thread Xiang Zhang
Xiang Zhang added the comment: timestamptz-3.patch uses ValueError instead of ProgrammingError and treat suffix Z as UTC timezone. -- Added file: http://bugs.python.org/file46279/timestamptz-3.patch ___ Python tracker <rep...@bugs.python.org>

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-13 Thread Xiang Zhang
Xiang Zhang added the comment: I am okay with ValueError(actually I use it in the patch originally) but I am not in favour of catching the errors of the parser. The parser raises errors due to invalid data, not timezone. I think propagate it to users could make the reason more obvious

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-13 Thread Xiang Zhang
Xiang Zhang added the comment: timestamptz-2.patch make timestamp and timestamptz specilized for their own objects. -- Added file: http://bugs.python.org/file46277/timestamptz-2.patch ___ Python tracker <rep...@bugs.python.org>

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-13 Thread Xiang Zhang
Xiang Zhang added the comment: > I think the old code unlikely will be broken if preserve an exception type > and don't change conditions for raising an error. Currently there could be no error when the object gets a timezone. The timezone is simply discarded and only when microseconds

[issue29062] hashlib documentation link error

2017-01-12 Thread Xiang Zhang
Xiang Zhang added the comment: Although I am +1 for merging it before but these days I find it's not the only case. There are also two unittest.mock entries. This is just FYI, no opinion on this issue. -- ___ Python tracker <rep...@bugs.python.

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: > I think the timestamptz converter should either interpret strings without > timezone as UTC (and perhaps understand the "Z" suffix as sqlite3 date() > function) or raises an error. It should never return naive datetime. Currently timestampt

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: timestamptz.patch implements a new converter that's able to convert aware datetime objects. -- stage: needs patch -> patch review Added file: http://bugs.python.org/file46265/timestamptz.patch ___ Python tracker &

[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-01-11 Thread Xiang Zhang
New submission from Xiang Zhang: In 3.6 we get --enable-optimizations. One thing I find annoyed with this flag is that it makes some build commands compile from scratch since it always clears the environment first. For example, with the commands listed at the top of Makefile: ./configure

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: I asked whether this should be treated as an enhancement or bug fix. Now with your concerns I think it fits as enhancement more. > Is it possible to make the support optional for 3.5 and 3.6 and only enable > it for 3.7 (with the possibility of dis

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: > LGTM except that arguments of assertEqual() should be swapped. Thanks Serhiy! I'll take care of that. One problem remained is what to do with 2.7. There is no timezone object in 2.7. My preference is just pointing out the limitation that only naive datet

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: Added file: http://bugs.python.org/file46254/sqlite3-3.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29215] pyport.h uses non C90-style comment

2017-01-10 Thread Xiang Zhang
Xiang Zhang added the comment: About the comment style confliction, I opened an issue on Github and assigned to you Benjamin. https://github.com/python/peps/issues/176 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-09 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +vinay.sajip ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29220> ___ __

[issue29217] Documentation for uuid has wrong description for variant

2017-01-09 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your report David. :-) I simply remove the type description since I think the type of the constants doesn't matter here. -- nosy: +xiang.zhang resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.3, P

[issue29145] failing overflow checks in replace_*

2017-01-09 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks you all. :-) -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue29215] pyport.h uses non C90-style comment

2017-01-09 Thread Xiang Zhang
Xiang Zhang added the comment: I found that conflict once but lost it then. :-( > Or should I just assume that all headers are henceforth C99 and any wrapping > code should also be C99? I am not sure. :-( Nosy other experts. :-) -- nosy: +haypo, serhiy.sto

[issue29215] pyport.h uses non C90-style comment

2017-01-09 Thread Xiang Zhang
Xiang Zhang added the comment: That's a change in 3.6, see https://docs.python.org/3/whatsnew/3.6.html#build-and-c-api-changes. -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-09 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28870> ___ __

[issue29142] urllib: no_proxy variable values with leading dot not properly handled

2017-01-08 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Milan and Thomas! -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue29145] failing overflow checks in replace_*

2017-01-08 Thread Xiang Zhang
Xiang Zhang added the comment: > FTR I thought the consensus was not to backport these fixes unless there was > a demonstrated problem: <https://bugs.python.org/issue1621#msg144499>, though > personally, I would be in favour of backporting in many cases. Sorry not know th

[issue29145] failing overflow checks in replace_*

2017-01-08 Thread Xiang Zhang
Xiang Zhang added the comment: I committed the patch to 2.7. The new patch is for 3.x. -- stage: patch review -> commit review versions: +Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46221/overflow-checks-3x.pa

[issue29142] urllib: no_proxy variable values with leading dot not properly handled

2017-01-08 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. -- assignee: -> xiang.zhang stage: patch review -> commit review ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Xiang Zhang
Xiang Zhang added the comment: > Is 3.5 free from all these bugs? path_converter is much simpler in 3.5 so I think it's free of these bugs. :-) -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python

[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: Added file: http://bugs.python.org/file46208/path_converter-new-4.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-08 Thread Xiang Zhang
Xiang Zhang added the comment: path_converter-new-3.patch fixes the wrong return value on successful cases. -- Added file: http://bugs.python.org/file46206/path_converter-new-3.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-07 Thread Xiang Zhang
Xiang Zhang added the comment: I'm -1 if the intention is about easiness and efficiency. I think a new API is usually added due to functional defect not performance defect. We get a way here though the performance seems not ideal, according to INADA's mail. I think we should first check

[issue29190] Avoid possible errors in comparing strings

2017-01-07 Thread Xiang Zhang
Xiang Zhang added the comment: Paste my point here: I prefer checking the result PyUnicode_Compare to see it's a success or failure. getrandom doesn't use any lower level unicode operations so it doesn't get a responsibility to ready the unicode. -- nosy: +xiang.zhang

[issue29186] TimeoutError isn't being raised?

2017-01-06 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- stage: -> resolved ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29186> ___ ___

[issue29142] urllib: no_proxy variable values with leading dot not properly handled

2017-01-06 Thread Xiang Zhang
Xiang Zhang added the comment: > I think it makes sense to strip at the end as well (`example.com` is the same > domain as `example.com.`). Are your sure the host checked against the list is FQDN? With and without the trailing dot are dif

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +haypo ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29174> ___ __

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-06 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29157> ___ ___ Python-bugs-list mailing list

[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-05 Thread Xiang Zhang
Xiang Zhang added the comment: path_converter-new-2.patch addresses Serhiy's comments. :-) -- Added file: http://bugs.python.org/file46170/path_converter-new-2.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29034] Fix memory leak and use-after-free in path_converter

2017-01-05 Thread Xiang Zhang
Xiang Zhang added the comment: The new patch is a try to solve the problems mentioned in this thread. > It can be solved by making path->object referring an original argument (but > some code checks the type of path->object), or making path->object owning a > reference.

[issue29145] failing overflow checks in replace_*

2017-01-05 Thread Xiang Zhang
Xiang Zhang added the comment: > It seems to me that unicodeobject.c should be changed in 3.x too. I don't understand. Would you mind tell me which part? The only suspicious part to me is `PY_SSIZE_T_MAX >> (rkind - 1)`. It seems should be `PY_SSIZE_T_MAX / rkind`. And I missed ja

[issue29145] failing overflow checks in replace_*

2017-01-05 Thread Xiang Zhang
Xiang Zhang added the comment: > some instances are present in unicodeobject.c too Thanks for your notification. v3 adds the some changes needed I could find in unicodeobject.c. Nothing in v2 is changed. -- Added file: http://bugs.python.org/file46158/replace-overflow-check-v3.pa

[issue28806] Improve the netrc library

2017-01-04 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +r.david.murray -haypo ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28806> ___

[issue26867] test_ssl test_options fails on ubuntu 16.04

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: This test still fails with lastest Py2.7 on Ubuntu 16.10. Could we backport the patch to silence the failure? ./python -m test.regrtest test_ssl [1/1] test_ssl test test_ssl failed -- Traceback (most recent call last): File "/home/angwer/py2.7/Lib

[issue29166] AT tech email support number <1 855 338 0710<AT tech email support phone number

2017-01-04 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: Removed file: http://bugs.python.org/file46152/1 855 338 0710 AT tech email support phone number AT email support number.jpg ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29166] AT tech email support number <1 855 338 0710<AT tech email support phone number

2017-01-04 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: -gvanrossum, yselivanov resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue29166] AT tech email support number <1 855 338 0710<AT tech email support phone number

2017-01-04 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- Removed message: http://bugs.python.org/msg284711 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: > It would be better to write the code in the same form as in 3.x. This could > help backporting other patches if needed. Yes, it is. :-) I only had a fast glance at at 3.x codes and thought they didn't share much. :-( But apparently I was wrong. The new

[issue29164] make test always fail at 218/405 ( AssertionError: ', ' not found in '1234.5' )

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: Could you provide your default locale setting, the result of `locale.setlocale(locale.LC_ALL, '')`? -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh sorry I misunderstand your intention. :-( Attach a patch. :-) -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file46141/replace-overflow-check.patch ___ Python tracker &

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: > It does, but "-fwrapv" is not automatically added when you specify custom OPT > flags. Indeed I think this is why the changes in #27473 and #1621 make sense. > GCC 6 optimizes away broken overflow checks. I am sorry but I don't understan

[issue29148] Inheritance behaviour ambiguos

2017-01-03 Thread Xiang Zhang
Xiang Zhang added the comment: It seems you are surprised `super(C, self).foo2()` works but it is actually how super() and class.__mro__ works. :-) So not a bug. You could learn more about it but sorry I don't have any good reference for you. :-( -- nosy: +xiang.zhang resolution

[issue29139] operator.concat/iconcat could only work if left operand is a sequence

2017-01-03 Thread Xiang Zhang
Xiang Zhang added the comment: Actually this issue was discussed when import the pure Python implementation in #16694. There seems once an effort checking also the right operand but was later removed, but I couldn't understand why (though there is an explanation, but it's more about why

[issue29117] dir() should include dunder attributes of the unbound method

2017-01-03 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29117> ___ __

[issue29139] operator.concat/iconcat could only work if left operand is a sequence

2017-01-03 Thread Xiang Zhang
Xiang Zhang added the comment: > You can use operator.add() if you need to fall back to a __radd__ of the > right operand. IMHO for sequences when defining __add__, __radd__, there is no difference between addition and concatenation, just as https://docs.python.org/3/reference/datamode

[issue29139] operator.concat/iconcat could only work if left operand is a sequence

2017-01-03 Thread Xiang Zhang
Changes by Xiang Zhang <angwe...@126.com>: -- nosy: +serhiy.storchaka, zach.ware ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29139] operator.concat/iconcat could only work if left operand is a sequence

2017-01-03 Thread Xiang Zhang
New submission from Xiang Zhang: As the title, but I think it should also continue if only the right operand is a sequence since the right operand could get a __radd__ to do the concatenation: >>> class S: ... def __init__(self): ... self.v = list(range(10)) ..

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-03 Thread Xiang Zhang
Xiang Zhang added the comment: > As for `operator.concat`, any reason why the check is made beforehand to see > if the first argument has a `__getitem__` method? Concatenation is an operation of sequence (+ could be used both for concatenation and addition), so you have to check __get

[issue29130] Exit code 120 returned from Python unit test testing SystemExit

2017-01-02 Thread Xiang Zhang
Xiang Zhang added the comment: Behaviour changed in #5319. Add author Martin. -- nosy: +martin.panter, xiang.zhang ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29114] __class__ not exists in the method which bounded by types.MethodType.

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: You can't do it like this. The document explicitly states it only works inside a class definition: "Also note that, aside from the zero argument form, super() is not limited to use inside methods. The two argument form specifies the arguments exactly and

<    3   4   5   6   7   8   9   10   11   12   >