pypy ctypes.pythonapi has no symbol Py_FileSystemDefaultEncoding
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Martin Packman |
Bug Description
The check in bzrlib.
pythonapi = getattr(ctypes, "pythonapi", None)
if pythonapi is None:
# Not CPython ctypes implementation
return
and if that succeeds it tries:
old_ptr = ctypes.
Unfortunately pypy (since 1.6 at least) passes the check but fails the symbol lookup.
This can be triggered for example in bzrlib.
Traceback (most recent call last):
File "app_main.py", line 51, in run_toplevel
File "/home/
import bzrlib
File "/home/
_fs_enc = _patch_
File "/home/
old_ptr = ctypes.
File "/home/
return self.from_
ValueError: No symbol Py_FileSystemDe
I'm not sure what the right approach is here. Can we depend on all CPython instances not raising the ValueError?
Check for known non-CPythons?
Related branches
- Jelmer Vernooij (community): Approve
- Wouter van Heyst: Pending requested
-
Diff: 21 lines (+4/-7)1 file modifiedbzrlib/__init__.py (+4/-7)
Changed in bzr: | |
assignee: | nobody → Martin Packman (gz) |
status: | Confirmed → In Progress |
Changed in bzr: | |
milestone: | none → 2.5.0 |
status: | In Progress → Fix Released |
Changed in bzr: | |
milestone: | 2.5.0 → 2.5b6 |