[issue29453] Remove reference to undefined dictionary ordering in Tutorial

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

[issue29453] Remove reference to undefined dictionary ordering in Tutorial

2017-02-05 Thread Xiang Zhang
Xiang Zhang added the comment: David, actually I have the same thoughts as Jim. Ordered ordinary dicts is not a feature but ordered **kwargs is in 3.6. They seems not the same thing. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29453] Remove reference to undefined dictionary ordering in Tutorial

2017-02-05 Thread Xiang Zhang
Changes by Xiang Zhang : -- assignee: docs@python -> serhiy.storchaka ___ Python tracker <http://bugs.python.org/issue29453> ___ ___ Python-bugs-list mai

[issue29454] Shutting down consumer on a remote queue

2017-02-05 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +davin type: -> behavior ___ Python tracker <http://bugs.python.org/issue29454> ___ ___ Python-bugs-list mailing list Un

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

2017-02-05 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Milt. I committed with my change not because it's better, but I want to make the change small so others won't get unfamiliar with the new code. :-) -- resolution: -> fixed stage: commit review -> resolved status

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

2017-02-05 Thread Xiang Zhang
Xiang Zhang added the comment: I am fine with any version (both are simple and not the hardest part to understand in the logic). :-) I have no opinion on which is better. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29456] bug in unicodedata.normalize: u1176

2017-02-05 Thread Xiang Zhang
Xiang Zhang added the comment: How about the third character's range? The code seems assuming it's [11a7..11c3] while the spec is [11a8..11c2]? >>> unicodedata.normalize("NFC", "\u1100\u1175\u11a7") '기' while

[issue29457] strftime('%x') does not use my locale

2017-02-05 Thread Xiang Zhang
Xiang Zhang added the comment: I doubt the info belongs to datetime module documentation. When you encounter locale related problems maybe it's better for you to refer locale module documentation, and it mentions this behaviour https://docs.python.org/3/library/locale.html#background-de

[issue29458] random.seed version=1 behavior

2017-02-05 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +haypo, mark.dickinson, rhettinger ___ Python tracker <http://bugs.python.org/issue29458> ___ ___ Python-bugs-list mailin

[issue29466] pickle does not serialize Exception __cause__ field

2017-02-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +serhiy.storchaka ___ Python tracker <http://bugs.python.org/issue29466> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29438] use after free in key sharing dict

2017-02-07 Thread Xiang Zhang
Xiang Zhang added the comment: > if (was_shared && (cached = CACHED_KEYS(tp)) != NULL && cached != > ((PyDictObject *)dict)->ma_keys) +1 on this and I think the deletion should also use if ((cached = CACHED_KEYS(tp) != NULL) -- _

[issue29438] use after free in key sharing dict

2017-02-07 Thread Xiang Zhang
Xiang Zhang added the comment: I left one review about the comment on Rietvied last patch. :-) -- ___ Python tracker <http://bugs.python.org/issue29438> ___ ___

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Xiang Zhang
Xiang Zhang added the comment: 3.6 LGTM. 3.7 is technically right to me. But it looks to me AC shouldn't call path_cleanup in .c.h. It always do nothing. -- ___ Python tracker <http://bugs.python.org/is

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Xiang Zhang
Xiang Zhang added the comment: > If PyObject_New(ScandirIterator, &ScandirIteratorType) fails the path should > be cleaned up by Argument Clinic. Ohh yes. My stupid. Then both LGTM. -- stage: patch review -> commit review ___ Python t

[issue29536] test_hashlib failure on Ubuntu 16.04

2017-02-14 Thread Xiang Zhang
Xiang Zhang added the comment: I am using 16.10 but I can't reproduce the failures. Sachin can you reliably reproduce the failures? And one thing interesting is that all the failed test cases need the network source to be enabled but your command doesn't do that, it's better

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Xiang Zhang
Xiang Zhang added the comment: The documentation[1] explicitly states using % to do string format could be error-prone and recommends using str.format(). So +1 on no change in maintenance branches. [1] https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting

