[issue45983] PyType_Spec.name must remain valid after PyType_FromSpec

2021-12-04 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I just noticed this duplicates #45315, sorry about the noise.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> `PyType_FromSpec` does not copy the name

___
Python tracker 
<https://bugs.python.org/issue45983>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45983] PyType_Spec.name must remain valid after PyType_FromSpec

2021-12-04 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The documentation for PyType_Spec and the related functions is not clear about 
the required lifetime of fields of PyType_Spec. 

In particular, PyType_Spec.name must remain valid for the entire lifetime of 
types created with PyType_FromSpec*.  The documentation doesn't mention this.

I ran into this with code that calculates the name as needed an cleans up the 
memory used for the type spec after creating the type. The type appears to work 
fine when looking at it in Python scripts, but the tp_name slot is wrong.

--
assignee: docs@python
components: Documentation
messages: 407676
nosy: docs@python, ronaldoussoren
priority: normal
severity: normal
status: open
title: PyType_Spec.name must remain valid after PyType_FromSpec
type: behavior
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue45983>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45933] Illegal Instrution (Core Dumped)

2021-12-01 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Is arch corei7-avx compatible with your CPU? One way to test is to leave out 
-mtune=... and -march=... when building python.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45933>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24725] test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory"

2021-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The reproducer script and .c file I added earlier do not fail with "Cannot 
allocate memory" on macOS 12.0.1.

I haven't checked yet if this is enough to avoid test failures in the (now 
skipped) testFDPassEmpty.

--

___
Python tracker 
<https://bugs.python.org/issue24725>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45939] PyErr_SetObject documentation lacks mention of reference counting

2021-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The default behaviour of functions is to not steal references, in general only 
exceptions to this are documented. Likewise with return values: by default the 
result is a strong reference, and borrowed references are documented as such.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45939>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45889] pathlib: Path.match does not work on paths

2021-11-24 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I don't think our opinions about this will converge, I'm therefore leaving this 
discussion.

>> would ``Path("dir/some.py").match(Path("*.py"))`` return?
>
> str(Path("*.py")) == "*.py"
>
> So no problems here.

I do think this is a problem, treating a Path like an pattern feels wrong to me.

--

___
Python tracker 
<https://bugs.python.org/issue45889>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45889] pathlib: Path.match does not work on paths

2021-11-24 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not sure what your code tries to accomplish, does it check that 
``f.parent`` refers to the same location as ``ref_file``? A clearer solution 
for that would be ``f.parent.resolve() == ref_file.resolve()``. 



The argument to match, glob and rglob cannot be Paths because the argument is 
not a path but a pattern. Those are conceptually different.

What would ``Path("dir/some.py").match(Path("*.py"))`` return?

--

___
Python tracker 
<https://bugs.python.org/issue45889>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45889] pathlib: Path.match does not work on paths

2021-11-24 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Match doesn't match paths, but basically does a regular expression match on the 
textual representation  (using glob syntax instead of normal regular expression 
syntax).

Because of this I don't agree with your idea that anything that can match a 
path is a sub-path. 

What is your use case for this?

--

___
Python tracker 
<https://bugs.python.org/issue45889>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45889] pathlib: Path.match does not work on paths

2021-11-24 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This would definitely be a new feature and not something that can be back 
ported.

That said, I don't understand why it is desirable to use a Path as the match 
argument. That argument is a glob pattern (such as "*.py") and not a file name .

--
nosy: +ronaldoussoren
versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45889>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45839] python3 executable is able to install pandas

2021-11-23 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Could you check with "curl -k https://pypi.org/ >/dev/null" what certificate is 
used by PyPI?

On my system I get (amongst other output):

...
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=pypi.org
*  start date: Oct 22 18:55:44 2021 GMT
*  expire date: Nov 23 18:55:43 2022 GMT
*  subjectAltName: host "pypi.org" matched cert's "pypi.org"
*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Atlas R3 DV TLS CA H2 2021
*  SSL certificate verify ok.
...

Note how the issuer is GlobalSign. If you see some other certificate authority, 
or get an error from curl due to the same certificate verification problem, you 
have something on the path between you and PyPI that intercepts the connection, 
such as a corporate proxy. 

Pip appears to have a way to override certificate verification, you'll have to 
(a) read pip's manual for that and (b) be *very* sure you know what's going on 
before you start trusting some other CA that's not in the global trust root 
used by pip and certify.

--

___
Python tracker 
<https://bugs.python.org/issue45839>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45758] Crash on Py_DecRef'ing builtin object from previous run

2021-11-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

IMHO your code is buggy, as Hai Shi also indicates.

After Py_Finalize all objects in all (sub-)interpreters are deallocated unless 
there are bugs in the interpreter. Because of this "..., item should still be 
alive" in your sample code is incorrect: the reference should be considered to 
be invalid and cannot be used again.

--
nosy: +ronaldoussoren
resolution:  -> not a bug
stage:  -> resolved
status: open -> pending

___
Python tracker 
<https://bugs.python.org/issue45758>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The problem will go away when you install and use an arm64 or universal2 
variant of Python.

This is behaviour of macOS and cannot be changed in CPython.

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45793>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm assuming you run on a M1* system. 

What's the architecture for the python binary (run "file $(which python3)" in a 
shell to get this information, excluding the quotes)?

If the binary supports only x86_64 you might run into a "feature" of macOS: 
subprocesses started from a Rosetta 2 process also prefer to run in emulation.

This can also be demonstrated using the system install of perl, for example:

% perl -e 'print `arch`'
arm64

% arch -x86_64 perl -e 'print `arch`'
i386

There sadly doesn't appear to be documentation about this on Apple's site.

Note that the universal2 variants of the installers on python.org natively 
support both x86_64 and arm64.

