[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
Robert Xiao added the comment: I noticed that the official installer seems to be built using an entirely different process, as it produces a single-file .pkg in xar format with an embedded Distribution file, rather than an .mpkg directory. Is there documentation on how these packages

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
Change by Robert Xiao : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue46548> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Robert Xiao
New submission from Robert Xiao : I am building unofficial macOS packages for personal use. My main build machine is running macOS Monterey 12.1 and Xcode 13.2.1. I recently attempted to build Python 3.8.12 as a package using build-installer.py. This worked fine after a bit of dependency

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-15 Thread Robert Xiao
Robert Xiao added the comment: Could this be solvable if `closefd` were a writable attribute? Then we could do file = None try: file = io.open(fd, ..., closefd=False) file.closefd = True except: if file and not file.closefd: os.close(fd

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-12 Thread Robert Xiao
New submission from Robert Xiao : tempfile.NamedTemporaryFile creates its wrapper like so: try: file = _io.open(fd, mode, buffering=buffering, newline=newline, encoding=encoding, errors=errors) return _TemporaryFileWrapper(file, name, delete

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-10-29 Thread Robert Xiao
Robert Xiao added the comment: I just started a new project, thoughtlessly decided to use `shelve` to store data, and lost it all again thanks to this bug. To reiterate: Although `gdbm` might fix this issue, it's not installed by default. But the issue is with `dbm`: Python is allowing me

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-29 Thread Robert Xiao
Robert Xiao <nneon...@gmail.com> added the comment: So we have some other problems then: (1) It should be documented in dbm, and ideally in shelve, that keys/values over a certain limit might not work. Presently there is no hint that such a limit exists, and until you mentione

[issue33090] race condition between send and recv in _ssl with non-zero timeout

2018-03-16 Thread Robert Xiao
New submission from Robert Xiao <nneon...@gmail.com>: Environment: Several versions of Python (see below), macOS 10.12.6 The attached script creates an SSL echo server (fairly standard), connects to the server, and spawns a read and write thread. The write thread repeatedly shovel

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-14 Thread Robert Xiao
Robert Xiao <nneon...@gmail.com> added the comment: (Note: the contextlib stuff is just for Python 2 compatibility, it's not necessary on Python 3). -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-14 Thread Robert Xiao
New submission from Robert Xiao <nneon...@gmail.com>: Environment: Python 3.6.4, macOS 10.12.6 Python 3's dbm appears to corrupt the key index on macOS if objects >4KB are inserted. Code: <<<<<<<<<<< import dbm import contextlib with conte

[issue29427] Option to skip padding for base64 urlsafe encoding/decoding

2017-08-03 Thread Robert Xiao
Robert Xiao added the comment: This sounds reasonable. I ran into a similar issue today trying to decode a JSON Web Key. Although I don't have any real say, I'd say that if you put together a patch it may have a higher chance to get reviewed. I wonder about the following: - What about adding

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-19 Thread Robert Xiao
Robert Xiao added the comment: New patch with proper line lengths in documentation. -- Added file: http://bugs.python.org/file45967/fromhex.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-19 Thread Robert Xiao
Robert Xiao added the comment: OK, I've attached a new version of the patch with the requested documentation changes (versionchanged and whatsnew). -- Added file: http://bugs.python.org/file45966/fromhex.patch ___ Python tracker <

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-17 Thread Robert Xiao
Robert Xiao added the comment: I see your point, Nick. Can I offer a counterpoint? Most of the string parsers operate only on relatively short inputs, like numbers. Numbers in particular are rarely written with inner spaces, so it makes sense not to ignore internal whitespaces. On the other

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-16 Thread Robert Xiao
Robert Xiao added the comment: Sorry, I should have clarified that these methods consider *ASCII whitespace* equivalent - just like my proposed patch. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-16 Thread Robert Xiao
Robert Xiao added the comment: Terry, can you elaborate what you mean by a tradeoff? I feel like such a patch makes .fromhex more consistent with other string methods like .split() and .strip() which implicitly consider all whitespace equivalent. Martin, I've updated the patch to include

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-09 Thread Robert Xiao
Robert Xiao added the comment: I used Py_ISSPACE, which uses the .strip() default charset - I think this is a reasonable choice. We don't have to go crazy and support all the Unicode spaces. -- ___ Python tracker <rep...@bugs.python.org>

[issue28927] bytes.fromhex should ignore all whitespace

2016-12-09 Thread Robert Xiao
New submission from Robert Xiao: bytes.fromhex ignores space characters now (yay!) but still barfs if fed newlines or tabs: >>> bytes.fromhex('ab\ncd') Traceback (most recent call last): File "", line 1, in ValueError: non-hexadecimal number found in fromhex(

[issue10109] itertools.product with infinite iterator cause MemoryError.

2016-09-17 Thread Robert Xiao
Robert Xiao added the comment: It wouldn't be that complicated to have the combinatorial functions be lazy too - I feel like there's some value to be had there. What's the major objection to making all of the itertools functions "maximally

[issue10109] itertools.product with infinite iterator cause MemoryError.

2016-09-17 Thread Robert Xiao
Robert Xiao added the comment: I think this _is_ a bug. Most of the itertools are quite thrifty with memory, and exceptions are explicitly documented. The itertools generally only require memory proportional to the number of iterations consumed. However, `itertools.product` requires

[issue25145] urllib how-to should be updated to remove PyGoogle

2015-09-16 Thread Robert Xiao
New submission from Robert Xiao: PyGoogle has been dead for 6-7 years at this point (probably longer), yet the newest urllib documentation (https://docs.python.org/3/howto/urllib2.html#id1) still refers to it in a footnote: [1] Like Google for example. The proper way to use google from

[issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update

2013-11-01 Thread Robert Xiao
Changes by Robert Xiao nneon...@gmail.com: Removed file: http://bugs.python.org/file32320/readline.so ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18458

[issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update

2013-11-01 Thread Robert Xiao
Robert Xiao added the comment: Russell, that's not related to readline. Please file a new bug report. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18458

[issue18458] interactive interpreter crashes and test_readline fails with newer versions of libedit

2013-10-23 Thread Robert Xiao
Robert Xiao added the comment: I've attached a fixed readline.so built from today's 2.7 branch, for the convenience of anyone who upgraded to 10.9 and now has crashing Python. Drop the file in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload, replacing the original

[issue17048] calendar should understand full- vs. half-width characters

2013-01-27 Thread Robert Xiao
New submission from Robert Xiao: Try this at your command-prompt (requires utf8 support in the terminal emulator): $ python3 -m calendar -L zh_CN -e utf8 The result is a mess like this: 2013 一月二月三月 一

[issue17049] calendar throws UnicodeEncodeError when locale is specified

2013-01-27 Thread Robert Xiao
New submission from Robert Xiao: Try this at a command-prompt: $ python -m calendar -L ja_JP --encoding utf8 The result is a crash: Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py, line 162, in _run_module_as_main

[issue17048] calendar should understand full- vs. half-width characters

2013-01-27 Thread Robert Xiao
Robert Xiao added the comment: This is also a problem in Python 2.7 after the patch in issue17049 is applied. -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17048

[issue17051] Memory leak in os.path.isdir under Windows

2013-01-27 Thread Robert Xiao
New submission from Robert Xiao: [From http://stackoverflow.com/questions/12648737/huge-memory-leak-in-repeated-os-path-isdir-calls] os.path.isdir() leaks memory under Windows in Python 2.7. The core cause is this snippet: Modules/posixmodule.c:4226: if (!PyArg_ParseTuple(args, et:_isdir

[issue17051] Memory leak in os.path.isdir under Windows

2013-01-27 Thread Robert Xiao
Robert Xiao added the comment: The PSF form really needs a PDF version. Anyway, 'tis duly submitted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17051

[issue16125] open accepts arbitrary mode strings as long as they contain U

2012-10-04 Thread Robert Xiao
New submission from Robert Xiao: This issue affects Python 2.5 through 2.7, but not Python 3. open accepts basically anything for the second argument, so long as it either starts with r, w, or a, or contains U somewhere in the string. Therefore, the following are all legal in Python 2.7.3

[issue16125] open accepts arbitrary mode strings as long as they contain U

2012-10-04 Thread Robert Xiao
Changes by Robert Xiao nneon...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16125 ___ ___ Python-bugs-list

[issue13844] hg.python.org doesn't escape title attributes in annotate view

2012-01-23 Thread Robert Xiao
New submission from Robert Xiao nneon...@gmail.com: On hg.python.org, the annotate view doesn't properly escape the title attribute of the a elements, resulting in breakage on the left column: http://hg.python.org/cpython/annotate/728cfc671d15/Modules/Setup.config.in -- components

[issue13844] hg.python.org doesn't escape title attributes in annotate view

2012-01-23 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: My testing suggests that this issue is already fixed in Mercurial itself, since using hg serve on a local copy gives the expected result. Thus, the problem is probably with hg.python.org's local installation

[issue13458] _ssl memory leak in _get_peer_alt_names

2011-11-22 Thread Robert Xiao
New submission from Robert Xiao nneon...@gmail.com: _ssl.c has a memory leak in _get_peer_alt_names. The `names' object is initialized here: Modules/_ssl.c:601: if (method-it) names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, p

[issue13458] _ssl memory leak in _get_peer_alt_names

2011-11-22 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Attaching patch. -- keywords: +patch Added file: http://bugs.python.org/file23760/ssl.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13458

[issue13458] _ssl memory leak in _get_peer_alt_names

2011-11-22 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Also applies to Python 2.7. -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13458

[issue13384] Unnecessary __future__ import in random module

2011-11-11 Thread Robert Xiao
New submission from Robert Xiao nneon...@gmail.com: Lib/random.py in Python 3.2 contains the line from __future__ import division even though it is no longer necessary, as true float division is the default in Python 3. Trivial patch: --- lib/python3.2/random.py 2011-09-03 20:32

[issue13339] Missing semicolon at Modules/posixsubprocess.c:4511

2011-11-03 Thread Robert Xiao
New submission from Robert Xiao nneon...@gmail.com: Line 4511 of Modules/posixsubprocess.c is missing a semicolon, so it would not compile successfully if the relevant build flags were enabled (PYOS_OS2). Trivial patch: @@ -4508,7 +4508,7 @@ static PyObject * posix_spawnvpe(PyObject *self

[issue12576] urlib.request fails to open some sites

2011-07-23 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: S3 also doesn't send any kind of connection header at all. x-amz-id-2: WWuo30Fk2inKVcC5dH4GOjvHxnqMa5Q2+AduPm2bMhL1h3GqzOR0EPwUv0biqv2V x-amz-request-id: 3CCF6B6A000E6446 Date: Sat, 23 Jul 2011 06:42:45 GMT x-amz-meta-s3fox-filesize: 27692 x-amz

[issue12576] urlib.request fails to open some sites

2011-07-19 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Seconded. #12133 inadvertently closes the response object if the server fails to indicate Connection: close. In my case, Amazon S3 (s3.amazonaws.com) causes this problem: (Python 3.2) conn = urllib.request.urlopen('http://s3.amazonaws.com

[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao
New submission from Robert Xiao nneon...@gmail.com: From a fresh Python3.2.1 tarball: nneonneo@nneonneo-mbp:~/devel/Python-3.2.1/Lib/test$ for i in tokenize_tests-*; do echo $i; xxd $i | head -n 1; done tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt 000: efbb bf23 202d 2a2d 2063

[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Yes, it seems that way. Then the question is: why does the comment claim that it doesn't have a BOM? Also, test_tokenize.py is wrong around line 651: def test_utf8_coding_cookie_and_no_utf8_bom(self): f = 'tokenize_tests-utf8

[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Attached is a patch which fixes this. Python 3.2.1 still passes the test after applying the patch, as expected. -- keywords: +patch Added file: http://bugs.python.org/file22701/issue12587.patch

[issue12002] ftplib.FTP.abort fails with TypeError on Python 3.x

2011-05-04 Thread Robert Xiao
New submission from Robert Xiao nneon...@gmail.com: On Python 3.2, calling abort() on an ftplib.FTP object will cause an exception: ftp = ftplib.FTP('localhost') ftp.abort() Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python3.2/ftplib.py, line 246

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-12-30 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Do you have it in any kind of repository at all? Even a private SVN repo or something like that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-01-30 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: It seems like this is actually a problem in Windows libc or something (tested using MinGW on Windows XP): #include stdio.h main() { FILE *f = fopen(test, wb); fwrite(test, 1, 4, f); char buf[2048]; size_t k = fread(buf, 1, 2048

[issue7586] Typo in collections documentation

2009-12-27 Thread Robert Xiao
New submission from Robert Xiao nneon...@gmail.com: In the documentation for the namedtuple (http://docs.python.org/3.1/library/collections.html), the following phrase is incorrect: The subclass shown above sets __slots__ to an empty tuple. This keeps keep memory requirements low by preventing

[issue5762] AttributeError: 'NoneType' object has no attribute 'replace'

2009-04-15 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Have you tried this with xml.dom.minidom? -- nosy: +nneonneo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5762

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2009-04-02 Thread Robert Xiao
New submission from Robert Xiao nneon...@gmail.com: (tested and verified on Windows and Solaris SPARC) Running this code in Python 2.4, 2.5 or 2.6 (all minor versions) produces garbage. f=open(anyfile,w) f.write(garbage) f.readline() Mac OS X and Linux appear to simply throw an IOError

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2009-04-02 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: OK, it's not a memory leak, rather, it's something leaking from the files. However, this still winds up filling the affected file full of garbage, which is quite undesirable (and, I think, quite likely to be unwanted behaviour, considering

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-03-22 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: Frankly, I don't really like that idea; I think it muddles up the RE syntax to have such a group-modifying operator, and seems rather unpythonic: the existing way to do this -- use .upper(), .lower() or .title() to format the groups in a match

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-02-05 Thread Robert Xiao
Robert Xiao nneon...@gmail.com added the comment: In fact, it works for Python 2.4, 2.5, 2.6 and 3.0 from my rather limited testing. In Python 2.4: u\N{LATIN CAPITAL LETTER A} u'A' u\N{MUSICAL SYMBOL DOUBLE SHARP} u'\U0001d12a' In Python 3.0: \N{LATIN CAPITAL LETTER A} 'A' ord(\N{MUSICAL