rpm-python uses PyCObject API (deprecated in Python 2.7)
Bug #633649 reported by
Jeff Johnson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
RPM |
New
|
Wishlist
|
Unassigned | ||
Fedora |
Fix Released
|
Medium
|
Bug Description
Tracker
tags: | added: fedora python |
Changed in rpm: | |
importance: | Undecided → Wishlist |
Changed in fedora: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
To post a comment you must log in.
Description of problem: docs.python. org/dev/ whatsnew/ 2.7.html# capsules
Python 2.7 deprecated the PyCObject API in favor of a new "capsule" API.
http://
The deprecations are set to "ignore" by default, so in theory the API still works.
However the deprecation has caused at least one app to fail (virt-manager, see bug 620216, due to it modifying the warning settings), so I've been doublechecking the scope of usage of the PyCObject API, and am filing bugs against components that are possibly affected.
You can trigger a hard failure of the API via: filterwarnings( 'error' )
>>> import warnings
>>> warnings.
and then try to use the module (sorry; I don't have a more specific reproducer for this package yet)
I'm not yet sure what the best approach is to fixing this.
Version-Release number of selected component (if applicable): 1-4.fc14. src.rpm
rpm-4.8.
Grepping prepped source tree shows these uses: 8.1/python/ header- py.c:371: } else if (PyCObject_ Check(obj) ) { 8.1/python/ header- py.c:372: h = PyCObject_ AsVoidPtr( obj); 8.1/python/ spec-py. c:37: PyObject *ptr = PyCObject_ FromVoidPtr( h, NULL); 8.1/ChangeLog: 753: Permit header object generation from PyCObjects 8.1/ChangeLog: 24215: OTOH we need to call PyCObject_ FromVoidPtr( ) with non-const cast..
./rpm-4.
./rpm-4.
./rpm-4.
./rpm-4.
./rpm-4.