--

___
Python tracker 
<https://bugs.python.org/issue45793>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon

2021-11-11 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Please include reproducer code in the issue itself, not on some external side.

That said, the error you're getting is related to the start method used by 
multiprocessing. On Linux the start method is fork, on macOS (and Windows) the 
start method is spawn.  The latter requires that data that's passed to the 
subprocess can be pickled.

We use the "spawn" method on macOS because forking without calling execv is 
unsafe on macOS when higher level system APIs are used.

--
nosy: +ronaldoussoren
resolution:  -> not a bug
stage:  -> resolved
status: open -> pending

___
Python tracker 
<https://bugs.python.org/issue45779>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45747] Detect dbm and gdbm dependencies in configure.ac

2021-11-08 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

dbm_open is in libc on macOS. likely due to being in SUSv2.

The implementation in libc appears to be suboptimal (for example: issue33074), 
although I wouldn't teach configure.ac to ignore the system version of the 
library.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45747>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45743] Cleanup and simplify setup.py

2021-11-08 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

1) __APPLE_USE_RFC_3542 should have been in socketmodule.c from the start, not 
sure why it was added in setup.py.

2) as you and Ned noticed -search_paths_first has been the default for a long 
while, we can just drop it and anyone building on ancient systems can add the 
flag to CFLAGs/LDFLAGS as needed.  IIRC we added the flag to be able to build 
with local copies of libraries also shipped in the OS, in particular when using 
static libraries for those local copies.

3) I don't know about detect_dbm_gdbm, and don't use those libraries myself. It 
would be nice to be able to open system files created using dbopen etc, but on 
the other hand there is at least one bug report complaining about data 
corruption when using one o the dbm extensions linked with the system version 
of the library.

4/5) Fine by me, although I'm slightly worried about using pkg-config because 
the system doesn't ship that tool. 

Something you don't mention is the logic dealing with SDK roots. I haven't 
checked yet if similar logic would be necessary in configure. With some luck it 
isn't, but that depends on what's supported by autoconf and the particular 
probes we want to use.

@Ned: Not being able to use system versions of libraries is a bit annoying, but 
that's something you already have to do due to openssl.  Maybe we should also 
try to clean up and refactor the build-installer.py script to do have a way to 
build/install those 3th-party dependencies.

--

___
Python tracker 
<https://bugs.python.org/issue45743>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-05 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

> Where do you think that "feature" is documented?

I'd have to check, but I didn't learn this from Twitter, although it wouldn't 
surprise me if I learned this from a WWDC talk.

The beta for Big Sur never identified itself as 10.16 other than through this 
feature.  I guess Apple determined that too many applications only looked at 
the minor version determine if the current system is new enough. 

Applications compiled with/linked against a 11.0 or 12.0 SDK will always just 
see the real system version.

Note that this also affects programs just opening the SystemVersion.plist file, 
that will get substituted by an alternative version when the opening process 
links against an older SDK.  Calling sw_vers and parsing the output does return 
the right version though.

--

___
Python tracker 
<https://bugs.python.org/issue44828>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-04 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

> Heads up!  A strange Apple quirk has been identified which could affect the 
> file dialog behavior if the Tk library is compiled on macOS 10.XX and used on 
> macOS 11 or 12.  (I am not sure if this applies here.)

I'm pretty sure that's a documented feature. Any code compiled with a 10.15 or 
earlier SDK will never see version 11.0 or later when using regular in process 
APIs (and IIRC that includes usage of @available/__builtin_available)

--

___
Python tracker 
<https://bugs.python.org/issue44828>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Are you using macOS 12 (Monterey)?

I get an error as well using that version of the OS (see open-error). The error 
happens within a second or two after opening the open dialog, without 
interacting with the dialog in any way. This is on an M1 laptop running macOS 
12.0.1.

This is likely the same issue as described in #44828. In particular, I get the 
same error message when I run the reproducer script in that issue. 

I'm adding the Tkinter component as well because this is likely a problem

--
components: +Tkinter
Added file: https://bugs.python.org/file50405/open-error.png

___
Python tracker 
<https://bugs.python.org/issue45641>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-15 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The most straightforward change for macOS is to add “pyi” to the list of 
extensions in “Mac/IDLE/IDLE.app/Contents/Info.plist”.  That way IDLE will be 
seen as a valid editor for .pyi files.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45447>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Marc, thanks for the update.

Will there be a Tcl/Tk release soonish that includes this fix? 

Alternatively, is there patch that we can apply to the latest release when 
building the copy of Tk included with the installers?

--

___
Python tracker 
<https://bugs.python.org/issue44828>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44841] filemode in repr of ZipInfo, but is not a ZipInfo attribute

2021-09-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The repr() output of a ZipInfo contains filemode, but it is not an attribute of 
those objects, see 
<https://docs.python.org/3/library/zipfile.html#zipinfo-objects> for a list of 
attributes and methods.

Adding an @property for mode that extracts the mode (as an integer) from the 
external_attr could be useful, that avoids having to know about that encoding 
in users of the library.

You currently have to extract the mode yourself. Luckily that isn't too hard, 
basically: ```mode = info.external_attr >> 16```. Only use this when the value 
is not 0, as it will be zero when the archive was created by software that 
doesn't store a mode.   You can convert this integer to a human readable string 
using the function stat.filemode(). 

I've changed the version to 3.11 because adding a mode attribute to ZipInfo 
would be a new feature and is therefore only possible in a new feature release.

--
title: ZipInfo crashes on filemode -> filemode in repr of ZipInfo, but is not a 
ZipInfo attribute
versions: +Python 3.11 -Python 3.7

___
Python tracker 
<https://bugs.python.org/issue44841>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45267] New install Python 3.9.7 install of Sphinx Document Generator fails

