[issue34465] ipaddress should accept bytearray in addition to bytes

2018-08-31 Thread Xiang Zhang
Xiang Zhang added the comment: I'm -1 on this change. I think the workaround is easy and direct. -- ___ Python tracker <https://bugs.python.org/is

[issue34486] "RuntimeError: release unlocked lock" when starting a thread

2018-09-02 Thread Xiang Zhang
Xiang Zhang added the comment: It looks to me pure Python implementation could not handle such cases. Put aside other possible bugs, threading.Condition.wait re-acquire the lock using threading.Condition._acquire_restore which could be interrupted and not able to acquire the lock. So it

[issue34563] invalid assert on big output of multiprocessing.Process

2018-09-02 Thread Xiang Zhang
Change by Xiang Zhang : -- nosy: +davin, pitrou ___ Python tracker <https://bugs.python.org/issue34563> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34505] urllib2 fails for proxy credentials that contains a '/' character

2018-09-02 Thread Xiang Zhang
Change by Xiang Zhang : -- type: crash -> behavior ___ Python tracker <https://bugs.python.org/issue34505> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue34608] gc.get_referrers behavior change 3.6 to 3.7

2018-09-08 Thread Xiang Zhang
Change by Xiang Zhang : -- nosy: +inada.naoki, pitrou ___ Python tracker <https://bugs.python.org/issue34608> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34486] "RuntimeError: release unlocked lock" when starting a thread

2018-09-09 Thread Xiang Zhang
Xiang Zhang added the comment: It's not right to replace with statement by manually calling __enter__ and __exit__. If there is any exception after __enter__ and before __exit__, __exit__ method will be skipped. That's not wh

[issue34786] ProcessPoolExecutor documentation reports wrong exception being raised

2018-09-24 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34770] pyshellext.cpp: Possible null pointer dereference

2018-09-24 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34763] Python lacks 0x4E17

2018-09-25 Thread Xiang Zhang
Change by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue34763> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34850] Emit a syntax warning for "is" with a literal

2018-09-30 Thread Xiang Zhang
Xiang Zhang added the comment: I have catched using `is` to do string equality check in our codebase by linters before. Not all my colleagues know what's not suitable here. The only common and suitable case I can think of is programmers are exploring CPython internals, like

[issue34908] netrc parsing is overly strict

2018-10-09 Thread Xiang Zhang
Xiang Zhang added the comment: My PR https://github.com/python/cpython/pull/127 has tried to solve some restrictions of the current netrc library. It's somewhat outdated since no reviewer for a long time. As you can see there are also other libraries suffering from the restric

[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2018-10-13 Thread Xiang Zhang
Change by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue34979> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34953] Implement `mmap.mmap.__repr__`

2018-10-15 Thread Xiang Zhang
Xiang Zhang added the comment: I don't like the idea to display the contents in the repr, no matter entire or clipped. I think it's not suitable and for contents, just read the object manually. For me, a closed status plus the constructor arguments is a good choice. -

[issue34973] Crash in bytes constructor with mutating list

2018-10-17 Thread Xiang Zhang
Xiang Zhang added the comment: I carefully read both the two PRs. The first one, easy to understand. The second one, I spend some time to figure out why the test doesn't crash, why we need to have reference count checks in two places and make some experiments to test in different cases

[issue34748] Incorrect HTML link in functools.partial

2018-10-22 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 83a07652e0033f0d9994ae7634b91d6581c56b00 by Xiang Zhang (Andrei Petre) in branch 'master': bpo-34748: link to :ref:`partial-objects` in functools.partial doc. (GH-9809) https://github.com/python/cpyt

[issue34748] Incorrect HTML link in functools.partial

2018-10-22 Thread Xiang Zhang
Change by Xiang Zhang : -- pull_requests: +9386 ___ Python tracker <https://bugs.python.org/issue34748> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34748] Incorrect HTML link in functools.partial

2018-10-22 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 56a4a3aa555b3abc756cf837eddac4c0bf545db7 by Xiang Zhang in branch '2.7': [2.7] bpo-34748: link to :ref:`partial-objects` in functools.partial doc. (GH-9809) https://github.com/python/cpython/commit/56a4a3aa555b3abc756cf837eddac4