[issue29568] undefined parsing behavior with the old style string formatting

2017-02-15 Thread Xiang Zhang
Xiang Zhang added the comment: Or even not fix it in develop branch. -- ___ Python tracker <http://bugs.python.org/issue29568> ___ ___ Python-bugs-list mailin

[issue28806] Improve the netrc library

2017-02-15 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +89 ___ Python tracker <http://bugs.python.org/issue28806> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2017-02-15 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. -- ___ Python tracker <http://bugs.python.org/issue29347> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2017-02-15 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +90 ___ Python tracker <http://bugs.python.org/issue29347> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29559] Detect mouse over lines on canvas while mouse button is down

2017-02-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +gpolo, serhiy.storchaka ___ Python tracker <http://bugs.python.org/issue29559> ___ ___ Python-bugs-list mailing list Unsub

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

2017-02-19 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset d0e8212ed70445cc3d48b0d4ae7c9cb480004010 by GitHub in branch 'master': bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (#128) https://github.com/python/cpython/commit/d0e8212ed70445cc3d48b0d4ae7c9c

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

2017-02-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +152 ___ Python tracker <http://bugs.python.org/issue29347> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2017-02-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +153 ___ Python tracker <http://bugs.python.org/issue29347> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2017-02-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +154 ___ Python tracker <http://bugs.python.org/issue29347> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29562] test_getgroups of test_posix fails (on OS X 10.10)

2017-02-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +ned.deily, ronaldoussoren ___ Python tracker <http://bugs.python.org/issue29562> ___ ___ Python-bugs-list mailing list Unsub

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

2017-02-19 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 7131a73f9655cfd325c798385905326f57b94640 by GitHub in branch '2.7': bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (#128) (#187) https://github.com/python/cpyt

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

2017-02-19 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 7c95a94c3ab41e4296e94335d66b2400ad16f052 by GitHub in branch '3.5': bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (#128) (#188) https://github.com/python/cpyt

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

2017-02-19 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 9a4577a4bb23888fed2cf192cf1a4c95ce5c26f8 by GitHub in branch '3.6': bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (#128) (#186) https://github.com/python/cpyt

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

2017-02-19 Thread Xiang Zhang
Xiang Zhang added the comment: Although no feedback from Saida, but IMHO the problem is solved so I close it now. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

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

2017-02-19 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +155 ___ Python tracker <http://bugs.python.org/issue27660> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2017-02-19 Thread Xiang Zhang
Xiang Zhang added the comment: I opened a PR on GitHub for this issue. Hope Raymond you could review it some time. -- versions: +Python 3.7 -Python 3.6 ___ Python tracker <http://bugs.python.org/issue27

[issue29589] test_asyncio & test_multiprocessing_forkserver failed

2017-02-20 Thread Xiang Zhang
Xiang Zhang added the comment: Hi Dima, can you stably reproduce the failures? Or try with the latest 3.6 code? -- nosy: +xiang.zhang stage: -> test needed ___ Python tracker <http://bugs.python.org/issu

[issue29595] Expose max_queue_size in ThreadPoolExecutor

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

[issue29596] Unfinished sentense in howto/clinic.rst

2017-02-20 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +larry stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue29596> ___ ___ Python-bugs-list mailing list Un

[issue29602] complex() on object with __complex__ function loses sign of zero imaginary part

2017-02-20 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue29602> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2017-02-20 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your time Raymond. :-) I applied your suggestions in the PR. -- ___ Python tracker <http://bugs.python.org/issue27

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

2017-02-20 Thread Xiang Zhang
Xiang Zhang added the comment: Sorry, I have the commit bit and know what to do with a commit. So I assign it to myself and wait someone approve the PR on GitHub. -- assignee: Mariatta -> xiang.zhang stage: patch review -> commit review ___

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

2017-02-20 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your confirmation Saida! :-) -- ___ Python tracker <http://bugs.python.org/issue29347> ___ ___ Python-bugs-list mailin

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

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

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

2017-02-21 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 4cee049f5b6864066b8315e9b54de955e5487dfc by GitHub in branch 'master': bpo-27660: remove unnecessary overflow checks in list_resize (GH-189) https://github.com/python/cpython/commit/4cee049f5b6864066b8315e9b54de9

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-21 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +194 ___ Python tracker <http://bugs.python.org/issue7769> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29589] test_asyncio & test_multiprocessing_forkserver failed

2017-02-21 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, it seems not Python's fault. I can't reproduce the failure either. So I am going to close this issue. -- resolution: -> works for me stage: test needed -> resolved status: open -> closed ___ Py

[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

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

[issue10938] Provide links to system specific strftime/ptime docs

2017-02-22 Thread Xiang Zhang
Xiang Zhang added the comment: I agree with Berker and Jim here. I think the current doc is clear enough so mark this as rejected. :-( -- nosy: +xiang.zhang resolution: -> rejected stage: patch review -> resolved status: open -> closed _

[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-22 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +197 ___ Python tracker <http://bugs.python.org/issue29376> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-02-22 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang versions: -Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue29619> ___ ___ Python-bugs-list m

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-22 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +paul.j3 ___ Python tracker <http://bugs.python.org/issue29553> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29549] Improve docstring for str.index

2017-02-22 Thread Xiang Zhang
Xiang Zhang added the comment: Lisa, could you make a PR? It could let more developers see your patch. -- nosy: +xiang.zhang stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issu

[issue29650] abstractmethod does not work when deriving from Exception

2017-02-25 Thread Xiang Zhang
Xiang Zhang added the comment: Yes. This is the case for builtin types which usually get their own __new__ methods. See #5996. -- dependencies: +abstract class instantiable when subclassing dict nosy: +xiang.zhang versions: +Python 3.5, Python 3.7

[issue29657] os.symlink: FileExistsError shows wrong message

2017-02-26 Thread Xiang Zhang
Xiang Zhang added the comment: I concur the current message is misleading. OSError makes the string "file1 -> file2". This also affects other methods calling `path_error2()` such as os.link(). -- nosy: +xiang.zhang versions: +Python 3.

[issue29652] Fix evaluation order of keys/values in dict comprehensions

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

[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +290 ___ Python tracker <http://bugs.python.org/issue29376> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +289 ___ Python tracker <http://bugs.python.org/issue29376> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29376] threading._DummyThread.__repr__ raises AssertionError

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

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +291 ___ Python tracker <http://bugs.python.org/issue29661> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- assignee: -> xiang.zhang nosy: +xiang.zhang stage: -> patch review versions: +Python 3.7 ___ Python tracker <http://bugs.python.org/i

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- versions: +Python 3.6, Python 3.7 ___ Python tracker <http://bugs.python.org/issue29662> ___ ___ Python-bugs-list mailing list Unsub

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- assignee: xiang.zhang components: Documentation nosy: xiang.zhang priority: normal severity: normal stage: patch review status: open title: Fix wrong indentation of timeit.Timer's documenation ___ Python tracker

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +292 ___ Python tracker <http://bugs.python.org/issue29662> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29662] Fix wrong indentation of timeit.Timer's documenation

2017-02-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +293 ___ Python tracker <http://bugs.python.org/issue29662> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29662] Fix wrong indentation of timeit.Timer's documenation

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

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-27 Thread Xiang Zhang
Xiang Zhang added the comment: Of course that is okay. I didn't do what you propose since I thought it's somewhat superfluous, what is returned is mentioned below. I choose 'calculate' when I see 'Automatically determine how many times to call timeit

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-27 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +302 ___ Python tracker <http://bugs.python.org/issue29661> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29661] Typo in the docstring of timeit.Timer.autorange

2017-02-27 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Raymond! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-27 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Raymond. I would like to keep the example style another issue, not this one. :-) And I hope someone is willing to review the PR. -- assignee: -> xiang.zhang stage: needs patch -> patch review versions: +Python 3.7 -Pyth

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2017-02-28 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks everyone involved! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.o

[issue29676] verbose output of test_cprofile

2017-02-28 Thread Xiang Zhang
New submission from Xiang Zhang: Recently when I run the test suite test_cprofile always produces some verbose info but won't fail. This is not the case before. I am not sure this is a bug or not. git bisect tells me https://github.com/python/cpython/c

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-28 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +310 ___ Python tracker <http://bugs.python.org/issue28598> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-28 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue26867] test_ssl test_options fails on ubuntu 16.04

2017-02-28 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +311 ___ Python tracker <http://bugs.python.org/issue26867> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26867] test_ssl test_options fails on ubuntu 16.04

2017-02-28 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7 ___ Python tracker <http://bugs.python.or

[issue28728] test_host_resolution in test_socket fails

2017-03-02 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +343 ___ Python tracker <http://bugs.python.org/issue28728> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27137] functools.partial: Inconsistency between Python and C implementations

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

[issue5996] abstract class instantiable when subclassing dict

2016-05-30 Thread Xiang Zhang
Xiang Zhang added the comment: I think subclassing builtin types and making it abstract is rare. And when there is a need, we can mimic this in application level (this may also apply to types having custom __new__): In [2]: class CustomDict(dict, metaclass=abc.ABCMeta): ...: def

[issue27164] zlib can't decompress DEFLATE using shared dictionary

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

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Xiang Zhang
Xiang Zhang added the comment: This seems related with the difference between zlib format and raw format. When you do raw inflate, you have to inflateSetDictionary before any inflate. You cannot rely on the first inflate to return Z_NEED_DICT and then do inflateSetDictionary. Although I have

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Xiang Zhang
Xiang Zhang added the comment: I think my conclusion in last message is right. A similar bug in CPAN can be found in https://rt.cpan.org/Public/Bug/Display.html?id=36046. And I can find in zlib's changelog inflateSetDictionary starts to support raw inflate from 1.2.2.1. Patch attache

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Xiang Zhang
Xiang Zhang added the comment: Forget to add test. Upload a new one with test included. -- Added file: http://bugs.python.org/file43085/issue27164_with_test.patch ___ Python tracker <http://bugs.python.org/issue27

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-01 Thread Xiang Zhang
Xiang Zhang added the comment: Yes. It's compression object not compress. I find more. The overflow checking is introduced to solve problem in issue8650. It seems the explicit overflow checking is introduced to keep compatibility with py2 (py2 raises the overflowerror in pyargparse

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-01 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your review, Martin. :) I have replied with after thinking and try. Yes, this is more like a feature request. But for the end user, this behaviour is quite like a bug. > If we were to add full support of inflateSetDictionary() for raw deflate >

[issue27181] Add geometric mean to `statistics` module

2016-06-02 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +steven.daprano ___ Python tracker <http://bugs.python.org/issue27181> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-02 Thread Xiang Zhang
Xiang Zhang added the comment: I'd like to help but it'll need some time. And I'd like to start after issue27164 is solved. zdict now also checks for 4GB limit. -- ___ Python tracker <http://bugs.pyt

[issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc

2016-06-03 Thread Xiang Zhang
Xiang Zhang added the comment: Serhiy, actually the patch(issue26915_s2.patch) I uploaded early has tried to make Sequence.index and Sequence.count consistent. Maybe the issue stage is not right. -- ___ Python tracker <http://bugs.python.

[issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc

2016-06-04 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for review Serhiy and nice thoughts. I make the class inherited directly from Sequence. So if the methods in Sequence are OK, the test class is OK. -- Added file: http://bugs.python.org/file43189/issue26915_v3.patch

[issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc

2016-06-04 Thread Xiang Zhang
Xiang Zhang added the comment: Oh, sorry. Make the __len__ signature wrong. Change it. -- Added file: http://bugs.python.org/file43190/issue26915_v4.patch ___ Python tracker <http://bugs.python.org/issue26

[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-04 Thread Xiang Zhang
New submission from Xiang Zhang: Docstrings of Sequence and MutableSequence in collections.abc says "Concrete subclasses must provide __new__ and __init__". This seems not the truth. Not providing __new__ and __init__ is also OK. -- messages: 267249 nosy: rhettinger, x

[issue27225] Potential refleak in type_new when setting __new__ fails

2016-06-04 Thread Xiang Zhang
New submission from Xiang Zhang: As the title, there seems to be a potential refleak in type_new when setting __new__ fails. -- files: refleak_in_type_new.patch keywords: patch messages: 267382 nosy: xiang.zhang priority: normal severity: normal status: open title: Potential refleak in

[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-05 Thread Xiang Zhang
Xiang Zhang added the comment: It looks good. I don't think that is a matter since usually I will do a search before change. But of course extracting them to a subroutine helps. -- ___ Python tracker <http://bugs.python.org/is

[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Xiang Zhang
Xiang Zhang added the comment: @skip_if_broken_ubuntu_ssl doesn't work in this case. `hasattr(ssl, 'PROTOCOL_SSLv2')` returns False. -- ___ Python tracker <http://bugs.pyt

[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

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

[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-06 Thread Xiang Zhang
Xiang Zhang added the comment: I am confused why this could happen. On x86 platform, you can not even create a string of size 0x. On x64 platform, I don't think strlen(s) + 3 can lead to overflow where s is of size Py_ssize_t. -- ___ P

[issue27247] telnetlib AttributeError: 'error' object has no attribute 'errno' (handling of select.error)

2016-06-07 Thread Xiang Zhang
Xiang Zhang added the comment: In py2, select.error is a stand alone exception while in py3 it's an alias of OSError. This difference seems not noticed when introduced in 872afada51b0. -- nosy: +gregory.p.smith, xiang.zhang ___ Python tracker

[issue27248] Possible refleaks in PyType_Ready in error condition

2016-06-07 Thread Xiang Zhang
New submission from Xiang Zhang: As the title, in add_* used in PyType_Ready, the reference counts are not decreased when adding them to dict fails. -- files: refleak_in_pytype_ready.patch keywords: patch messages: 267607 nosy: serhiy.storchaka, xiang.zhang priority: normal severity

[issue27261] io.BytesIO.truncate does not work as advertised

2016-06-07 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +alexandre.vassalotti, serhiy.storchaka ___ Python tracker <http://bugs.python.org/issue27261> ___ ___ Python-bugs-list mailin

[issue27261] io.BytesIO.truncate does not work as advertised

2016-06-07 Thread Xiang Zhang
Xiang Zhang added the comment: Is this a bug or a documentation matter? Inspecting BytesIO.truncate's code, it does resizing similar to list, this seems to be a designed feature, which conflicts with the documented behaviour. -- nosy: +xiang.

[issue26985] Information about CodeType in inspect documentation is outdated

2016-06-09 Thread Xiang Zhang
Xiang Zhang added the comment: So maybe remove the docstring entirely? -- ___ Python tracker <http://bugs.python.org/issue26985> ___ ___ Python-bugs-list mailin

[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-06-10 Thread Xiang Zhang
Xiang Zhang added the comment: I think your expiringdict seems not work with the C version OrderedDict, you may need to change your implementation or clarify that :(. The C version's OrderedDict.popitem may call your __getitem__ which then does deletion and emit KeyError when expires. I

[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-06-10 Thread Xiang Zhang
Xiang Zhang added the comment: Raymond, In single threaded case popitem may still fail. I want to correct my last message that popitem does not fail in this case because it calls __getitem__ but instead it calls __contains__[1]. In __contains__ it deletes the item since it expires, and

[issue27299] urllib does not splitport while putrequest realhost to HTTP headers

2016-06-11 Thread Xiang Zhang
Xiang Zhang added the comment: The standard[1] says the Host header is OK to include port. Why not use 'https://www.github.com'? [1] https://tools.ietf.org/html/rfc7230#section-5.4 -- nosy: +xiang.zhang ___ Python tracker <http://bu

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