2021-09-23 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The error in the attached file says that one of the dependencies could not be 
found, in particular the "packaging" library.

This doesn't look like a bug in CPython or pip, but more a general support 
question. I kindly ask you to visit one of the python forums or mail lists (for 
example https://discuss.python.org).

--
nosy: +ronaldoussoren
resolution:  -> not a bug
stage:  -> resolved
status: open -> pending
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue45267>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45251] signal.SIGCLD alias is not available on OSX

2021-09-21 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The documentation for the SIG* constants also mentions:


SIG*
All the signal numbers are defined symbolically. For example, the hangup signal 
is defined as signal.SIGHUP; the variable names are identical to the names used 
in C programs, as found in . The Unix man page for ‘signal()’ lists 
the existing signals (on some systems this is signal(2), on others the list is 
in signal(7)). Note that not all systems define the same set of signal names; 
only those names defined by the system are defined by this module.


This is however mentioned halfway through the list of constants.  I'm not sure 
why this is so, IMHO it would be clearer to move the fragment I quote to the 
start of the module constants section.

We shouldn't define SIGCLD on platforms that don't have this name available in 
their libc headers, which includes macOS.  If the fragment above were moved to 
the start of the section no further updates would be required (IMHO).

--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44841] ZipInfo crashes on filemode

2021-09-19 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not sure what the issue is here. ZipInfo does not have a filemode 
attribute, that's why it is not in ZipInfo.__slots__.

That said, it might be interesting to add a property to ZipInfo that extracts 
the file mode from ZipInfo.external_attr.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue44841>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45241] python REPL leaks local variables when an exception is thrown

2021-09-19 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'd expect that there'd be at least one instance of X alive due to 
sys.last_value and in particular sys.last_traceback (which has a reference to 
the stack frame which contains references to local variables).

Btw. I cannot reproduce this with Python 3.9.7 installed with the Python.org 
installer (on MacOS 11):

Python 3.9.7 (v3.9.7:1016ef3790, Aug 30 2021, 16:25:35) 
[Clang 12.0.5 (clang-1205.0.22.11)] on darwin


When I introduce a reference loop the number of X() instances does grow, but 
only until the cyclic garbage collector runs (for example when gc.collect is 
called).

I used slightly tweaked code to investigate:


class Y:
pass
class X:
def __init__(self):
self.y = Y()
self.y.x = self
pass

def dump():
import gc
#gc.collect()
objs = gc.get_objects()
for obj in objs:
if isinstance(obj, X):
print(obj)

def f():
x = X()
raise Exception()

f()

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45241>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45183] Unexpected exception with zip importer

2021-09-16 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I just noticed that I'm unnecessarily obtuse in my description of a possible 
fix, the diff (without test update):

% git diff Lib/zipimport.py 
   (main)cpython
diff --git a/Lib/zipimport.py b/Lib/zipimport.py
index c55fec6aa1..43ac6cbe57 100644
--- a/Lib/zipimport.py
+++ b/Lib/zipimport.py
@@ -334,7 +334,7 @@ def invalidate_caches(self):
 _zip_directory_cache[self.archive] = self._files
 except ZipImportError:
 _zip_directory_cache.pop(self.archive, None)
-self._files = None
+self._files = {}
 
 
 def __repr__(self):


With that change the exception should not happen, and the now stale zipimporter 
would be ignored when flushing the cache while the zipfile referenced by the 
zip importer instance has been removed.

That said, I haven't tested this and won't create a PR because my local tree is 
(still) a mess.

--

___
Python tracker 
<https://bugs.python.org/issue45183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45183] Unexpected exception with zip importer

2021-09-13 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue45183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45183] Unexpected exception with zip importer

2021-09-13 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
nosy: +pablogsal, twouters

___
Python tracker 
<https://bugs.python.org/issue45183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45183] Unexpected exception with zip importer

2021-09-13 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The attached file demonstrates the problem:

If importlib.invalidate_caches() is called while the zipfile used by the zip 
importer is not available the import system breaks entirely. I found this in a 
testsuite that accedently did this (it should have updated sys.path). 

I get the following exception:

$ python3.10 t.py
Traceback (most recent call last):
  File "/Users/ronald/Projects/modulegraph2/t.py", line 27, in 
import uu
  File "", line 1027, in _find_and_load
  File "", line 1002, in _find_and_load_unlocked
  File "", line 945, in _find_spec
  File "", line 1430, in find_spec
  File "", line 1402, in _get_spec
  File "", line 168, in find_spec
  File "", line 375, in _get_module_info
TypeError: argument of type 'NoneType' is not iterable


This exception is not very friendly

This particular exception is caused by setting self._files to None in the 
importer's invalidate_caches method, while not checking for None in 
_get_modules_info. 

I'm not sure what the best fix would be, setting self._files to an empty list 
would likely be the easiest fix.

Note that the script runs without errors in Python 3.9.

--
files: repro.py
keywords: 3.10regression
messages: 401698
nosy: ronaldoussoren
priority: normal
severity: normal
status: open
title: Unexpected exception with zip importer
versions: Python 3.10, Python 3.11
Added file: https://bugs.python.org/file50279/repro.py

___
Python tracker 
<https://bugs.python.org/issue45183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45105] Incorrect handling of unicode character \U00010900

2021-09-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@Steven: the difference between indexing and the repr of list() is also 
explained by Eryk's explanation.

s = ... # (value from msg401078)
for x in repr(list(s)):
   print(x)

The output shows characters in the expected order.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45105>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45161] _Py_DecodeUTF8_surrogateescape not exported from 3.10 framework build

2021-09-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've switched py2app to Py_DecodeLocale, which is a public API introduced in 
3.5 to accomplish the same task. 