[issue34748] Incorrect HTML link in functools.partial

2018-10-22 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks all. :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue31722] _io.IncrementalNewlineDecoder doesn't inherit codecs.IncrementalDecoder

2018-10-23 Thread Xiang Zhang
Xiang Zhang added the comment: Just find the same problem while investigating io. -- nosy: +xiang.zhang stage: patch review -> needs patch versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issu

[issue35056] Test leaks of memory not managed by Python allocator

2018-10-24 Thread Xiang Zhang
Change by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue35056> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-24 Thread Xiang Zhang
New submission from Xiang Zhang : io.IncrementalNewlineDecoder gets a *translate* bitwise struct field, but it could be assigned arbitrary int value. This leads to inconsistent behaviour, evens are evaluated to False and odds to True. >>> io.IncrementalNewlineDecoder(encodi

[issue34672] '%Z' strftime specifier never works with musl

2018-10-28 Thread Xiang Zhang
Change by Xiang Zhang : -- pull_requests: +9499 ___ Python tracker <https://bugs.python.org/issue34672> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34672] '%Z' strftime specifier never works with musl

2018-10-28 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 163eca34c48f1b25e1504e37f4656773fd0fdc78 by Xiang Zhang in branch 'master': bpo-34672: fix a compiler warning in timemodule.c (GH-10176) https://github.com/python/cpython/commit/163eca34c48f1b25e1504e37f4656773fd0fdc78 -

[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-29 Thread Xiang Zhang
Change by Xiang Zhang : -- keywords: +patch pull_requests: +9534 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset b08746bfdf64e55ce33516f2065fa2aa4f51be95 by Xiang Zhang in branch 'master': bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. (GH-10217) https://github.com/python/cpython/commit/b08746bfdf64e55ce33516f20

[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-31 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-10-31 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset aa39c1ab6de6d3fb0204741efdde9b7eed25b093 by Xiang Zhang (Lysandros Nikolaou) in branch '2.7': [2.7] bpo-32804: Include the context parameter in urlretrieve documentation (GH-10203) https://github.com/python/cpyt

[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-10-31 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1

2016-11-23 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Serhiy and Victor. Finished my first commit. :-) Now assign back to Serhiy and pos2 LGTM. -- assignee: xiang.zhang -> serhiy.storchaka ___ Python tracker <http://bugs.python.org/issu

[issue28728] test_host_resolution in test_socket fails

2016-11-23 Thread Xiang Zhang
Xiang Zhang added the comment: Hi SilentGhost. I'm also using Ubuntu 16.10 but the test case doesn't fail. cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.10 DISTRIB_CODENAME=yakkety DISTRIB_DESCRIPTION="Ubuntu 16.10" ./python -Wa -m test -v test_socket | grep

[issue28728] test_host_resolution in test_socket fails

2016-11-24 Thread Xiang Zhang
Xiang Zhang added the comment: > hosts: files mdns4_minimal [NOTFOUND=return] resolve > [!UNAVAIL=return] dns I think this is the default config. Same as mine. Does test_host_resolution still stably fails? -- ___ Python tracker

[issue28749] Fixed the documentation of the mapping codec APIs

2016-11-24 Thread Xiang Zhang
Xiang Zhang added the comment: v2 LGTM. -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue28749> ___ ___ Python-bugs-list mailing list Unsub

[issue28806] Improve the netrc library

2016-11-26 Thread Xiang Zhang
New submission from Xiang Zhang: netrc library now gets some problems: 1. All tokens are mandatory. (#28780) 2. Token values are limited to a limited set of characters. (#557704) 3. Does not complain about macro definition without a null line. 4. If the login name is anonymous, security check

[issue28780] netrc throws NetrcParseError for record without 'password'

2016-11-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- dependencies: +Improve the netrc library ___ Python tracker <http://bugs.python.org/issue28780> ___ ___ Python-bugs-list mailin

[issue28728] test_host_resolution in test_socket fails

2016-11-27 Thread Xiang Zhang
Xiang Zhang added the comment: The three ipv6 addresses are all invalid addresses if we conform to spec. "::1q" non hex characteres "::1::2"two "::" but at most one is allowed "1:1:1:1:1:1:1:1:1" 144 bits > 128 bits > Perha

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-27 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. Although at first I am not in favour of this change but searching Github it seems all usages of this API doesn't check the possible error. -- nosy: +xiang.zhang ___ Python tracker <http://bugs.py

[issue14844] netrc does not handle accentuated characters

2016-11-27 Thread Xiang Zhang
Xiang Zhang added the comment: I opened #28806 to improve netrc library. This could be solved if it's merged. -- dependencies: +Improve the netrc library nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/is

[issue28334] netrc does not work if $HOME is not set

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

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-28 Thread Xiang Zhang
Xiang Zhang added the comment: > 4. Guard against misbehaving generators/iterables *before* they are put into > the taskqueue. This approach is good. 2 points about the patch: 1. How about _map_async(map)? Does it need the same strategy? For an iterator with __len__ defined it seems

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-28 Thread Xiang Zhang
New submission from Xiang Zhang: PyUnicode_FindChar declares in the doc it treats its *start* and *end* parameters as str[start:end], same as other APIs like PyUnicode_Find, PyUnicode_Count. But it doesn't allow negative indices like others so violates the doc. -- compo

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-28 Thread Xiang Zhang
Xiang Zhang added the comment: Other APIs like PyUnicode_Find and PyUnicode_Count support it. Their docs are almost the same so I think PyUnicode_FindChar does not need to be the special one. After change, its behaviour and implementation are more consistent with other APIs

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your reviews. :-) v2 updated the test codes. -- Added file: http://bugs.python.org/file45690/PyUnicode_FindChar-v2.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Xiang Zhang
Xiang Zhang added the comment: > Remaining question: what is the behaviour for direction=0, direction=100 or > direction=-2? Maybe we can add a few unit tests for strange values of > direction? (Not sure if it's worth it.) It's not documented so I also doubt it. Expe

[issue28837] 2to3 does not wrap zip correctly

2016-11-30 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +benjamin.peterson versions: +Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker <http://bugs.python.org/issue28837> ___ ___

[issue28728] test_host_resolution in test_socket fails

2016-11-30 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file45714/test_host_resolution.patch ___ Python tracker <http://bugs.python.org/issue28728> ___ ___ Python-bug

[issue28728] test_host_resolution in test_socket fails

2016-11-30 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh, sorry. > I was wondering if there was a separate way to detect the troublesome ISP > environment. How could you differentiate the failure between ISP environment caused and function behaved wrongly? Successfully resolve an invalid ip address doesn&#

[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2016-12-02 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang stage: -> needs patch versions: +Python 3.7 -Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issu

[issue28856] %b format for bytes does not support objects that follow the buffer protocol

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

[issue24329] __qualname__ and __slots__

2016-12-05 Thread Xiang Zhang
Xiang Zhang added the comment: > However, consistency is a good thing, so allowing it seems reasonable. The inconsistency also appears when "__classcell__" in slots with or without super(). v4 catches up with HEAD. -- Added file: http://bugs.python.org/file45762/slo

[issue28894] Memory leak in dict.pop()

2016-12-07 Thread Xiang Zhang
Xiang Zhang added the comment: This is the same problem as #28147. -- nosy: +xiang.zhang resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Unbounded memory growth resizing split-table dicts ___ Python tr

[issue28147] Unbounded memory growth resizing split-table dicts

2016-12-07 Thread Xiang Zhang
Xiang Zhang added the comment: __dict__.pop seems not uncommon. Searching Github could give many practical codes using it. And many of them are acting as generic containers and could be used against massive cases. -- ___ Python tracker <h

[issue28921] Make str.count one character for latin1 string faster

2016-12-09 Thread Xiang Zhang
New submission from Xiang Zhang: I make a try to improve str.count one character for latin1 string. From benchmark, it could enhance the speed depending on the length of the string. # short one, a little regression ./python3 -m perf timeit --compare-to ~/cpython/python -s 's=&qu

[issue28921] Make str.count one character for latin1 string faster

2016-12-09 Thread Xiang Zhang
Xiang Zhang added the comment: > I understand that count() is only used when the old and new patterns of > str.replace() have a different length. Yes. I thought it won't help much since str.replace get many operations. But for long string, looks good: ./python3 -m perf timeit -

[issue28930] bytes_methods.c won't recompile if related stringlib/* changed

2016-12-09 Thread Xiang Zhang
New submission from Xiang Zhang: bytes_methods.c includes files in stringlib, for example, stringlib/count.h. But if count.h changes, simply running make won't recompile bytes_methods.c and the methods of bytes remain unchanged. You have to make distclean and compile from sc

[issue28930] bytes_methods.c won't recompile if related stringlib/* changed

2016-12-09 Thread Xiang Zhang
Changes by Xiang Zhang : -- assignee: -> xiang.zhang keywords: +patch stage: needs patch -> patch review type: behavior -> versions: +Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45829/Makefile-bytes-meth

[issue28930] bytes_methods.c won't recompile if related stringlib/* changed

2016-12-10 Thread Xiang Zhang
Xiang Zhang added the comment: > Alternatively just BYTESTR_DEPS can be used instead of BYTESMETHODS_DEPS. > This would make easier moving implementations between bytesobject.c and > bytes_methods.c. Yes. The only downside of this is some changes may recompile bytes_methods.c unne

[issue28943] Use PyUnicode_MAX_CHAR_VALUE instead of PyUnicode_KIND in some API's short path

2016-12-12 Thread Xiang Zhang
New submission from Xiang Zhang: Some unicode APIs like PyUnicode_Contains get a short path comparing kinds. But this get a problem cannot apply to ascii and latin1. PyUnicode_MAX_CHAR_VALUE could be used instead to make the short path also apply to ascii and latin1. This skill is already

[issue28943] Use PyUnicode_MAX_CHAR_VALUE instead of PyUnicode_KIND in some API's short path

2016-12-12 Thread Xiang Zhang
Xiang Zhang added the comment: I know the difference and thought the overhead should be tiny (not in a critical part). But benchmarks show it's not. :-( -- stage: patch review -> resolved status: open -> closed ___ Python tra

[issue28943] Use PyUnicode_MAX_CHAR_VALUE instead of PyUnicode_KIND in some API's short path

2016-12-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> rejected ___ Python tracker <http://bugs.python.org/issue28943> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue28921] Make str.count one character for latin1 string faster

2016-12-12 Thread Xiang Zhang
Xiang Zhang added the comment: > The code looks too complex. It is if looking at the patch alone. But the skill is used across stringlib and the only thing new is the bitwise operation. str/bytes.count is not critical but not bad if it could be optimized and especially the effect

[issue28950] -j0 fails the check -j are not allowed together with -T/-l

2016-12-12 Thread Xiang Zhang
New submission from Xiang Zhang: For python test command line arguments, -j is not allowed together with -T/-l (don't know why): [cpython]$ ./python -m test -j4 -T usage: python -m test [options] [test_name1 [test_name2 ...]] python path/to/Lib/test/regrtest.py [options] [test_

[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- title: regrtest: -j0 fails the check -j are not allowed together with -T/-l -> regrtest: -j0 fails the check -j is not allowed together with -T/-l ___ Python tracker <http://bugs.python.org/issu

[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- versions: +Python 2.7 Added file: http://bugs.python.org/file45867/test-command-line-j0-with-test.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-13 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your review kumaar.nd. :-) As for your suggestion, in this case adding can not be any harder than replacing. And the old cases could represent the truth value. -- ___ Python tracker <http://bugs.python.

[issue28930] bytes_methods.c won't recompile if related stringlib/* changed

2016-12-15 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-16 Thread Xiang Zhang
Xiang Zhang added the comment: Xavier's plan sounds good. We could increase the line length limitation to 64K and add another limitation of the maximum lines a multi-line block could contain. Any limitation is violated the connection is refused. This situation seems quite simil

[issue29008] Can't do dict comp from previously defined dict in the outermost scope of class defintion

2016-12-18 Thread Xiang Zhang
Xiang Zhang added the comment: This is by design in 3.x. You can refer #11796 for explanation. -- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status: open -> closed superseder: -> Comprehensions in a class definition mostly cannot access cla

[issue29008] Can't do dict comp from previously defined dict in the outermost scope of class defintion

2016-12-18 Thread Xiang Zhang
Xiang Zhang added the comment: Also http://stackoverflow.com/a/4199355/2189957. -- ___ Python tracker <http://bugs.python.org/issue29008> ___ ___ Python-bug

[issue29009] Outdated part in the doc of PyUnicode_RichCompare

2016-12-18 Thread Xiang Zhang
New submission from Xiang Zhang: The sentence: "Note that Py_EQ and Py_NE comparisons can cause a UnicodeWarning in case the conversion of the arguments to Unicode fails with a UnicodeDecodeError." in the doc of PyUnicode_RichCompare is not true in 3.x. Proposed patch simply

[issue29009] Outdated part in the doc of PyUnicode_RichCompare

2016-12-18 Thread Xiang Zhang
Xiang Zhang added the comment: > This sentence also is in the header. Ohh, yes. Thanks Serhiy! -- Added file: http://bugs.python.org/file45961/doc-of-PyUnicode_RichCompare_v2.patch ___ Python tracker <http://bugs.python.org/issu

[issue29009] Outdated part in the doc of PyUnicode_RichCompare

2016-12-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-19 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Victor. 2.7 is not affected since in 2.7 -j0 does not spawn processes. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___ Python track

[issue29019] dict.fromkeys overallocates when given a sparse dict

2016-12-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue29019> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-12-20 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Victor and Serhiy! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29034] refleak in path_converter on error case

2016-12-21 Thread Xiang Zhang
New submission from Xiang Zhang: It looks like the bytes variable should be Py_DECREFed on error cases as the patch shows. -- components: Library (Lib) files: path_converter.patch keywords: patch messages: 283736 nosy: haypo, steve.dower, xiang.zhang priority: normal severity: normal

[issue29034] refleak in path_converter on error case

2016-12-21 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh, I haven't read all related code so I didn't realize that's a leak. But if that is, there is still a wide = PyUnicode_AsWideCharString around the codes I altered. -- ___ Python tracker <http

[issue29034] Fix memory leak in path_converter

2016-12-21 Thread Xiang Zhang
Xiang Zhang added the comment: v2 applies the comments. And another separate change is to change PyUnicode_AsWideCharString to PyUnicode_AsUnicodeAndSize. -- title: refleak in path_converter on error case -> Fix memory leak in path_converter Added file: http://bugs.python.

[issue29034] Fix memory leak in path_converter

2016-12-21 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, while considering Victor's comment, I find some new: path->object refers to the original object o, it owns a borrowed reference. But when received a PathLike object, o is assigned the return value of __fspath__ and decrefed at end. So path->o

[issue29038] Duplicate entry for SSLContext.get_ca_certs() in ssl

2016-12-21 Thread Xiang Zhang
Xiang Zhang added the comment: The codes in py2.7 looks same as in py3.4+, so make the doc same as in py3.4+. -- keywords: +patch nosy: +christian.heimes, xiang.zhang stage: -> patch review Added file: http://bugs.python.org/file45995/duplicate-doc-entry.pa

[issue29039] Segmentation fault when using PyUnicode_FromString

2016-12-21 Thread Xiang Zhang
Xiang Zhang added the comment: Just as Christoph said, you need to initialize first. -- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29044] Use after free in string '%c' formater

2016-12-21 Thread Xiang Zhang
New submission from Xiang Zhang: In string %c formater(formatchar), when receiving an integer-like objects, the return value is decrefed immediately before use. -- components: Interpreter Core files: use-after-free.patch keywords: patch messages: 283811 nosy: haypo, xiang.zhang

[issue29045] Outdated C api doc about Windows error

2016-12-21 Thread Xiang Zhang
New submission from Xiang Zhang: https://docs.python.org/3.7/c-api/exceptions.html#c.PyErr_SetFromWindowsErrWithFilename it stills refers to PyErr_SetFromWindowsErrWithFilenameObject but this function doesn't exist since Py3.4. I didn't find when and why it's dele

[issue29045] Outdated C api doc about Windows error

2016-12-21 Thread Xiang Zhang
Xiang Zhang added the comment: > PyErr_SetFromWindowsErrWithFilenameObject was never implemented. See issue > 11210. > Since 3.3 WindowsError is simply an alias for OSError. See PEP 3151. Ohh, thanks for the info. I don't find the implementation in 2.7 either. -- ver

[issue29044] Use after free in string '%c' formater

2016-12-21 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Serhiy and Victor. The final commits applies the comments. :-) -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29038] Duplicate entry for SSLContext.get_ca_certs() in ssl

2016-12-22 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for the report Daniel! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29062] hashlib documentation link error

2016-12-24 Thread Xiang Zhang
Xiang Zhang added the comment: Is the https://docs.python.org/3/library/crypto.html section messed up? Two hashlib entries and some other bad entries? -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue29

[issue29064] Package numpy can't be used normally

2016-12-24 Thread Xiang Zhang
Xiang Zhang added the comment: Hi kevin. This tracker is used to report problems about CPython. Your problem seems related to numpy and you'd better go to numpy's tracker to ask for help. :-) -- nosy: +xiang.zhang resolution: -> third party stage: -> resolved status

[issue29064] Package numpy can't be used normally

2016-12-24 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> third party status: open -> closed ___ Python tracker <http://bugs.python.org/issue29064> ___ ___ Python-bugs-

[issue29049] Lazy GC tracking frame

2016-12-25 Thread Xiang Zhang
Xiang Zhang added the comment: On my PC, this patch also introduces two tests failure: FAIL: test_log_destroyed_pending_task (test.test_asyncio.test_tasks.CTask_CFuture_SubclassTests) -- Traceback (most recent call last

[issue29049] Lazy GC tracking frame

2016-12-25 Thread Xiang Zhang
Xiang Zhang added the comment: I don't have time study the patches. But 29049-fix-generator-refleak.patch fixes the two test failures on my PC. :-) -- ___ Python tracker <http://bugs.python.org/is

[issue29078] Example in Section 8.1.5 time Objects is broken

2016-12-26 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. Thanks for your work Dhushyanth! It's appreciated if you could sign the CLA: https://www.python.org/psf/contrib/contrib-form/. -- assignee: docs@python -> xiang.zhang nosy: +xiang.zhang stage: -> commit review versions: -Python 3.3,

[issue29078] Example in Section 8.1.5 time Objects is broken

2016-12-26 Thread Xiang Zhang
Xiang Zhang added the comment: > Signed the CLA, but looks like it may take two days to reflect. Thanks. This change is trivial so I can push it first. ;-) -- resolution: -> fixed stage: commit review -> resolved status: open -> closed __

[issue29062] hashlib documentation link error

2016-12-26 Thread Xiang Zhang
Xiang Zhang added the comment: This fixed the index. But the section is still messed up: https://docs.python.org/3/library/crypto.html. The three entries: Module, Examples, Credits in my mind should not appear on the index. -- ___ Python tracker

[issue29062] hashlib documentation link error

2016-12-26 Thread Xiang Zhang
Xiang Zhang added the comment: > Now I think hashlib-blake2 should be merged into hashlib. +1 INADA, 3.6 branch also suffers the problems here, I didn't see you patch it. -- ___ Python tracker <http://bugs.python.org

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

2016-12-28 Thread Xiang Zhang
New submission from Xiang Zhang: The accepted types of parameter *path* are different between os.stat's doc and doc string. In doc, it mentions Pathlike, string and file descriptor. In doc string, it mentions string, bytes and file descriptor. (3.5 only lack bytes i

[issue29100] Core dump / OverflowError for datetime.fromtimestamp with overly large timestamp in Ubuntu 12.04

2016-12-28 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue29100> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-28 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your report Bozo. I think this is due to timestamp converter doesn't handle timezone now. Besides this ValueError, if I understand correctly, even if you pass a datetime object with tzinfo, with microsecond set, the returned datetime object is a

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: I would prefer add the support for timezone since the current behaviour seems not correct to me. If you'd like to work on it, don't forget to add a test case and sign the CLA. But I am not sure this should be treated as a bug or new feature. -

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: import sqlite3, datetime c = sqlite3.connect(':memory:', detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES) cur = c.cursor() cur.execute('create table test(t timestamp)') t = datetime.datetime.now(tz=datetime.timezone.utc) cur.execute

[issue29112] questionable wording in sequences documentation

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your report Jesse. Now fixed. -- nosy: +xiang.zhang resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.5, Python 3.7 ___ Python tracker <http://bug

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