Update version numbers to prepare for v2.1 release by ngoldbaum · Pull Request #250 · python-cffi/cffi · GitHub
Skip to content

Update version numbers to prepare for v2.1 release#250

Open
ngoldbaum wants to merge 6 commits into
python-cffi:mainfrom
ngoldbaum:update-2.1-version-numbers
Open

Update version numbers to prepare for v2.1 release#250
ngoldbaum wants to merge 6 commits into
python-cffi:mainfrom
ngoldbaum:update-2.1-version-numbers

Conversation

@ngoldbaum

Copy link
Copy Markdown
Contributor

I also updated a few stray spots referring to Python versions that are no longer supported.

A maintainer will need to create a release-2.1 branch after this is merged.

@ngoldbaum ngoldbaum force-pushed the update-2.1-version-numbers branch from adf44f6 to 2a462c3 Compare June 29, 2026 21:04
@ngoldbaum

Copy link
Copy Markdown
Contributor Author

Comment thread doc/source/whatsnew.rst
* Added support for Python 3.15 and support for C extensions generated by CFFI to target the new ``abi3t`` free-threaded ABI. (`#232`_)
* Avoid crashes inside of ``__delitem__``. (`#235`_)
* Avoid "string too big" error under MSVC. (`#167`_)
* Fix mingw builds. (`#198`_)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to mention the new build tool to support non-setuptools build systems?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, of course that's a pretty big new feature!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was already a release note but it was in the 2.0 notes. I moved it into the correct section.

Comment thread src/cffi/_embedding.h
if (f != NULL && f != Py_None) {
PyFile_WriteString("\nFrom: " _CFFI_MODULE_NAME
"\ncompiled with cffi version: 2.0.1.dev0"
"\ncompiled with cffi version: 2.1.0.dev0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test that this matches the __version_info__?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And could this use CFFI_VERSION instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't easily use CFFI_VERSION without adding a new header, since that define lives at the top of src/c/_cffi_backend.c.

There is a test for this:

$ pytest testing/cffi0/test_version.py
============================================= test session starts =============================================
platform darwin -- Python 3.15.0b3, pytest-9.1.1, pluggy-1.6.0
rootdir: /Users/goldbaum/Documents/cffi
configfile: pyproject.toml
collected 5 items

testing/cffi0/test_version.py ....F                                                                     [100%]

================================================== FAILURES ===================================================
______________________________________________ test_embedding_h _______________________________________________

    def test_embedding_h():
        cffi_root = Path(os.path.dirname(__file__)).parent.parent
        v = cffi.__version__
        p = cffi_root / 'src/cffi/_embedding.h'
        content = _read(p)
>       assert ('cffi version: %s"' % (v,)) in content
E       assert ('cffi version: %s"' % ('2.1.0.dev0',)) in '\n/***** Support code for embedding *****/\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n\n#if defined(_WIN32)\n#  d...\n#undef cffi_compare_and_swap\n#undef cffi_write_barrier\n#undef cffi_read_barrier\n\n#ifdef __cplusplus\n}\n#endif\n'

testing/cffi0/test_version.py:62: AssertionError

I went ahead and updated the test to make that error message nicer for the next person who needs to do this. See the second-to-last commit.

@mattip mattip left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a few small nits so this is less painful next time.

@ngoldbaum

Copy link
Copy Markdown
Contributor Author

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.

2 participants