I'm leaving the issue open in case hiding the symbol is unintentional.

--

___
Python tracker 
<https://bugs.python.org/issue45161>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45161] _Py_DecodeUTF8_surrogateescape not exported from 3.10 framework build

2021-09-10 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The symbol _Py_DecodeUTF8_surrogateescape is not exported from Python.framework 
on macOS in Python 3.10.  The symbol was exported in earlier versions of 3.x.

I'm not sure if this was intentional, so far I haven't been able to find when 
this was changed.

This change breaks py2app which uses _Py_DecodeUTF8_surrogateescape to convert 
the C argv array to an array of 'wchar_t*' for use with Python's C API.

--
components: C API, macOS
messages: 401564
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: _Py_DecodeUTF8_surrogateescape not exported from 3.10 framework build
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue45161>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45067] Failed to build _curses on CentOS 7

2021-09-06 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

According to https://invisible-island.net/ncurses/NEWS.html#index-t20170401 the 
function extended_color_content was introduced in 2017, maybe the detection of 
support for this function doesn't work properly for some reason (although the 
preprocessor logic in Modules/_cursesmodule.c looks sane).

That said, I don't have a CentOS VM at the moment so cannot debug this myself.

--

___
Python tracker 
<https://bugs.python.org/issue45067>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45100] Teach help about typing.overload()

2021-09-05 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I agree that this would be nice to have, but wonder how help() could access 
that information.  The two @overload definitions will be overwritten by the 
non-overload one at runtime, and hence will ever been seen by help().

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45100>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45067] Failed to build _curses on CentOS 7

2021-09-01 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

You stripped too much output from the build, in particular you removed the part 
where _curses failed to build. The output you show only says that _cursus_panel 
failed verification because _cursus could not be imported.

Could you add the build failure for the _cursus module as well?  Rerunning make 
should give a more manageable output.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45067>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45020] Freeze all modules imported during startup.

2021-08-26 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue45020>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44933] python3.9-intel64 hardened runtime not enabled

2021-08-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@ned: the "reliable way to run under rosetta" is using "arch -x86_64 python3". 
I don't particularly like having another executable to accomplish the same goal.

--

___
Python tracker 
<https://bugs.python.org/issue44933>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44997] [sqlite3] build fails on macOS 11.5.1

2021-08-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Note that sqlite3_enable_load_extension was unavailable way before macOS 
11.5.1, the symbol is not present on 10.15 (I used 'nm 
/usr/lib/libsqlite3.dylib' to check for symbol availability).

Just checking for MACOS and a system include directory should do the trick for 
giving a nicer error message, something like:

diff --git a/setup.py b/setup.py
index bc2ea16089..ae5d827339 100644
--- a/setup.py
+++ b/setup.py
@@ -1601,6 +1601,9 @@ def detect_sqlite(self):
 if '--enable-loadable-sqlite-extensions' not in 
sysconfig.get_config_var("CONFIG_ARGS"):
 sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))
 
+elif MACOS and sqlite_incdir == os.path.join(MACOS_SDK_ROOT, 
'usr/include'): 
+raise DistutilsError("System version of SQLite3 does not 
support loadable extensions") 
+
 if MACOS:
 # In every directory on the search path search for a dynamic
 # library and then a static library, instead of first looking

With this patch I get a nice error message when trying to build with loadable 
sqlite extensions:

make

  (main)cpython
 CC='gcc' LDSHARED='gcc -bundle -undefined dynamic_lookup' OPT='-DNDEBUG -g 
-fwrapv -O3 -Wall'  _TCLTK_INCLUDES='' _TCLTK_LIBS=''   ./python.exe -E 
../setup.py  build
running build
running build_ext
error: System version of SQLite3 does not support loadable extensions
make: *** [sharedmods] Error 1


My clone of the CPython repository is a bit of a mess at the moment, otherwise 
I'd have created a PR for this. Feel free to run with this.

--

___
Python tracker 
<https://bugs.python.org/issue44997>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45016] Multiprocessing freeze support unclear

2021-08-26 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The requirements on a freezing tool to work with the freeze support in the 
multiprocessing library are unclear.

In particular, I'm trying to support multiprocessing in py2app and cannot rely 
on the documentation to implement that support.

The particular issue I run into:
- With py2app "sys.executable" points to a regular interpreter
- py2app sets sys.frozen to "macosx_app" or "macosx_plugin"
- Multiprocessing.spawn.get_command_line() assumes that a special command-line 
should be used when "sys.frozen" is set and there is no way to disable this.

The easiest way for me to fix this issue is to drop setting sys.frozen in 
py2app, although I have no idea what other code this might break.

--
components: Library (Lib)
messages: 400354
nosy: ronaldoussoren
priority: normal
severity: normal
status: open
title: Multiprocessing freeze support unclear
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45016>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40772] module 'resource' has no attribute 'RLIMIT_VMEM'

2021-08-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

According to https://man7.org/linux/man-pages/man2/getrlimit.2.html there is no 
RLIMIT_VMEM on linux, RLIMIT_AS is the closest equivalent.

--
nosy: +ronaldoussoren
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue40772>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44933] python3.9-intel64 hardened runtime not enabled

2021-08-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I don't know what creates "python3.9-intel64", but this is not created by the 
regular Python build process.  It might be created by one of the build scripts 
you use.

--

___
Python tracker 
<https://bugs.python.org/issue44933>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44933] python3.9-intel64 hardened runtime not enabled

2021-08-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not sure what your question is. But to enable the hardened runtime you need 
to sign the binaries using ``--options runtime`` as one of the options.

--

___
Python tracker 
<https://bugs.python.org/issue44933>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44869] MacOS Monterrey malloc issue

2021-08-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

