Skip to content

Conversation

@nitzmahone
Copy link
Member

  • fix packaging issue; change source layout and adjust tests to avoid masking similar issues in the future

nitzmahone and others added 2 commits September 25, 2023 21:51
* move the distutils shim module back to a plain module

* MANIFEST.in, the source layout, and pytest's default sys.path behavior conspired to mask a busted package, even though we were testing against the built package. `pytest` adds cwd to the path first, and since the `cffi` is in the root (grr), even though we're testing against the installed wheel, pytest loaded the subpackage from the source, masking that it was missing from the actual package (due to flat inclusions in MANIFEST.in). This is a longer-term problem that should be addressed by moving to a standard `src/` layout, and possibly also by bringing `_cffi_backend` in as a subpackage, but there are likely many dragons there with wheels that assume the presence of the top-level package.

* move project sources under src/

(cherry picked from commit 932eba2)
@nitzmahone nitzmahone merged commit e20c65d into python-cffi:release-1.16 Sep 26, 2023
colesbury pushed a commit to colesbury/cffi that referenced this pull request Jun 26, 2025
Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
nitzmahone pushed a commit that referenced this pull request Jul 28, 2025
* Initial support for free threaded Python (#1)

* fix various errors and warnings seen on clang and gcc

* use manylinux 2_28 on x86_64 (this will be the default in manylinux 3)

* split CT_LAZY_FIELD_LIST into a new listing of ct_flags_mut flags

* Add CT_UNDER_CONSTRUCTION to indicate that a type is being mutated

* adjust assert

* only set CT_UNDER_CONSTRUCTION during lazy init

* Move CT_CUSTOM_FIELD_POS and CT_WITH_PACKED_CHANGE to ct_flags_mut

* rearrange and add asserts in do_realize_lazy_struct

* remove unhelpful comment

(Kumar will fix this soon!)

* replace ct_is_hidden with asserts

* clarify comment

* fix thread safety of _realize_c_struct_or_union

* fix missing unlock

* mark tests as thread unsafe

* mark TestZIntegration as thread unsafe

* fix headers to avoid duplicated definitions

* fix thread safety of enum (#10)

* fix thread safety of cffi (#13)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>

* add trove classifier

* add missing CI jobs

* back out unnecessary CI config changes

* pin cibuildwheel<3 in CI config

* reduce the number of pytest-run-parallel jobs

* remove unnecessary thread_unsafe markers, add reasons for all others

* expand whatsnew

* add 3.13t pytest-run-parallel jobs

* revert more unnecessary changes

* disable gil in extension produced by verify tests

* fail the tests if the GIL is enabled at tests completion

* force realizing lazy structs in ffi_sizeof

* remove out-of-date FIXME

* tweak error

* revert unnecessary change

* Unconditionally clear weak refs in ctypdescr_dealloc to avoid race in CPython internals.

see python/cpython#135607

* mark tests as thread-unsafe that might concurrently call dlclose on the same extension

* apply fix from c02343c in a few more spots

* check for lazy_field_list in force_lazy_struct

* use atomic loads for opcodes in realize_c_type_or_func_now

* address code review

* remove skips

* add thread safety note for realize_c_type_or_func

* use atomics for ct_stuff

* Simplify ct_stuff handling

* use _CFFI_LOAD_OP

* use one global cffi lock for thread safety

* do not export dummy

* skip

* unconditionally heap-allocate _ffi_type output

* move mutable flags to bitflags for ct_flags_mut field

* fix refleak

* Apply suggestions from code review

Co-authored-by: Kumar Aditya <kumaraditya@python.org>

* apply matti's review comments

* update version numbers

* remove PYPY trove classifier

* expire pointer conversion deprecation to fix tests

* error on free-threaded Python 3.13

* drop 3.13t CI and wheel builds

* drop cibuilwheel ~=3.0b1

* delete now-unnecessary CIBW_ENABLE env var

---------

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant