-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Description:
After upgrading to cffi v2.0.0, downstream libraries (notably statsmodels) are failing because cffi.FFI is no longer accessible as a top-level attribute of the cffi module.
In version 1.x, it was standard to initialize the interface via cffi.FFI(). In v2.0.0, this now raises an AttributeError.
We are seeking clarification on whether this is an intentional breaking change for the 2.0.0 roadmap (requiring downstream updates) or an unintended packaging/export issue.
Environment:
- cffi version: 2.0.0
- Python version: 3.12
- OS: Manjaro Linux
Steps to Reproduce:
import cffi
print(f"CFFI Version: {cffi.__version__}")
# This worked in 1.17.x, but fails in 2.0.0
try:
ffi = cffi.FFI()
print("Successfully initialized FFI")
except AttributeError as e:
print(f"Error: {e}")Observed Behavior:
CFFI Version: 2.0.0
Error: module 'cffi' has no attribute 'FFI'
Impact:
This currently breaks statsmodels.stats.multicomp.pairwise_tukeyhsd, which is widely used in the scientific Python ecosystem (often within JupyterLab environments where cffi is a transitive dependency).
Traceback from statsmodels:
File ".../statsmodels/stats/multicomp.py", line 123, in pairwise_tukeyhsd
ffi = cffi.FFI()
AttributeError: module 'cffi' has no attribute 'FFI'
Questions:
- Is
cffi.FFIintentionally moved or removed in v2.0.0? - Is there a new recommended way to instantiate the FFI object (e.g., a specific sub-module import)?
- Should downstream maintainers pin
cffi < 2.0.0for compatibility?
Metadata
Metadata
Assignees
Labels
No labels