There is a 3th possibility: This could be a bug in the OS, Monterey is still in 
beta at this point and beta's tend to contain more bugs than release versions.

--

___
Python tracker 
<https://bugs.python.org/issue44869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Good question. Hopefully one of the documentation or importlib experts can 
chime in about that.  I may also have uncovered a new issue in importlib ;-)

Personally I'd say that documenting raising ImportError is still useful because 
that's the common exception, and an exception that's not mentioned in the rest 
of the documentation for importlib.  That does require a careful formulation to 
avoid implying that this the only exception that can be raised.

--

___
Python tracker 
<https://bugs.python.org/issue40899>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44869] MacOS Monterrey malloc issue

2021-08-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm afraid we cannot do a lot with the information you provided. I've just ran 
a full test run for a copy of 3.10rc1 installed using the universal2 installer 
and that doesn't have problem.

One way to find more information about what's going on is to use fault handler 
(e.g. PYTHONFAULTHANDLER=1 python3.10 ...), although that will just print a 
Python stack trace when the executable crashes.

Alternatively use a debugger to look at the C stack.

--

___
Python tracker 
<https://bugs.python.org/issue44869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Note that importlib.import_module, and the import statement itself, can raise 
an arbitrary exception when that exception is raised while executing the module 
body.

This is easily observed by creating a module that just raises an error in its 
body:

# t.py
1/0
# EOF

``importlib.import_module("t")`` will raise ZeroDivisionError.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue40899>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18255] CPython setup.py problems

2021-08-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is no longer relevant now that distutils is deprecated.

--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue18255>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44746] Improper behaviour of 'finally' keyword

2021-07-27 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The output from the print statement in the finally block is before the 
traceback, you need to scroll back in the output buffer in VS Code.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue44746>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44718] Incorrect arguments in function select() cause segfault

2021-07-23 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The problem is related to recursion, the code basically ends up with an 
unlimited number of iterations of select.select and test_select_mutated on the 
call stack and this doesn't trigger the stack depth checker.

The following definition of class F triggers the same error:

class F:
def fileno(self):
test_select_mutated()
return self.fileno()

The call stack behaviour can be observed by using the fault handler 
(``python3.9 -Xfaulthandler crash.py``), although you won't see select.select 
in the traceback due to it being a C extension function.

Fixing this would basically require adding a stack depth check to the 
PyObject_Call family of functions.  I don't know if a PR for that would be 
accepted due to the possible performance impact.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue44718>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-22 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The disadvantage of using dlopen is that this function has side effects, and 
those can affect program behaviour.  Because of this I'm against switching to 
using dlopen to probe for libraries.

--

___
Python tracker 
<https://bugs.python.org/issue44689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Anyways, the solution for "build on older macOS version, deploy to Big Sur" is 
to dynamically look for the relevant API (``_dyld_shared_cache_contains_path``) 
and use it when available. But only in that scenario, the current code path 
using explicit weak linking should be kept for those building using a recent 
SDK (cleaner code, better error reporting).

This should be a fairly easy patch, but I don't know when I'll get around to 
looking into this further.

Alternatively we could require that Python is build using the macOS 11 SDK (or 
later) when targeting Big Sur.

I'm dropping 3.8 from the list of versions because it is in "bug fix only" mode 
and won't receive a patch for this.  IIRC 3.8 also doesn't support Big Sur in 
the first place, we've only back ported Big Sur support to 3.9.

--
stage:  -> needs patch
versions:  -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue44689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The problem with moving from Catalina to Big Sur is a known issue, AFAIK 
there's an open issue for this.

The problem is that Big Sur moved system libraries into a big blob (which Apple 
calls the shared library cache). Ctypes uses an API that's new in macOS 11 to 
check if a library is in that cache, but only when compiled with the the macOS 
11 SDK or later as the API is not available in earlier SDKs.

Moving from Big Sur to earlier version should work fine, but only if you set 
the deployment target correctly during the build. This is how the "universal2" 
installers on python.org are build.

--

___
Python tracker 
<https://bugs.python.org/issue44689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44597] Poll returns POLLOUT on Pipe read endpoint on MacOS 10.14

2021-07-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Without having looked at this issue in detail...

This looks like an issue with macOS and not Python. In general API's providing 
access to system calls are just thin wrappers around those system calls.  If 
this is a bug in macOS there's nothing we can do about this, other than perhaps 
working around the bug in stdlib usages of select.poll.

--

___
Python tracker 
<https://bugs.python.org/issue44597>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44583] Failure to build on OSF1.

2021-07-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

IMHO the most important question to answer first is: Why is adding OSF1 support 
a good idea?

The PR, which IMHO in its current state is not mergeable, adds some complexity 
to the build and ongoing maintenance of CPython itself.  This tends to be 
acceptable for in-use and maintained operating systems, but is a lot less so 
for hardware and operating systems that are basically museum pieces. 

So, why do you want to run bleeding edge CPython on such hardware?

And as Terry mentioned this is something that should be discussed on 
python-dev, not on the tracker.


A secondary, but still important, question is the support question.  A fairly 
recent discussion on Solaris support should give some insight as to what's 
required there: 
https://mail.python.org/archives/list/python-...@python.org/thread/VDD7NMEDFXMOP4S74GEYJUHJRJPK2UR3/.
   And note that OpenSolaris appears to be a lot more actively used and 
supported than OSF1.

--

___
Python tracker 
<https://bugs.python.org/issue44583>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44583] Failure to build on OSF1.

2021-07-09 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

As mentioned on the PR:

Support for OSF1 was removed in Python 3.3 (see 
https://www.python.org/dev/peps/pep-0011/#unsupporting-platforms).

I expect that there will be little interest amongst the core developers for 
reintroducing support because OSF1 is an ancient operating system that is long 
out of support.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue44583>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42514] Relocatable framework for macOS

