Ronald Oussoren added the comment:
@Michael: The relevant code is in Python/thread_pthread.h:
https://github.com/python/cpython/blob/bf8162c8c45338470bbe487c8769bba20bde66c2/Python/thread_pthread.h#L34
There are already blocks for macOS and FreeBSD, adding a block for AIX should
be easy
Ronald Oussoren added the comment:
That code is only called if THREAD_STACK_SIZE is defined. The block I mention
defines it for macOS and FreeBSD, but not for other platforms. I therefore
expect that this code is not used on AIX (which would be easy enough to verify
by adding an #error to
Ronald Oussoren added the comment:
New changeset 9670ce76b83bde950020f8d89c4d27168aaaf912 by Ronald Oussoren
(Michael Felt) in branch 'master':
bpo-18049: Define THREAD_STACK_SIZE for AIX to pass default recursion limit
test (GH-15081)
https://github.com/python/cpyt
Change by Ronald Oussoren :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ronald Oussoren added the comment:
This is almost certainly a bug in macOS. I wonder if it is possible to work
around it in Python.
--
___
Python tracker
<https://bugs.python.org/issue37
Ronald Oussoren added the comment:
See also <https://sqlite.org/c3ref/enable_shared_cache.html>. Apple basically
disabled this function starting at macOS 10.7, that's why there's a warning.
It is possible to suppress the warning, but I don't think its worth the trou
Ronald Oussoren added the comment:
What version of macOS did you test on?
--
___
Python tracker
<http://bugs.python.org/issue30749>
___
___
Python-bugs-list mailin
Ronald Oussoren added the comment:
Joshua: does your script use os.fork(), or multiprocessing?
In that case this is a known issue made worse on High Sierra: _scproxy uses
Cocoa libraries, and those cause problems when using for without exec. In High
Sierra the Cocoa libraries are more strict
Ronald Oussoren added the comment:
I proprose closing this issue as there's too little information to reproduce
the problem, the crash is using a system build of Python on a beta version of
macOS and this appears to be a known issue.
--
___
P
Ronald Oussoren added the comment:
In foo2.py you import "a.foo", which refers to module 'a' that isn't included
in the directory structure you describe. I'm assuming 'dirc' should be 'a' to
match the code.
How did you run foo1.py?
When r
New submission from Ronald Oussoren:
It would be nice if there were a way to mark a TestCase.subTest as an expected
failure.
I have a number of testcases that use the subTest feature and where a small
subset of those tests are expected failures due to platform issues. It would be
nice if it
Ronald Oussoren added the comment:
That's correct, I have a test like:
def test_something(self):
for info in CASES:
with self.subTest(info):
self.assert_something(info)
For some values of 'info' the test is known to fail and I want to mark those as
e
Ronald Oussoren added the comment:
An alternative solution, which is more invasive is to explicitly use weak
linking, as is already used for some ancient APIs in posixmodule.c (look for
"lchown" in Modules/posixmodule.c).
This is more invasive, but would be helpful for upstre
Ronald Oussoren added the comment:
I don’t understand this either. For some reason the patch works when using the
function and not when using the macro.
I haven’t looked into this yet, and am currently traveling. I should have time
to look into this starting December 5th when I’m back home
Ronald Oussoren added the comment:
Why do you want to change this?
The current behavior is consistent with the platform name (Darwin). I’ve filed
an issue in the past to change the platform name to “macosx”, but there were
good arguments to not change the behavior at the time. The existence
Ronald Oussoren added the comment:
I should have been clearer in my previous post. I’m not against changing this,
but would like an implementation that returns consistent information: either
return “macOS” and the macOS version, or “Darwin” and the kernel version.
IIRC there is, or used to
Ronald Oussoren added the comment:
AFAIK there is nothing you can do between after calling fork(2) to
"reinitialise" the ObjC runtime. And I don't think that's the issue anyway: I
suspect that the actual problem is that Apple's system frameworks use
multithreading (
Ronald Oussoren added the comment:
This issue does not have enough information to determine what is wrong. It is
however fairly clear that it is not related to "scutil --get HostName"
mentioning that there is no hostname set as that is the normal state of
systems, and I have neve
New submission from Ronald Oussoren :
PyDict_GetItemWithError is a variant of PyDict_GetItem that doesn't swallow
unrelated exceptions. While converting a project to use this API I noticed
that there is similar variant of PyDict_GetItemString.
It would be nice to
Ronald Oussoren added the comment:
I'm in favour of removing macpath.
I was against removing the module in the past because parts of the macOS API
still used (on probably still use) classic MacOS style paths. Most if not all
APIs are by this time deprecated, which makes it less and
Ronald Oussoren added the comment:
>>My gut feeling is that this is some issue with your system or environment.
> I Doubt it, happens with another MacBook air which is literally out of the
> box, no mods.
But on the other hand most other users (including myself and Ned) don&
Ronald Oussoren added the comment:
BTW. A related problem with platform.architecture() is that it doesn't know how
to deal with fat binaries (such as those found on macOS).
As an example:
$ file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 2 architectures: [i386:M
Ronald Oussoren added the comment:
> What result of platform.architecture() do you expect for an universal binary?
I honestly don't know. What is the purpose of this functionality in the first
place? I have never had a problem where using this function was the right
solution.
To b
Ronald Oussoren added the comment:
> IMHO platform.architecture() should return 32bit when running "arch -i386
> /usr/local/bin/python3" to be consistent with struct.calcsize("P") == 4 and
> sys.maxsize == 2147483647. Otherwise, how would you notice that you are
Ronald Oussoren added the comment:
The patch does not use the version information passed in to calculate the
marketing version. That's a problem when passing in low-level information from
a system running a different version of macOS (for example passing in the
low-level version inform
Ronald Oussoren added the comment:
A better workaround is IMHO to force the socket to be IPV6 only:
sd = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0)
sd.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 1)
That avoids the ordering problem as well as having to try all possible
Ronald Oussoren added the comment:
#include in the macOS 10.14 SDK says:
/*
* RFC 3542 define the following socket options in a manner incompatible
* with RFC 2292:
* IPV6_PKTINFO
* IPV6_HOPLIMIT
* IPV6_NEXTHOP
* IPV6_HOPOPTS
* IPV6_DSTOPTS
* IPV6_RTHDR
*
* To use the
New submission from Ronald Oussoren :
The documentation for import lib.machinery.ModuleSpec says that the attribute
"loader" should be None for namespace packages (see
<https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec>)
In reality the load
Ronald Oussoren added the comment:
@barry: I agree on both.
Do you know why the namespace package loader lies about the source and code?
Both .get_source() and .get_code() return a value that isn't None.
And likewise: Why is the namespace package loader a private class, other
loader
Ronald Oussoren added the comment:
See:
<https://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier>
Basically all names starting with double underscores are reserved for the
implementation in C++. Likewise for all names starting w
Ronald Oussoren added the comment:
The background for all of this: I'm currently rewriting modulegraph
(https://pypi.org/project/modulegraph/) to use importlib instead of its own
implementation of the import mechanism.
I currently detect PEP420 style namespace packages, but I'm n
Ronald Oussoren added the comment:
(changed the type from "security" because this is not a security incident).
Both ISO C and C++ define "reserved identifiers" that are reserved for the
implementation and where use in programs is undefined behaviour. However, these
defi
Ronald Oussoren added the comment:
This is intentional, see
<https://docs.python.org/3/reference/lexical_analysis.html#floating-point-literals>.
In floating point literals the underscores must always be between two digits.
--
nosy: +ronaldoussoren
resolution: -> not a b
Ronald Oussoren added the comment:
Victor, the binaries are build on the macOS version mentioned in the download.
That is, the modern 64-bit installers are build on macOS 10.9 with the 10.9
SDK, the older 32/64-bit intel installers are build on macOS 10.6 with the 10.6
SDK.
With some work
Change by Ronald Oussoren :
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue32146>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ronald Oussoren :
Using Python 3.7.2 on macOS 10.14 I get an unexpected exception when calling
"importlib.util.find_spec('py')" after importing "py". find_spec works as
expected before I import 'py'.
See the repl session below:
Ronald Oussoren added the comment:
This might be a bug in "py", which uses a vendored version of apipkg that
replaces sys.modules["py"] with a lazy loading object. That copy of apipkg does
not copy __spec__ into the lazy loading object.
If this is indeed consider to be a
Ronald Oussoren added the comment:
As a late response to msg333416 and msg333547, I don't agree with looking at
__index__ in _PyTime_FromObject.
The __index__ method is used when an object can be used as the index for a
sequence, but should not silently convert to int or float.
Ronald Oussoren added the comment:
Using __index__ here doesn't feel right, although I can't explain why yet.
--
___
Python tracker
<https://bugs.python.o
Ronald Oussoren added the comment:
> In other words: if we can only use __float__ and __int__, how do we know
> which one to use?
I guess __index__. I've read the definition of object.__index__ in the data
model documentation, and using __index__ for this conversion is fine
Ronald Oussoren added the comment:
I expected as much.
I've filed an issue with apipkg for this:
https://github.com/pytest-dev/apipkg/issues/13.
My next challenge is to find a way to work around this issue in my code.
BTW. Typing.io is a namespace added to sys.modules by the t
Ronald Oussoren added the comment:
The reason I filed #35791 is that I'm rewriting modulegraph[1] using importlib
and run into some problems due to importlib.util.find_spec() failing for names
that are already imported.
Working around that in general probably will require reimpleme
Ronald Oussoren added the comment:
In response to my previous message: "Messing" with sys.modules appears to be
good enough work around for me, at least in the limited testing I've done so
far. The new version of modulegraph hasn't seen any testing beyond a largish
set
Ronald Oussoren added the comment:
Issue #34663 contains some earlier discussion about vfork, in the context of
supporting a specific posix_spawn flag on Linux.
W.r.t. closing all file descriptors > 2: posix_spawn_file_actions_addclose can
do this when using posix_spawn. That would hav
Ronald Oussoren added the comment:
BTW. I hadn't noticed _close_open_fds_safe, that should be safe when using
vfork().
Finally: I have no strong opinion on this patch, your explanation looks fine
and I'm not up-to-speed w.r.t. implementation details of vfork and the lik
Ronald Oussoren added the comment:
Note that I will have to special case namespaces like typing.re anyway in my
code, being a namespace that does not correspond to a "real" module whose code
I can analyse.
#35791 was mostly about 3th-party code like apipkg that are "real&quo
Change by Ronald Oussoren :
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue10915>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ronald Oussoren added the comment:
See also #35673.
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue35843>
___
___
Python-bugs-list m
Ronald Oussoren added the comment:
The all_proxy setting is used by other software as well, see for example the
manpage for curl and this feature request for requests
<https://github.com/requests/requests/issues/3183>.
Adding support for all_proxy to urllib sounds like a useful feat
Ronald Oussoren added the comment:
Was this merged too soon? This is new functionality without any docs and tests.
I've also left review comments on the pull request.
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.py
Ronald Oussoren added the comment:
FWIW I agree with reverting this pull request, the work is clearly not finished
yet.
--
___
Python tracker
<https://bugs.python.org/issue35
New submission from Ronald Oussoren :
Python supports having a C extension for the the __init__ of a package (instead
of having __init__.py). This works fine on Linux, but on Windows distutils
fails to build the C extension because it assumes the entry point is named
PyInit___init__ while
Ronald Oussoren added the comment:
FWIW the project in question is modulegraph2
<https://bitbucket.org/ronaldoussoren/modulegraph2/src/default/>, which almost
works on Windows, except for this issue and some incorrect code on my side that
assumes virtualenv on Windows behaves the same
Ronald Oussoren added the comment:
David,
I don't agree with merging at this point.
The lack of documentation makes it hard to ask for more feedback and broader
testing, because people won't know how to use the library and provide
constructive feedback (that's why my rev
Ronald Oussoren added the comment:
Please also address my review comments.
--
___
Python tracker
<https://bugs.python.org/issue35813>
___
___
Python-bugs-list m
Ronald Oussoren added the comment:
@Paul, modulegraph2 uses flit, but I do use setuptools to build extensions in
the test suite. The problematic setup.py file is in testsuite/nodebuilder-tree.
I do have a workaround in that setup.py:
# START
def get_export_symbols(self, ext):
parts
Ronald Oussoren added the comment:
The bug is the stdlib, and I've checked that setuptools just calls the code in
distutils in this case.
IMHO it would be better to fix this in the stdlib.
(Unselecting python 3.6 because that's in security-only mode by now)
--
versions
Change by Ronald Oussoren :
--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
___
Python tracker
<https://bugs.python.org/issue35
Ronald Oussoren added the comment:
@Neil: On what version of macOS did you test?
On 10.14.3 with Xcode 10.1 shm_open is in libSystem (that's named libc on most
other unixy systems) and there is no library named librt.
--
nosy: +ronaldous
Ronald Oussoren added the comment:
Could you expand on why instancemethod is amazing, other than that's it is
apparently fast at something.
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/is
Ronald Oussoren added the comment:
Adding PyDict_GetItemStringWithError makes is possible to migrate existing code
to a design that does not ignore errors. I have a significant number of calls
to PyDict_GetItemString that cannot be switch toed PyDict_GetItem without
increasing the number
Ronald Oussoren added the comment:
There are more reasons to implement in C than just speed ;-). In my code I have
two usecases for using PyDict_GetItemString, both not in performance critical
code
1) Look up a hardcoded name in a dictionary. These could be switched to the Id
API if that
Ronald Oussoren added the comment:
I can live without this API, I mostly filed this issue because there's an
obvious hole in the API when you look at API description: SetItem,
SetItemString, DelItem, DelItemString, GetItem, GetItemString,
GetItemWithError, <>.
Thanks for the e
Ronald Oussoren added the comment:
On which Python versions do you see this problem? Both tests pass on my system
(macOS 10.4.3) with Python 3.7.2, 3.6.3 and 3.5.5.
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue35
Ronald Oussoren added the comment:
This issue can be closed. Status quo wins due to backward compatibility
concerns.
BTW. The primary reason for proposing "macosx" as the return value for
platform.system() is that the platform name as used in egg files (at the time,
now wheels)
Ronald Oussoren added the comment:
I don't know a good reason for including $PWD in sys.path for "python -m", I
expect only scripts that run other scripts (such as coverage.py) might want the
current behaviour and those can adjust to new behaviour.
For "python -c CMD&qu
Ronald Oussoren added the comment:
In Python 3.7.2:
>>> open(2, 'a')
<_io.TextIOWrapper name=2 mode='a' encoding='UTF-8'>
>>> m = _
>>> m.name
2
>>> type(_)
That is, when opening a file descriptor the name is set to th
Ronald Oussoren added the comment:
What is your use case for this? Is that something that can use the buffer API
instead of these low-level APIs?
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue36
Ronald Oussoren added the comment:
On macOS 10.12:
ronald$ LC_ALL=en_US python2.7 -c 'import locale;
print(repr(locale.getpreferredencoding()))'
''
ronald$ LC_ALL=en_US python3.6 -c 'import locale;
print(repr(locale.getpreferredencoding()))'
'UTF-8'
ge
Ronald Oussoren added the comment:
I don't know why the feature was deprecated, is was deprecated a long time ago
by Just.
I agree that the feature is convenient at times, but it is also different from
how dicts are generally used.
BTW. I'm in favour of removing the feature, not h
Ronald Oussoren added the comment:
The alternative to filing a RADAR is to just use the open command instead of
osascript (basically what's suggested in msg293950 but directly using
subprocess.check_call(["/usr/bin/open", ...]) instead of involving osascript).
For 3.7 it mig
Ronald Oussoren added the comment:
This indeed appears to be a bug in osascript, the scriptlet still works when
using the AppleScript Editor application, which means the AppleScript
environment itself and browser scripting support still work
Ronald Oussoren added the comment:
FWIW: The bug in osascript is still present in the current 10.12.6 beta (build
16G8c)
--
___
Python tracker
<http://bugs.python.org/issue30
Ronald Oussoren added the comment:
A disadvantage of requiring "from . import ..." to import modules next to the
script is that this requires a different mechanism before and after
installation of a script.
That is, before installation the additional modules are next to the scri
Ronald Oussoren added the comment:
If only someone had access to the time machine keys to fix this 20 year ago
:-(. Anything beyond that last option (recognising that the script tries to
import itself under another name) is bound to run into odd issues or backward
compatibility concerns
Ronald Oussoren added the comment:
The macOS failures are at least partially caused by test assumptions that
aren't true on macOS: in particular the filesystem encoding defaults to UTF-8
on macOS (because HFS+ and the recent APFS filesystem store unicode data and
not pure byte st
Ronald Oussoren added the comment:
I guess it depends on what the information is used for. From a quick glance at
the code I'd say that the current usage is correct, and that
GetNativeSystemInfo could be used when reporting about the currently running
system (for example by functions i
Change by Ronald Oussoren :
--
versions: +Python 2.7, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue36259>
___
___
Python-bugs-list m
Ronald Oussoren added the comment:
One thing to keep in mind: HAVE_UNICODE_WCHAR_CACHE == 1 and
HAVE_UNICODE_WCHAR_CACHE == 0 have a different ABI due to a different struct
layout. This should probably affect the ABI tag for extension modules.
--
nosy: +ronaldoussoren
Ronald Oussoren added the comment:
Switches from #define's to an enum would allow explictly deprecating the old
name (at least with clang and probably with GCC as well):
clang -c -Wall t.c
t.c:12:10: warning: 'READONLY' is deprecated: use PY_READONLY
[-Wdeprecated-declaratio
Ronald Oussoren added the comment:
A discussion on the use of enum and deprecation warnings might be useful,
although there is a significant risk on bike shedding.
I agree that formally deprecating READONLY can lead to uglier code in extension
that use the value and need to support anything
Ronald Oussoren added the comment:
Given a quick scan of RFC 3986[1] I'd say that the behaviour of Ruby seems to
be the most correct. That said, I'd also check what the major browsers do in
this case (FWIW both FF and Safari use 'benign.com' as the hostname in this
Ronald Oussoren added the comment:
This is not a bug:
* "python -m NAME" runs module (or package) NAME as a script, NAME should
therefore be a module name and not a filename (and hence not have a .py suffix)
* "python NAME" runs a script in file NAME and should therefore
Ronald Oussoren added the comment:
Given a python script in a file named foo.py in the current directory:
* python -m foo
Should, and does, work.
* python -m foo.py
Raises an error, because the command tries to run the submodule "py" of
module "foo" as the
Ronald Oussoren added the comment:
This might cause a MemoryError when the __length_hint__ of the source returns a
too large value, even when the actual size of the comprehension is smaller,
e.g.:
[x**2 for x in range(LARGE_VALUE) if is_prime(x)]
See also issue28940
--
nosy
Ronald Oussoren added the comment:
This is a duplicate of issue36010, which contains an explanation of why there
is no installation method with a zipfile.
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue36
Ronald Oussoren added the comment:
The program you include in your report will crash because the interpreter is
never initialised.
See the embedding documentation for more information:
https://docs.python.org/3/extending/embedding.html
--
resolution: -> not a bug
status: o
Ronald Oussoren added the comment:
This could be a duplicate of Issue34572
--
nosy: +ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue36
Ronald Oussoren added the comment:
We generally don't drop support for OS versions in patch releases for Python.
The 3.8 installer will require macOS 10.9, as does the default x86-64 installer
for 3.7.
--
___
Python tracker
&
Ronald Oussoren added the comment:
@larry: plists are Apple's equivalent to Windows INI files ;-)
--
___
Python tracker
<https://bugs.python.org/is
Ronald Oussoren added the comment:
I agree, as long as there are other buildbots for macOS (and there appear to be
buildbots for macOS 10.12 and 10.13).
It would be nice to have buildbots running the OS releases for which installers
are build (10.6 and 10.9), but that's a different
Ronald Oussoren added the comment:
Is there anything we (the CPython developers) can do about this?
If I read the issue correctly clang 5.x generates faster binaries than clang
3.x and 4.x. If that is indeed the issue there's probably not much we can do
about this.
BTW. I
Ronald Oussoren added the comment:
I different question w.r.t. detection of the clang/llvm version on Apple's
system compiler: Is it worthwhile to do so?
If the compiler included in the Xcode 9.3 beta (and hence likely the one in
Xcode 9.3 final) fixes the performance issue a very
Ronald Oussoren added the comment:
<https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address.reverse_pointer>
documents that this attribute contains the name of the DNS name that could be
used to query for PTR record.
That functionality is not well defined for a network
Ronald Oussoren added the comment:
The 3.7b1 64-bit installer includes a local copy of Tcl/Tk (see
Mac/BuildScript/build-installer.py), which could be changed as needed. That
said, I'm not advocating changing default Tcl/Tk configuration options because
I don't know how well fu
Ronald Oussoren added the comment:
The ApplePersistenceIgnoreState setting (either in user defaults or an
info.plist file) is IMHO not the right solution, as this is a setting intended
to be used for testing (see
<https://developer.apple.com/library/content/releasenotes/AppKit
Ronald Oussoren added the comment:
Note that I'm still -1 on merging this patch because it is unclear how to
create such plist files using public Apple APIs.
P.S. The low-level code for creating and reading binary plist files appears to
be used for more than juist plist arc
Ronald Oussoren added the comment:
@bigfootjon: Cocoa keyed archives are not plist files.
--
___
Python tracker
<https://bugs.python.org/issue26707>
___
___
Pytho
Ronald Oussoren added the comment:
The "reverse_pointers" attribute is implicitly documented by this phrase in the
introduction of network objects:
--
All attributes implemented by address objects are implemented by network
objec
Ronald Oussoren added the comment:
I'm still not too happy about supporting UIDs in plistlib, especially because
I'm not sure it that's all that's needed. AFAIK I removed more types that the
underlying encoder supported from plistlib because those are never used in
plis
1101 - 1200 of 2445 matches
Mail list logo