[issue29954] multiprocessing.Pool.__exit__() calls terminate() instead of close()

2017-03-31 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +davin ___ Python tracker <http://bugs.python.org/issue29954> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Xiang Zhang
Xiang Zhang added the comment: Although I prefer period but such a change could break backwards compatibility so I don't know it's worth or not. Codes like `datetime.strptime('1993-04-21 08:03:00,123', '%Y-%m-%d %H:%M:%S,%f')` (usually for such a simple parse g

[issue29965] MatchObject __getitem__() should support slicing and len

2017-04-03 Thread Xiang Zhang
Xiang Zhang added the comment: See also #24454. -- nosy: +serhiy.storchaka, xiang.zhang ___ Python tracker <http://bugs.python.org/issue29965> ___ ___ Python-bug

[issue29990] Range checking in GB18030 decoder

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

[issue29990] Range checking in GB18030 decoder

2017-04-05 Thread Xiang Zhang
Xiang Zhang added the comment: The table in wikipedia is somewhat complex. I find ftp://ftp.software.ibm.com/software/globalization/documents/gb18030m.pdf and the table in it is same as https://pan.baidu.com/share/link?shareid=2606985291&uk=3341026630 (except 0x80) but in English. I a

[issue29990] Range checking in GB18030 decoder

2017-04-05 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> patch review versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue29990> ___ _

[issue29990] Range checking in GB18030 decoder

2017-04-05 Thread Xiang Zhang
Xiang Zhang added the comment: Yes, 0x80 doesn't matter here. It's nice to make the backporting PRs. But let's wait some time for ezio and haypo's comments and reviews. Get the master PR merged first and then cont

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-06 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, what do you mean by 'the raised exception is not handled properly'? Currently the exception is just propagated to the user to signal the argument seems to be wrong, right? -- nosy: +xiang.zhang ___ Pyth

[issue30007] report bug

2017-04-06 Thread Xiang Zhang
Xiang Zhang added the comment: This tracker is for CPython developing. Your problem is in the third party module. You could refer Google or stackoverflow. -- nosy: +xiang.zhang resolution: -> third party stage: -> resolved status: open -&g

[issue29996] Use terminal width by default in pprint

2017-04-06 Thread Xiang Zhang
Xiang Zhang added the comment: I use screens and usually like to open a terminal to fill the screen. One of my use case is changed by this patch from: 'manufacturers_specifications': '2U 2*Intel Xeon E5-2603 4核 8*8G '

[issue30000] Inconsistency in the zlib module

2017-04-06 Thread Xiang Zhang
Xiang Zhang added the comment: Such a change in my mind is an enhancement and only could get into 3.7. IMHO zlib.compress() and zlib.decompress() are for simple usage, zlib.compressobj() and zlib.decompressobj() for advanced usage if you want more controls. Actually I would prefer simplifying

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

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

[issue30040] new empty dict can be more small

2017-04-11 Thread Xiang Zhang
Xiang Zhang added the comment: Isn't the latter case the more common one? Creating an empty dict and then populate it. -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/is

[issue30040] new empty dict can be more small

2017-04-11 Thread Xiang Zhang
Xiang Zhang added the comment: I mean creating a solo empty dict doesn't seem to make much sense. Although it saves memory, but when it's populated, it's resized and the memory occupation comes back. And this makes PyDict_New() har

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-11 Thread Xiang Zhang
Changes by Xiang Zhang : -- type: behavior -> versions: +Python 3.7 ___ Python tracker <http://bugs.python.org/issue26985> ___ ___ Python-bugs-list mai

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1233 ___ Python tracker <http://bugs.python.org/issue26985> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset a6902e662c18dc837d40664eaafe50a44aae6366 by Xiang Zhang in branch 'master': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) https://github.com/python/cpython/commit/a6902e662c18dc837d40664eaafe50

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1242 ___ Python tracker <http://bugs.python.org/issue26985> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1243 ___ Python tracker <http://bugs.python.org/issue26985> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 14944c62300f741488c2f28cb91ad1e3fef7343b by Xiang Zhang in branch '3.6': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1099) https://github.com/python/cpython/commit/14944c62300f741488c2f28cb91ad1

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: Hi, Antoine, after this change, I sometimes see tests fail for 3.5 branch, for example http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.5/builds/194/steps/test/logs/stdio. -- nosy: +xiang.zhang

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 72b1d419ac5f7cd9ef82ffd2ffe21aa9b34e21d2 by Xiang Zhang in branch '3.5': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1100) https://github.com/python/cpython/commit/72b1d419ac5f7cd9ef82ffd2ffe21a