2021-07-01 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I guess Ned and I are the only core devs that would be vaguely interested in 
working on this.  I have no active plans to work on this.

Having a relocatable framework would be nice, but doing this in a way that 
maintains all functionality, esp. w.r.t. the Python executable.

--

___
Python tracker 
<https://bugs.python.org/issue42514>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44392] Py_GenericAlias is not documented

2021-06-15 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Why should this be deprecated at all? 

The API is a convenient way to add ``__class_getitem__`` in a way that is 
consistent with the implementation for builtin types and the stdlib.

I noticed the lack of documentation when I worked on implementing this for 
PyObjC (an easy first step towards adding type stubs to that project). 

For me the alternative to using Py_GenericAlias would be a dummy implementation 
of ``__class_getitem__`` that just returns self.

--

___
Python tracker 
<https://bugs.python.org/issue44392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not working on this. Feel free to work on a PR.

--

___
Python tracker 
<https://bugs.python.org/issue44392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44392] Py_GenericAlias is not documented

2021-06-11 Thread Ronald Oussoren


New submission from Ronald Oussoren :

Py_GenericAlias seems to be a public API given its name and is mention in the 
stable ABI list for 3.10 
(https://docs.python.org/3.10/c-api/stable.html?highlight=py_genericalias), but 
the API is not documented. 

Likewise for Py_GenericAliasType.

--
assignee: docs@python
components: Documentation
messages: 395625
nosy: docs@python, ronaldoussoren
priority: normal
severity: normal
status: open
title: Py_GenericAlias is not documented
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44234] Debugging with LLDB doesn't work for universal2 installer on macOS Big Sur

2021-05-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Should we add documentation about this? 

The truly annoying bit about that discussion is that its probably easier to 
just install gdb and use that to debug extensions.

--

___
Python tracker 
<https://bugs.python.org/issue44234>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44214] PyArg_Parse* for vectorcall?

2021-05-25 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Annoyingly the keywords variant is the most interesting to expose :-) due to 
the complexity of correctly interpreting keyword arguments.

I agree that we should be careful in exposing the APIs using _PyArg_Parser, 
although it should be easer to expose it only in the non-stable ABI because 
extensions should be recompiled for new python releases anyway.

That said, I won't work on this issue myself (or at least not anytime soon). My 
current use case doesn't use keyword arguments, and open coding the calls to 
PyArg_ParseTuple is easy enough for now (even if that leads to more 
boilerplate).

--

___
Python tracker 
<https://bugs.python.org/issue44214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44234] Debugging with LLDB doesn't work for universal2 installer on macOS Big Sur

2021-05-25 Thread Ronald Oussoren


New submission from Ronald Oussoren :

I've installed python 3.9.5 using the universal2 installer on my M1 MacBook.

Debugging this python using lldb doesn't work because the debugger cannot 
attach to the (newly launched) binary.  This appears to be due to a missing 
entitlement in the signed executable.

Background: 
https://developer.apple.com/forums/thread/676028?answerId=666834022#666834022 
(in particular the first reply).

--
components: Build, macOS
messages: 394356
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: Debugging with LLDB doesn't work for universal2 installer on macOS Big 
Sur
type: behavior
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44234>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44214] PyArg_Parse* for vectorcall?

2021-05-23 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue44214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44214] PyArg_Parse* for vectorcall?

2021-05-23 Thread Ronald Oussoren


New submission from Ronald Oussoren :

I'm currently converting some extensions of my own to vectorcall and an 
annoying change between the old call protocol and vectorcall is that the latter 
has no public equivalent to the PyArg_Parse family of functions.

There is "_PyArg_ParseStack*" in the CPython implementation, but those 
functions are not part of the public API.

Please consider making "_PyArg_ParseStack" public.

--
components: C API
messages: 394194
nosy: ronaldoussoren
priority: normal
severity: normal
status: open
title: PyArg_Parse* for vectorcall?
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue44214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43807] JSONDecodeError: Extra Data Raised on Long Valid JSON

2021-04-11 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

There is a block of NUL bytes at the end of the JSON data structure

The output of "od -c pico-hard.json" ends with:

0046340s   e   c   t   i   o   n   N   o   t   e   s   "   :   [   ]
0046360,   "   t   y   p   e   O   f   S   e   c   t   i   o   n   "
0046400:   0   }   ]   }  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0046420   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0071600   \0  \0  \0  \0  \0  \0  \0  \0  \0
0071611


Note that there is a block of "\0" entries after the closing "}". 

The file can be parsed correctly after stripping these NUL bytes.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue43807>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43664] Long computations in pdb.run() lead to segfault

2021-04-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

```pdb.run(...)``` is ends up in ```bdb.Bdb.run```, which uses compile and exec 
to run the code.

And indeed:

>>> compile("1+2" * 100, "-", "exec")
zsh: segmentation fault  python3.9

--
components: +Interpreter Core
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue43664>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43638] MacOS os.statvfs() has rollover for >4TB disks at each 4TB (32bit counter overflow?)

2021-03-29 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

As you note in the title this is a 32-bit overflow in the statvfs system API, 
the struct it uses contains 32-bit values.

--

___
Python tracker 
<https://bugs.python.org/issue43638>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

One thing to look into: there appears to be a tk 8.6.11.1 release, I have no 
idea what changed in this micro release.

--

___
Python tracker 
<https://bugs.python.org/issue43511>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-24 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

If this is a Tk issue we should report it in their bug tracker.

I'm definitely against switching to an older version of Tk, the most recent 
release fixes a lot of problems with Tk on macOS.  Correctness before 
performance.

How bad is the performance compared to Tk on other platforms (with similar 
hardware)?

