Ronald Oussoren added the comment:
> If we want to respect sizeof(max_align_t) alignment, we can compute
> sizeof(max_align_t) in configure and uses the result in obmalloc.c. I expect
> that it's either 16 or 32, so we can maybe just hardcode ALIGNMENT_SHIFT
> using so
Ronald Oussoren added the comment:
The problem you should look into is why the _posixsubprocess doesn't build, the
message about msvcrt is a red herring due to the way subprocess.py is
structured.
Also compare the pyconfig.h files created for the two single architecture
builds, maybe
Ronald Oussoren added the comment:
SecDigestTransformCreate() is probably a relevant API to look into, this seems
to be supported from 10.7 until now.
A major disadvantage for us of this API is that it is a CoreFoundation API and
because of that is problematic in pre-forking scenario
Ronald Oussoren added the comment:
A "problem" with CryptoKit is that it is a swift-only framework, which makes
using those APIs harder from C code (not impossible).
The older Security framework also contains crypto APIs, but seems to have less
support for modern algorithms (e.g.
Ronald Oussoren added the comment:
I agree. I'm working on a PR to expose this platform specific functionality in
the threading module. It would have been nice if other platforms had similar
functionality, but they don't.
Emulating the API is possible, but a project in its own
Ronald Oussoren added the comment:
> For example, using a priority policy that actually uses QOS attribute :)
How would that look?
The QOS class is already a high level interface that affects a number of
low-level polices. The classes are comprehensively documented in sys/qos.h.
In sh
New submission from Ronald Oussoren :
Arm based Mac systems have several types of cores: performance cores and
efficiency cores. The system has no way to directly specify which core a
particular proces or thread uses, but programs can use an API for setting the
QOS class of a thread that
Ronald Oussoren added the comment:
Terry: tkinter on macOS already effectively does not support Tk 8.5, or
basically anything bug the latest 8.6.x release. That's because older versions
have too many bugs that affect Python users, which mostly show up on our
tracker as bug reports
Change by Ronald Oussoren :
--
keywords: +patch
pull_requests: +30047
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31958
___
Python tracker
<https://bugs.python.org/issu
Ronald Oussoren added the comment:
One consideration is support for older LTS distributions of Linux, RHEL/Centos
7 appears to ship with Tcl/Tk 8.5.
The system install of Tcl/Tk on macOS is also 8.5, but that variant has too
many bugs to try to support it.
--
nosy: +ronaldoussoren
Ronald Oussoren added the comment:
venv requiring site isn't really a problem, although it is a bit weird that
sys.prefix changes when using the -S flag.
--
___
Python tracker
<https://bugs.python.org/is
Ronald Oussoren added the comment:
> However, it's the site.py module that actually updates sys.prefix for the
> venv. So you may just be inspecting at the wrong point? Or possibly it's in a
> codepath that doesn't run on macOS because *previously* it was being set
Ronald Oussoren added the comment:
issue33955 is an older issue about implementing the current functionality for
this on macOS, which has an API for querying stack limits.
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.
Ronald Oussoren added the comment:
I've updated the title to better reflect the actual problem.
An update on the current state of this issue:
I haven't looked at the code for a couple of days because because I got stuck.
With a fresh mind I've continued debugging and n
Ronald Oussoren added the comment:
WITH_NEXT_FRAMEWORK is a compile time option, I've added it to globals in
values like PREFIX are added. That way the python code can behave differently
for framework builds (which appears to be needed).
There are two big problems with my pa
Ronald Oussoren added the comment:
I've attached a new patch file with some more tweaks, including the additional
test case from msg414665.
I've pretty sure that the changes to getpath.py are slightly worse in the new
version, but aren't fully correct in the initial version
Ronald Oussoren added the comment:
I'm now in the fun position where the code works, but the test test_getpath.py
fails.
The test case below tries to test a venv in a framework build, but somehow
fails to calculate prefix and exec_prefix correctly. The calculation does work
when us
Ronald Oussoren added the comment:
This is also dodgy:
test_framework_macos (test.test_getpath.MockGetPathTests) ... Read link from
/Library/Frameworks/Python.framework/Versions/9.8/Resources/Python.app/Contents/MacOS/Python
Check if
/Library/Frameworks/Python.framework/Versions/9.8
Ronald Oussoren added the comment:
I have a patch that seems to do the right thing. It required adding
WITH_NEXT_FRAMEWORK to the globals when evaluating getpath.py to detect this
scenario.
There probably should be more tests, in particular a test for a virtual
environment using a
Ronald Oussoren added the comment:
Your PR fixed the issue for me.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ronald Oussoren added the comment:
You're right. I was sure that __qualname__ included the module name, but PEP
3155 is clear about actual semantics.
Sorry about the noise.
--
resolution: -> not a bug
stage: test needed -> resolved
status: ope
New submission from Ronald Oussoren :
In a static type when the "tp_name" is set to a fully qualified name (such as
"my.package.TypeName") the "__qualname__" returns the unqualified name
("TypeName") instead of the fully qualified name.
The type
Ronald Oussoren added the comment:
This is probably not a bug in python, but a change in system behaviour.
In particular, I've used the lsof command to check the open files for the
syslogd proces on a macOS 10.13 and 12.2 system. On the former syslogd has
/var/run/syslog open, on the l
Ronald Oussoren added the comment:
A hard crash seems wrong to me, and I'm not convinced yet that checking that
the type of the attribute name is exactly string is correct.
Found while debugging a crash in PyObjC's testsuite, PyObjC uses a subclass of
str to represent Objective
New submission from Ronald Oussoren :
The script below fails with an assertion error with python 3.11a5+ (current
trunk) when build with --with-pydebug:
# BEGIN OF FILE
class String(str):
__slots__ = ()
name = String("hello")
class Bag:
pass
o = Bag()
setattr(o, name, 42)
Ronald Oussoren added the comment:
I don't feel qualified to review the PR, but can confirm that this PR fixes
this issue as well as the crash in PyObjC that I extracted my reproducer from.
--
___
Python tracker
<https://bugs.py
Ronald Oussoren added the comment:
@Pablo: this is a possible release blocker, hard crash for code that works in
earlier releases.
That said, I have a workaround on my end and IMHO a fix could wait for the next
alpha.
--
nosy: +pablogsal
Ronald Oussoren added the comment:
> This is marked as a release blocker so I am holding the alpha release on
> this. Is there anything we can do to unblock this issue?
I marked the issue as a release blocker because it must not end up in a beta
release, its probably not worth it to h
Ronald Oussoren added the comment:
Again without diving deep I've constructed a test case that is probably
relevant. I've pasted the diff below because I'm not yet convinced that it is
correct (in particular the value for "argv0". This would also require a se
Ronald Oussoren added the comment:
The debug build seems to indicate that slot memory is not initiated properly, a
stack trace (note the argument to visit_validate at frame #7):
* frame #0: 0x00019b60d9b8 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x00019b640eb0
Ronald Oussoren added the comment:
The crash itself happens during garbage collection:
% python3.11 -Xdev t.py
(master)pyobjc-8
Fatal Python error: Segmentation
Ronald Oussoren added the comment:
This is with python 3.11 alpha 5 using the installer for macOS.
--
___
Python tracker
<https://bugs.python.org/issue46
New submission from Ronald Oussoren :
The following crashes the interpreter in Python 3.11, and works fine in older
versions:
# --- script.py
import types
class MyModule (types.ModuleType):
__slots__ = (
"_MyModule__a",
"_MyModule__b",
)
def
Ronald Oussoren added the comment:
The change to _base_executable is the real problem. Venv creates the correct
directory structure if I add a sitecustomize.py to the python path that sets
_base_executable to the correct value.
# sitecustomize
import sys
sys._base_executable
Ronald Oussoren added the comment:
The root cause likely is the calculation of sys._base_executable. In 3.10 this
is {sys.prefix}/bin/python3.10, while in 3.11 this is
{sys.prefix}/Resources/Python.app/Contents/MacOS/Python.
The venv library uses the incorrect value and therefore creates an
Ronald Oussoren added the comment:
This is be related to how the virtual environment is populated. In 3.10 the
"python3.10" name in the environment is a symlink to sys.executable. In 3.10
"Python" (not the capital) is a symlink to the binary in Python.app and
"py
New submission from Ronald Oussoren :
In python3.10 and earlier "python3 -m venv something" creates
"something/bin/python" as a symlink to the interpreter itself.
In python3.11 (a5) the same command no longer creates "something/bin/python",
but only the &quo
Ronald Oussoren added the comment:
This is not a bug in CPython, at best this can be a feature request to make it
possible to pickle lambda's (which IMHO is unlikely to happen).
The "fork" and "spawn" start methods result in different behaviour in how data
is c
Ronald Oussoren added the comment:
The default start method for multirprocessing was changed from "fork" to
"spawn" on macOS. This was done because the "fork" method can easily be
triggered into causing hard crashes (on macOS), in particular when the parent
Ronald Oussoren added the comment:
Something I forgot to mention: I don't think this is a bug in Tk now that I've
looked into this more deeply.
The integration problem between Tk and other users of the Cocoa event loop is
unfortunate but
Ronald Oussoren added the comment:
Categories make it possible to add methods to an existing class, but not new
attributes. The latter shouldn't be a problem in principle for an
NSApplication subclass because only a single instance of the application class
will get created and you m
Ronald Oussoren added the comment:
There's a use case for using a dict for __slots__, pydoc will use a dict value
for the slots as a mapping from attribute name to attribute documentation.
Because of that it is not really worthwhile to transform the value of __slots__
during
Ronald Oussoren added the comment:
W.r.t. augmented assignments, this is a good blog post about how they work
under the hood: https://snarky.ca/unravelling-augmented-arithmetic-assignment/
--
___
Python tracker
<https://bugs.python.org/issue46
Ronald Oussoren added the comment:
I've done some more research and this is an integration issue between pyglet
and Tk. In particular:
* Both pyglet and Tk use AppKit to implement their GUI
* AppKit uses an NSApplication class, and in particular a singleton instance of
that clas
Ronald Oussoren added the comment:
Oops, sorry: In Tk itself.
--
___
Python tracker
<https://bugs.python.org/issue46573>
___
___
Python-bugs-list mailin
Ronald Oussoren added the comment:
If I interpret the information I posted earlier correctly this is a bug in
Tkinter, it calls a non-existing Objecive-C method (``-[NSApplication
macOSVersion]``) and that results in an uncaught Objective-C exception and
hence an abort().
BTW. All of this
Ronald Oussoren added the comment:
The last bit of the call stack according to lldb:
* thread #2, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00018b3419b8 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x00018b374eb0 libsystem_pth
Ronald Oussoren added the comment:
Error output when running the script:
2022-02-01 22:15:32.213 Python[5468:5726153] ApplePersistenceIgnoreState:
Existing state will not be touched. New state will be written to
/var/folders/d3/rc5nx4v12y96knh2px3bpqscgn/T/org.python.python.savedState
Ronald Oussoren added the comment:
Python's is behaving as expected here (but see below): the slots definition
tells the interpreter which attribute names can be set on an instance and
"__slots__" is not one of those attributes in your code. "a.__slots__ += ..."
Change by Ronald Oussoren :
--
components: +macOS
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue46548>
___
___
Python-bugs-list mailin
Ronald Oussoren added the comment:
The touch method combines the mode you specify with the active umask (set by
os.umask()). This is fairly standard behaviour for Unix APIs that accept a
file mode.
This is documented at:
https://docs.python.org/3/library/pathlib.html#pathlib.Path.touch
Ronald Oussoren added the comment:
This is most likely a problem with PyQt6. Please ask that project first (with a
clearer description of what goes wrong and on which platforms).
--
nosy: +ronaldoussoren
resolution: -> third party
stage: -> resolved
status: open -&g
Ronald Oussoren added the comment:
> My understanding of the resolution of this ticket is that it is still not
> possible to use setrlimit with RLIMIT_STACK to raise the soft stack limit.
> Is that correct?
Yes, the code in msg324731 still fails. We're still using the mechan
Ronald Oussoren added the comment:
The libraries you mention are 3th party projects. Please check with the
project first.
I've look at the GitHub repository for libmobiledevice and have no idea how
they determine the compiler flags for Python. As mentioned in an earlier
version &q
Ronald Oussoren added the comment:
Part of the problem here is that most keys in the result of
sysconfig.get_config_vars() are copied as-is from the CPython Makefile and
pyconfig.h header file.
The keys copied from the Makefile are in a lot of cases not useful for users of
python because
Ronald Oussoren added the comment:
I agree with Terry. This requires a clear proposal that describes the behaviour
and differences with ABC-s.
I'm closing this issue for now.
--
nosy: +ronaldoussoren
resolution: -> later
stage: -> resolved
status: ope
Ronald Oussoren added the comment:
I don't know why it doesn't work for you. The version of Tk looks recent enough.
As I mentioned before I don't see this problem using the script in your initial
message, it works fine both with and without changing the size of the window.
Ronald Oussoren added the comment:
The script seems to work fine for me, python 3.10.1 on macOS 12.1. I used the
python.org installer.
Did you install Python from source or using the installer? What's the output of
``python3 -m test.pythoninfo``, in particular the lines related to Tcl/
Ronald Oussoren added the comment:
Pfff Apple's documentation is too incomplete.
In recent versions the apple events entitlement only works when the program
also has an NSAppleEventsUsageDescription key in Info.plist with a string value
that describes why it needs the entitlement,
Ronald Oussoren added the comment:
It looks like this is related to code signing and entitlements, in particular:
* On my system Terminal.app is in the "Automation" list in the Security &
Privacy control panel, and none of the installed Python Launchers are
* The script l
Ronald Oussoren added the comment:
FWIW, I'm experimenting with using Scripting Bridge instead of raw Apple Events
in Python Laucher. Mostly to check if that fixes the issue because I can run
scripts in Terminal using Scripting Bridge from a Python script using PyObjC.
Scripting B
Ronald Oussoren added the comment:
Are you on macOS 10.15 or later? If so, this is a duplicate of issue40477.
A workaround mentioned in that issue is to make sure that Terminal.app is open.
--
type: crash -> behavior
___
Python tracker
<
New submission from Ronald Oussoren :
There are two ways to develop against a Python.framework on MacOS:
1. Use the regular Unix pattern with "#include "Python.h", using compiler flags
to select the right headers and libraries.
2. Using the native framework pattern with
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
___
Py
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
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/issue45
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)
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
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"
>
>
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
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
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 .
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
* Serve
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 inco
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 -&g
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
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
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: +ronaldous
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
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 1
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&
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
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
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
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 th
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 on
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
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.ext
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 Py
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 --
Change by Ronald Oussoren :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue45183>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Ronald Oussoren :
--
nosy: +pablogsal, twouters
___
Python tracker
<https://bugs.python.org/issue45183>
___
___
Python-bugs-list mailing list
Unsub
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
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.
--
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 track
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 w
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
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
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
Change by Ronald Oussoren :
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue45020>
___
___
Python-bugs-list mailing list
Unsubscribe:
1 - 100 of 2445 matches
Mail list logo