[issue26985] Information about CodeType in inspect documentation is outdated

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

[issue30046] csv: Inconsistency re QUOTE_NONNUMERIC

2017-04-13 Thread Xiang Zhang
Xiang Zhang added the comment: boolean is not quoted since in Python it's a subclass of int so True and False are numeric. This is also the case with numeric objects defining __int__ or __float__ but doesn't get a corresponding string representation. Since QUOTE_NONNUMERIC will con

[issue30061] Check if PyObject_Size() raised an error

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

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-13 Thread Xiang Zhang
New submission from Xiang Zhang: In _io._IOBase.readlines, it straightly uses PyIter_Next(self). But iter(_io._IOBase) does more work than just returning itself. >>> import _io >>> f = _io._IOBase() >>> f.close() >>> f.readlines() Traceback (most rece

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-13 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1264 ___ Python tracker <http://bugs.python.org/issue30068> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30067] _osx_support.py: misplaced flags in re.sub()

2017-04-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue30067> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30067] _osx_support.py: misplaced flags in re.sub()

2017-04-14 Thread Xiang Zhang
Xiang Zhang added the comment: My fault. -- nosy: +xiang.zhang versions: -Python 2.7 ___ Python tracker <http://bugs.python.org/issue30067> ___ ___ Python-bug

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-14 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 026435ce49419a3366171416c68114dd8a1144c7 by Xiang Zhang in branch 'master': bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1130) https://github.com/python/cpython/commit/026435ce49419a3366171416c68114

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1281 ___ Python tracker <http://bugs.python.org/issue30068> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1282 ___ Python tracker <http://bugs.python.org/issue30068> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1283 ___ Python tracker <http://bugs.python.org/issue30068> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-14 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 5fbdfc36f397ad46f4057d527855dfacb77242ce by Xiang Zhang in branch '2.7': bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1152) https://github.com/python/cpython/commit/5fbdfc36f397ad46f4057d527855df

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-14 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset d5fa5f3ce7d9003bbd3975d1bf634043305ae18f by Xiang Zhang in branch '3.6': bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1130) (#1150) https://github.com/python/cpyt

[issue30068] missing iter(self) in _io._IOBase.readlines

2017-04-14 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 4f43f87b6246e13e0eefc793a2c5415c915723c3 by Xiang Zhang in branch '3.5': bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1130) (#1151) https://github.com/python/cpyt

[issue30068] missing iter(self) in _io._IOBase.readlines

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

[issue30074] compile warnings of _PySlice_Unpack in 2.7

2017-04-15 Thread Xiang Zhang
New submission from Xiang Zhang: Compile 2.7 now get many warning about _PySlice_Unpack, not in 3.x. See an example: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%202.7/builds/109/steps/compile/logs/warnings%20%2822%29. -- messages: 291708 nosy: serhiy.storchaka

[issue30081] Inconsistent handling of failure of PyModule_AddObject

2017-04-16 Thread Xiang Zhang
New submission from Xiang Zhang: The doc of PyModule_AddObject()[1] states it steals a reference to *value*. But this is only the case when it succeed. On failure the reference is not stolen. The usages of it across the code base are inconsistent. Some realizes this situation and depends on

[issue30081] Inconsistent handling of failure of PyModule_AddObject

2017-04-16 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh, I am not alone. :-) -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Change weird behavior of PyModule_AddObject() ___ Python tracker <http://bugs.python