--

___
Python tracker 
<https://bugs.python.org/issue43511>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40720] accessing mmap of file that is overwritten causes bus error

2021-03-09 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

What happens here is that the file is truncated, which (more or less) truncates 
the memory mapping. Accessing a memory mapping beyond the length of the file 
results in a SIGBUS signal.

I'm not sure if there is much Python can do about this other than shrinking the 
window for crashes like this by aggressively checking if the file size has 
changed (but even then a crash will happen if another proces truncates the file 
between the time the check is done and the memory is actually accessed).

---

Variant of the script that explicitly truncates the file:

def main():
with tempfile.TemporaryDirectory() as tmp:
tmp_path = pathlib.Path(tmp)
path = tmp_path / "eg"

path.write_bytes(b"Hello, World!")

with path.open("r+b") as rf:
mm = mmap.mmap(rf.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ)
rf.truncate(0)
bytes(mm)

if __name__ == "__main__":
main()

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue40720>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43054] What does the existence of a struct in a header file imply about the C-API

2021-02-28 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Sorry about the slow response.

I misread your initial message, the distinction between (1) and (2) in your 
list is clear.

to (3): New fields can be added while maintaining API (but not ABI) 
compatibility as long as the default value is the default value for static 
initialisers (assuming the usual way we initialise structs in CPython). That 
is, adding a new field to PyTypeObject is ok, as long as it at the end and 
defaults to NULL or 0.

Especially with category 1 it is not entirely clear which structs are in that 
category. Is PyLongObject in this category?  The struct is not documented, but 
has a name that seems to indicate that it is public.   Likewise for 
PyTupleObject, where the shape of the struct is used by documented APIs but the 
shape of the strut itself is not documented.

BTW. For my own code I do directly access structs where necessary, even if they 
aren't documented. I totally expect that this will require adjustments for new 
Python releases (such as when the unicode representation changed).

--

___
Python tracker 
<https://bugs.python.org/issue43054>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43326] About Zipfile

2021-02-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not sure what you are asking here.

Looking at the screenshot I'd say that the zipfile you are trying to extract 
contains files with a newline in their name. That's a perfectly valid (although 
annoying) name on unix-y platforms. 

The zipfile module does not have an API for rewriting the file name when 
extracting. It is far from clear to me that adding such a API would be 
generally useful. 

Emulating this is fairly easy though, something like:

zf = zipfile.ZipFile(...)
for name in zf.namelist():
stream = zf.open(name)
data = stream.read()
stream.close()
with open(name.replace(...), "w") as stream:
stream.write(data)

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue43326>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-19 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Please add more information about what you're doing.  Your report does not 
contain enough information to try to reproduce the problem.

This is supposed to work just fine, and does work for me.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30799] Improved test coverage Lib/_osx_support.py 99%

2021-02-12 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
components: +macOS

___
Python tracker 
<https://bugs.python.org/issue30799>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43205] Python Turtle Colour

2021-02-12 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
nosy: +gregorlingl, willingc

___
Python tracker 
<https://bugs.python.org/issue43205>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43054] What does the existence of a struct in a header file imply about the C-API

2021-02-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

To channel Victor: Another thing to look into is to introduce accessors for 
struct fields in category 1 and 2 so that the struct can be made private in the 
future.

The difference between category 1 and 2 is sadly not very clear cut. Anything 
defined in public headers could be used 3th-party code.

In this particular instance there is no documentation for the fields of the 
struct, which may indicate that the struct is private. However, this struct is 
used by code outside of the stdlib and there are currently no accessors that 
can replace this usage.

--
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue43054>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31751] Support for C++ 11 and/or C++ 14 in python.org installer

2021-02-09 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Can this be closed as out of date?

1. universal2 installers are build using Xcode 12

2. the regular installers are build on macOS 10.9 and the system compilers on 
that system should support C++ 11 and 14.

--

___
Python tracker 
<https://bugs.python.org/issue31751>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41100] Support macOS 11 and Apple Silicon Macs

2021-02-09 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

There is no ETA. I'm spending more time away from the computer and on other 
projects when I'm not at work. I also have no personal need for 3.8 support.

If anyone else is up to the job: the back port to 3.9 should be a good starting 
point, but I don't trust the output of the cherry_picker tool to 3.8.

--

___
Python tracker 
<https://bugs.python.org/issue41100>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40168] import pandas error[python 3.8.]

2021-02-08 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue40168>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40361] Darwin systems using win settings for webbrowser.py

2021-02-08 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is a duplicate of #41754.

--
nosy: +ronaldoussoren
resolution:  -> duplicate
stage: patch review -> resolved
superseder:  -> Webbrowser Module Cannot Find xdg-settings on OSX

___
Python tracker 
<https://bugs.python.org/issue40361>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2021-02-08 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
components: +macOS
nosy: +ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue32824>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43122] Python Launcher doesn't open a terminal window

2021-02-08 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 
<https://bugs.python.org/issue43122>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43111] webbrowser.py triggers unwanted XQuartz startup

2021-02-08 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've created a PR for this. 

Open question: Is this a bug fix (with back ports to 3.9 and 3.8) or a feature  
(no back ports)?

--

___
Python tracker 
<https://bugs.python.org/issue43111>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43111] webbrowser.py triggers unwanted XQuartz startup

2021-02-08 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
keywords: +patch
pull_requests: +23272
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24480

___
Python tracker 
<https://bugs.python.org/issue43111>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41552] uuid.uuid1() on certain Macs does not generate unique IDs

2021-02-06 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@terrygreeniaus: Are you running macOS 11 on your MacBook Pro?

If so, could you verify the hardware address of the iBridge interface? 

I've checked to libc sources on opensource.apple.com and those don't seem to 
contain code to treat the iBridge interface specially. 

