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
Change by Robert Xiao :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46548>
___
___
Python-bugs-list mailing list
Unsubscrib
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 are
New submission from Robert Xiao :
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, PyObject *args
New submission from Robert Xiao :
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:05.0 -0400
New submission from Robert Xiao :
_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,
Robert Xiao added the comment:
Attaching patch.
--
keywords: +patch
Added file: http://bugs.python.org/file23760/ssl.patch
___
Python tracker
<http://bugs.python.org/issue13
Robert Xiao added the comment:
Also applies to Python 2.7.
--
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue13458>
___
___
Python-bug
Robert Xiao 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.urlo
New submission from Robert Xiao :
>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 6f64 696e 6
Robert Xiao 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-coding-cooki
Robert Xiao 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
___
Python tracker
Robert Xiao 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-meta-
New submission from Robert Xiao :
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 "", line 1, in
File "/usr/l
Robert Xiao 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
<http://bugs.python.org/issue2
Robert Xiao added the comment:
It seems like this is actually a problem in Windows libc or something (tested
using MinGW on Windows XP):
#include
main() {
FILE *f = fopen("test", "wb");
fwrite("test", 1, 4, f);
char buf[2048];
size_t k = frea
Robert Xiao 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
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
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
New submission from Robert Xiao :
On hg.python.org, the "annotate" view doesn't properly escape the title
attribute of the elements, resulting in breakage on the left column:
http://hg.python.org/cpython/annotate/728cfc671d15/Modules/Setup.config.in
--
components
Robert Xiao 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 loc
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 ab
New submission from Robert Xiao :
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 contextlib.closing(dbm.open(
Robert Xiao added the comment:
(Note: the contextlib stuff is just for Python 2 compatibility, it's not
necessary on Python 3).
--
___
Python tracker
<https://bugs.python.org/is
New submission from Robert Xiao :
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 shovels data into the connection
Robert Xiao 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 mentioned it I was unaware that POSIX only
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 allowi
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
Changes by Robert Xiao :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue16125>
___
___
Python-bugs-list mailing list
Unsubscri
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
一月二月三月
一
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_modu
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
<http://bugs.python.org/issue17
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, &qu
Robert Xiao added the comment:
The PSF form really needs a PDF version. Anyway, 'tis duly submitted.
--
___
Python tracker
<http://bugs.python.org/is
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 th
Changes by Robert Xiao :
Removed file: http://bugs.python.org/file32320/readline.so
___
Python tracker
<http://bugs.python.org/issue18458>
___
___
Python-bugs-list mailin
Robert Xiao added the comment:
Russell, that's not related to readline. Please file a new bug report.
--
___
Python tracker
<http://bugs.python.org/is
New submission from Robert Xiao :
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 the creation of
Robert Xiao 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 object as nece
New submission from Robert Xiao :
(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 th
Robert Xiao 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 that *some* re
Robert Xiao added the comment:
Have you tried this with xml.dom.minidom?
--
nosy: +nneonneo
___
Python tracker
<http://bugs.python.org/issue5762>
___
___
Pytho
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 i
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
<http://bugs.python.org/is
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 in
Robert Xiao added the comment:
Sorry, I should have clarified that these methods consider *ASCII whitespace*
equivalent - just like my proposed patch.
--
___
Python tracker
<http://bugs.python.org/issue28
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
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
Robert Xiao added the comment:
New patch with proper line lengths in documentation.
--
Added file: http://bugs.python.org/file45967/fromhex.patch
___
Python tracker
<http://bugs.python.org/issue28
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 a
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 an
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 &
52 matches
Mail list logo