[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2017-04-16 Thread Xiang Zhang
Changes by Xiang Zhang : -- components: +Library (Lib) -Extension Modules versions: +Python 3.7 -Python 3.6 ___ Python tracker <http://bugs.python.org/issue30

[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2017-04-16 Thread Xiang Zhang
Xiang Zhang added the comment: Anyway, such a function addition could only get into 3.7. -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue30

[issue30110] test_asyncio reports reference leak

2017-04-19 Thread Xiang Zhang
New submission from Xiang Zhang: Running test suite with refleak hunter reports test_asyncio leaks referrences: 0:00:00 [1/1] test_asyncio Executing .start() done, defined at /home/angwer/repos/cpython/Lib/test/test_asyncio/test_pep492.py:150> result=None created at /home/angwer/re

[issue30115] test_logging report reference leak

2017-04-20 Thread Xiang Zhang
New submission from Xiang Zhang: 0:00:00 [1/1] test_logging beginning 9 repetitions 123456789 . test_logging leaked [24, -24, 1, 24] memory blocks, sum=25 test_logging failed in 3 min 15 sec 1 test failed: test_logging Seems d61910c598876788c9b4bf0e116370bbfc5a2f85 is responsible

[issue30101] Add support for ncurses A_ITALIC

2017-04-26 Thread Xiang Zhang
New submission from Xiang Zhang: New changeset ab7886b78574d9224b26dc3a5b08e5c105fbbf11 by Xiang Zhang (Eijebong) in branch 'master': bpo-30101: Add support for curses.A_ITALIC. (#1015) https://github.com/python/cpython/commit/ab7886b78574d9224b26dc3a5b08e5c105fbbf11 -

[issue30101] Add support for ncurses A_ITALIC

2017-04-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue30101> ___

[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- assignee: docs@python components: Documentation nosy: berker.peksag, docs@python, haypo, xiang.zhang priority: normal severity: normal stage: patch review status: open title: curses attribute constants list is incomplete versions: Python 2.7, Python 3.5

[issue30176] curses attribute constants list is incomplete

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

[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Xiang Zhang
Xiang Zhang added the comment: +1 for group. I added "The exact constants available are system dependent" to note some may be absent. -- ___ Python tracker <http://bugs.python.o

[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Xiang Zhang
Xiang Zhang added the comment: I can't find any official, portable doc about the details so I don't prefer to have them. I support bit-masks are different. Previously I don't what's the better way to organize them, now I have a try. Ple

[issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad

2017-04-26 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 88c38b32b761cb566759b8ad96704bff590a1de9 by Xiang Zhang (Louie Lu) in branch 'master': bpo-28415: Note 0 conversion different between Python and C (#885) https://github.com/python/cpython/commit/88c38b32b761cb566759b8ad96704b

[issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad

2017-04-26 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.or

[issue30115] test_logging report reference leak

2017-04-26 Thread Xiang Zhang
Xiang Zhang added the comment: Seems in #30131 Victor has solved this. :-) -- nosy: +haypo resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue30131] test_logging leaks a "dangling" thread

2017-04-26 Thread Xiang Zhang
Xiang Zhang added the comment: Does this need to be backported? -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue30131> ___ ___ Python-bug

[issue21071] struct.Struct.format is bytes, but should be str

2017-04-26 Thread Xiang Zhang
Xiang Zhang added the comment: +1 for change bytes to str. But struct.Struct() accepts both bytes and str, maybe in future buffer objects. When it gets a bytes object, converting it to a str looks unnecessary to me, and as OP said, comparison (a theoretical use case) could still fail. Could

[issue21071] struct.Struct.format is bytes, but should be str

2017-04-27 Thread Xiang Zhang
Xiang Zhang added the comment: The warnings are possible to remove I think... but deprecate bytes arguments sounds good. -- ___ Python tracker <http://bugs.python.org/issue21

[issue30103] uu package uses old encoding

2017-04-27 Thread Xiang Zhang
Xiang Zhang added the comment: Looks like perl has already encoded in this way: [~]$ perl -e 'print pack("u","Ca\x00t")' $0V$`=``` > Oddly, the uu.decode function does properly decode files encoded using "`", > but encode is unable to create them.

[issue30103] uu package uses old encoding

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

[issue30103] uu package uses old encoding

2017-04-27 Thread Xiang Zhang
Xiang Zhang added the comment: There seems no standard. I also read the wikipedia but for perl and uuencode on my Linux, they now all use backticks to represent zero instead of spaces. [~]$ perl -e 'print pack("u","Ca\x00t")' $0V$`=``` [~]$ cat /tmp/test Ca[~]$

[issue30103] uu package uses old encoding

2017-04-27 Thread Xiang Zhang
Xiang Zhang added the comment: Uuencode has no official standards and it all depends on the implementation. For other languages, I could only find PHP, java, activetcl? have official implementation. PHP and activetcl defaults to backticks and no options. Java defaults to spaces and no options

[issue30103] uu package uses old encoding

2017-04-27 Thread Xiang Zhang
Xiang Zhang added the comment: I think "grave accent" is not suitable. Although it's the standard unicode name but it's not commonly used in programming so not direct enough. "backquote" and "backtick" seems could be used interchangeably I don't hav

[issue30103] uu package uses old encoding

2017-04-28 Thread Xiang Zhang
Xiang Zhang added the comment: token defines it as backquote. But in doc there are also several places calling it backticks[1][2]. Do you have any preference Serhiy and Martin? [1] https://docs.python.org/release/3.0.1/whatsnew/3.0.html#removed-syntax [2] https://docs.python.org/2/library

[issue30206] data parameter for binascii.b2a_base64 is not positional-only

2017-04-29 Thread Xiang Zhang
New submission from Xiang Zhang: Before functions in binascii having *data* parameter all accept it as positionaly-only. But after #25357, binascii.b2a_base64 changed it to accept keyword argument also but it looks unintentional. -- components: Library (Lib) messages: 292585 nosy

[issue30206] data parameter for binascii.b2a_base64 is not positional-only

2017-04-29 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1464 ___ Python tracker <http://bugs.python.org/issue30206> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30128] xid_start definition for Unicode identifiers refers to xid_continue

2017-04-29 Thread Xiang Zhang
Xiang Zhang added the comment: Quoting from PEP3131: XID_Start then closes this set under normalization, by removing all characters whose NFKC normalization is not of the form ID_Start ID_Continue* anymore. -- nosy: +loewis, xiang.zhang ___ Python

[issue30155] Add ability to get/set tzinfo on datetime instances in C API

2017-04-29 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue30155> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30210] No Documentation on tkinter dnd module

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

[issue30212] test_ssl.py is broken in Centos7

2017-04-30 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +haypo, xiang.zhang ___ Python tracker <http://bugs.python.org/issue30212> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30213] ZipFile from 'a'ppend-mode file generates invalid zip

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

[issue26253] tarfile in stream mode always set zlib compression level to 9

2017-04-30 Thread Xiang Zhang
Xiang Zhang added the comment: *compresslevel* takes effect for modes 'w:gz', 'r:gz', 'w:bz2', 'r:bz2', 'x:gz', 'x:bz2'. For stream modes, 'r|gz', 'w|gz', 'r|bz2', 'w|bz2', the *compresslevel* d

[issue30216] xdrlib.Unpacker.unpack_string returns bytes (docs say should be str)

2017-04-30 Thread Xiang Zhang
Xiang Zhang added the comment: xdrlib doc seems still remain in 2.x world. 'string' is used to represent 'bytes'. And some methods' names like pack_fstring, pack_string seem not suitable in 3.x world. -- nosy: +haypo, serh

[issue30195] writing non-ascii characters in xml file using python code embedded in C

2017-04-30 Thread Xiang Zhang
Xiang Zhang added the comment: IMHO this doesn't look like an error in xml library. With a little tweak in of your problem: adding encoding declaration, removing not needed imports, replace open with codecs.open(encoding='utf8') in create_report, the C problem works fine for

[issue30195] writing non-ascii characters in xml file using python code embedded in C

2017-04-30 Thread Xiang Zhang
Xiang Zhang added the comment: But I didn't see any crash either. You'd better provide a simple reproduce program, not involving so much logic. Or could you debug it and provide a crash backtrace? -- ___ Python tracker <http://bu

[issue30216] xdrlib.Unpacker.unpack_string returns bytes (docs say should be str)

2017-04-30 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> needs patch versions: +Python 3.5, Python 3.7 ___ Python tracker <http://bugs.python.org/issue30216> ___ ___ Python-

[issue30206] data parameter for binascii.b2a_base64 is not positional-only

2017-04-30 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker <http://bugs.python.or

[issue30180] PyArg_ParseTupleAndKeywords supports required keyword only arguments

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

[issue30219] webbrowser.open outputs xdg-open deprecation warning

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

[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-02 Thread Xiang Zhang
Xiang Zhang added the comment: +1. Every time when I want to run tests for 2.7, I have to type twice. Once python -m test, error and then python -m test.regrtest. -- nosy: +xiang.zhang ___ Python tracker <http://bugs.python.org/issue30

[issue30224] remove outdated checks in struct

2017-05-02 Thread Xiang Zhang
New submission from Xiang Zhang: Reading struct's code I find some checks seem outdated. They seemly exists because there are two kinds of integer in 2.x. I wrote a patch to remove them but maybe they exist for other reasons I don't see. Sorry if I misunders

[issue30224] remove outdated checks in struct

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

[issue30212] test_ssl.py is broken in Centos7

2017-05-02 Thread Xiang Zhang
Xiang Zhang added the comment: The failure can't be reproduced by me, 3.5 on CentOS 7.1. -- ___ Python tracker <http://bugs.python.org/issue30212> ___ ___

[issue30224] remove outdated checks in struct

2017-05-02 Thread Xiang Zhang
Xiang Zhang added the comment: There seems no significant regression in performance. A microbenchmark against nu_longlong: ./python3 -m perf timeit --duplicate=1000 --compare-to /home/angwer/repos/cpython/python -s 'import struct; p = struct.Struct("@L")' 'p.unpac

[issue30224] remove outdated checks in struct

2017-05-02 Thread Xiang Zhang
Xiang Zhang added the comment: The test on my box is reverse and stable, python3 is unpatched and python is patched. Anyway, it can't be called significant. ./python3 -m perf timeit --compare-to /home/angwer/repos/cpython/python -s 'import struct; u = struct.Struct("10Q

[issue30103] uu package uses old encoding

2017-05-02 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 13f1f423fac39f8f14a3ce919dd236975517d5c6 by Xiang Zhang in branch 'master': bpo-30103: Allow Uuencode in Python using backtick as zero instead of space (#1326) https://github.com/python/cpython/commit/13f1f423fac39f8f14a3ce919dd236

[issue30103] uu package uses old encoding

2017-05-02 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue30103> ___

[issue30110] test_asyncio reports reference leak

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

[issue30242] resolve undefined behaviour in struct

2017-05-02 Thread Xiang Zhang
New submission from Xiang Zhang: In struct there are several places using code like: p[--i] = (char)x; to extract the least significant byte from a long. Although this behaviour seems to apply to common implementations but it does not conform to C standard. -- components: Library

[issue30242] resolve undefined behaviour in struct

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

[issue30242] resolve undefined behaviour in struct

2017-05-02 Thread Xiang Zhang
Xiang Zhang added the comment: > I think it is better to change the type of p to unsigned char. Good advice. -- ___ Python tracker <http://bugs.python.org/issu

[issue30242] resolve undefined behaviour in struct

2017-05-02 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, do we need to? Currently all pack routines accept a char *p. Converting it to unsigned char * inside could also solve the problem. -- ___ Python tracker <http://bugs.python.org/issue30

[issue30245] possible overflow when organize struct.pack_into error message

2017-05-03 Thread Xiang Zhang
New submission from Xiang Zhang: In #29649, struct.pack_into's error message was improved. But the message could be confusing encountering a large offset due to overflow: >>> struct.pack_into('I', bytearray(10), sys.maxsize, 1) Traceback (most recent call last

[issue30246] fix several error messages in struct

2017-05-03 Thread Xiang Zhang
New submission from Xiang Zhang: There are several error messages only mention bytes. But they may also accept string or other bytes-like objects. -- components: Library (Lib) messages: 292854 nosy: xiang.zhang priority: normal severity: normal stage: patch review status: open title

[issue30246] fix several error messages in struct

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

[issue30249] improve struct.unpack_from's error message like struct.pack_into

2017-05-03 Thread Xiang Zhang
New submission from Xiang Zhang: In #29649, the error message of struct.pack_into was improved. Since pack_into was changed, I think it's also worth improving unpack_from. -- components: Library (Lib) messages: 292862 nosy: xiang.zhang priority: normal severity: normal stage:

[issue23816] struct.unpack returns null pascal strings - [first] bug report

2017-05-03 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, code->size is determined by repeat count at initilization stage so I don't understand why it should be updated in s_unpack_internal to 255. And the repro script works well for me. -- nosy: +xiang.zhang resolution: -> not a bug stage:

[issue23816] struct.unpack returns null pascal strings - [first] bug report

2017-05-03 Thread Xiang Zhang
Xiang Zhang added the comment: Note in the doc: Note that for unpack(), the 'p' format character consumes count bytes I think this means you still need to specify the repeat count for unpacking 'p'. -- ___ Python tracker <

[issue23816] struct.unpack returns null pascal strings - [first] bug report

2017-05-03 Thread Xiang Zhang
Changes by Xiang Zhang : -- Removed message: http://bugs.python.org/msg292958 ___ Python tracker <http://bugs.python.org/issue23816> ___ ___ Python-bugs-list m

[issue23816] struct.unpack returns null pascal strings - [first] bug report

2017-05-03 Thread Xiang Zhang
Changes by Xiang Zhang : -- Removed message: http://bugs.python.org/msg292959 ___ Python tracker <http://bugs.python.org/issue23816> ___ ___ Python-bugs-list m

[issue23816] struct.unpack returns null pascal strings - [first] bug report

2017-05-03 Thread Xiang Zhang
Xiang Zhang added the comment: My previous two messages are not clear enough so I delete them. Sorry for the noise. :-( When unpacking a pascal string, you cannot simply specify a p format character otherwise struct calculate a wrong size of the format. That's why unpack fails. When

[issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack

2017-05-05 Thread Xiang Zhang
New submission from Xiang Zhang: The default value for stop in PySlice_Unpack should be -PY_SSIZE_T_MAX-1. Otherwise a sequence of length PY_SSIZE_T_MAX could get a wrong slicelength when doing L[::-1]. -- components: Interpreter Core messages: 293097 nosy: serhiy.storchaka

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