I've also attached a small program that dumps the Mac addresses of interfaces 
using the same mechanism as used by the UUID code in libc. If the Mac address 
is unchanged they may have done something that affects that code.

--
Added file: https://bugs.python.org/file49794/dumpaddr.c

___
Python tracker 
<https://bugs.python.org/issue41552>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43135] Can't input Japanese on idle (MacOS).

2021-02-06 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

As the issue is gone with the 3.10 universal2 installer it should also be gone 
with the 3.9.1 universal installer. I'd expect that the difference is in the 
use of a newer version of Tcl/Tk. 

We haven't used the newer versions of Tcl/Tk with the regular 3.9 installer 
because we (or rather Ned) have run into various issues when building recent 
versions of Tcl/Tk on ancient versions of macOS. The universal2 installer is 
build on macOS 11 and hence avoids those build issues.  

Testing if Tcl/Tk 8.6.11 works correctly when build on macOS 10.9 could be an 
interesting experiment if someone is up to this, but is something I don't 
intend to do.  I rarely use Tkinter myself and this requires manual testing to 
verify behaviour.

--

___
Python tracker 
<https://bugs.python.org/issue43135>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43111] webbrowser.py triggers unwanted XQuartz startup

2021-02-06 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The same code is present in trunk. 

I'm in favour of disabling usage of X11 browsers of macOS, that's almost 
certainly not what users want.

I no longer have XQuartz installed on my machine, but when I did I only used it 
for running X11 GUIs on remote Linux systems.

What I'm not entirely sure about: is this something we should back port or just 
apply to the trunk (3.10)? This is a behaviour change and as such I'd be 
inclined to only apply to trunk.

--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7

___
Python tracker 
<https://bugs.python.org/issue43111>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43120] Some OSX syslog facilities are missing from syslog module

2021-02-03 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
keywords: +patch
pull_requests: +23242
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24432

___
Python tracker 
<https://bugs.python.org/issue43120>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43120] Some OSX syslog facilities are missing from syslog module

2021-02-03 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The following syslog facility constants on macOS are missing from the syslog 
module:

* LOG_FTP
* LOG_NETINFO
* LOG_REMOTEAUTH
* LOG_INSTALL
* LOG_RAS
* LOG_LAUNCHD

I'm working on a PR

--
components: Extension Modules, macOS
messages: 386456
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: Some OSX syslog facilities are missing from syslog module
type: enhancement
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43120>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41552] uuid.uuid1() on certain Macs does not generate unique IDs

2021-02-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I got feedback on FB889: Apple says they have fixed the issue (they don't 
mention in what version, but I expect 11.2). I haven't checked this yet.

--

___
Python tracker 
<https://bugs.python.org/issue41552>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43106] Some macOS open flags are missing from posixmodule.c

2021-02-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Likewise for O_POPUP and O_ALERT, although I don't understand what these are 
supposed to do.

--

___
Python tracker 
<https://bugs.python.org/issue43106>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43106] Some macOS open flags are missing from posixmodule.c

2021-02-02 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The following O_* flags are present in the macOS 11 SDK, but aren't provided by 
posixmodule.c:

O_FSYNC (alias for O_SYNC)
O_EVTONLY
O_SYMLINK
O_NOFOLLOW_ANY

--
components: Extension Modules, macOS
keywords: easy (C)
messages: 386159
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: Some macOS open flags are missing from posixmodule.c
type: enhancement
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43106>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-02-02 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
keywords: +patch
pull_requests: +23234
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24419

___
Python tracker 
<https://bugs.python.org/issue42971>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-02-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I was too quick, EQFULL appears to be missing:

#define EQFULL  106 /* Interface output queue is full */


If the script I'm using to check for this is correct this is the only missing 
errno with the macOS 11 SDK.

--
resolution: not a bug -> 
stage: resolved -> needs patch
status: pending -> open

___
Python tracker 
<https://bugs.python.org/issue42971>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-02-02 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> pending

___
Python tracker 
<https://bugs.python.org/issue42971>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-02-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've checked all three and all of them are present in errnomodule.c, and all of 
them are defined in the errno module (macOS 11, Python 3.9.1 "universal2" 
build).

On first glance all errno values in the macOS 11 SDK are present in 
errnomodule.c.

--

___
Python tracker 
<https://bugs.python.org/issue42971>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43069] Python fails to read a script whose path is `/dev/fd/X`

2021-01-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I can reproduce the issue on macOS 11.1. 

As you write:
- running /dev/fd/X as a script fails silently if it refers to an smallish file
- reading /dev/fd/X referring to the same smallish files works fine (the 
``open('/dev/fd/9').read()`` scenario. 

If I read the code in Modules/main.c correctly the main difference between the 
two scenario's is that the first scenario using the C stdio library to read the 
file (in pymain_run_file_obj), and the latter uses the normal Python io stack.

Reading /dev/fd/9 works fine when using either stdio or open/read in C code. 

I have not yet tried to untangle the layers of C code from pymain_run_file_obj 
to actually reading the script, there might be something there that sheds light 
on what's going on here.

I'm not yet willing to claim this is an OS bug as I've failed to reproduce this 
outside of Python.

--

___
Python tracker 
<https://bugs.python.org/issue43069>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42504] Failure to build with MACOSX_DEPLOYMENT_TARGET=11 on Big Sur

2021-01-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

see PR 24341.

--

___
Python tracker 
<https://bugs.python.org/issue42504>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42504] Failure to build with MACOSX_DEPLOYMENT_TARGET=11 on Big Sur

2021-01-26 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
pull_requests: +23160
pull_request: https://github.com/python/cpython/pull/24341

___
Python tracker 
<https://bugs.python.org/issue42504>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >