Skip to content

Commit

Permalink
release 1.16.0rc1
Browse files Browse the repository at this point in the history
* change most Heptapod links/refs to GH equivalents
* remove Mercurial support files
* remove (some) obsolete docs
  • Loading branch information
nitzmahone committed Sep 25, 2023
1 parent 0dc7805 commit ff11e92
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 124 deletions.
13 changes: 0 additions & 13 deletions .hgignore

This file was deleted.

37 changes: 0 additions & 37 deletions .hgtags

This file was deleted.

21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ in the doc/ subdirectory.
Download
--------

[Download page](https://foss.heptapod.net/pypy/cffi/-/tags)
[Download page](https://github.com/python-cffi/cffi/releases)

Source Code
-----------

CFFI is developed using [Mercurial SCM](mercurial-scm.org/).
The source code is publicly available on
[heaptapod](https://foss.heptapod.net/pypy/cffi).

You can read more about how to contribute to the project on
[PyPy's documentation](https://doc.pypy.org/en/latest/contributing.html).
Source code is publicly available on
[GitHub](https://github.com/python-cffi/cffi).

Contact
-------
Expand All @@ -28,13 +24,8 @@ Contact
Testing/development tips
------------------------

To run tests under CPython, run::
To run tests under CPython, run the following in the source root directory::

pip install pytest # if you don't have pytest already
pip install pycparser
python setup.py build_ext -f -i
pip install pytest
pip install -e . # editable install of CFFI for local development
pytest c/ testing/

If you run in another directory (either the tests or another program),
you should use the environment variable ``PYTHONPATH=/path`` to point
to the location that contains the ``_cffi_backend.so`` just compiled.
2 changes: 1 addition & 1 deletion c/_cffi_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <Python.h>
#include "structmember.h"

#define CFFI_VERSION "1.15.1"
#define CFFI_VERSION "1.16.0rc1"

#ifdef MS_WIN32
#include <windows.h>
Expand Down
2 changes: 1 addition & 1 deletion c/test_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _testfunc(num):
# ____________________________________________________________

import sys
assert __version__ == "1.15.1", ("This test_c.py file is for testing a version"
assert __version__ == "1.16.0rc1", ("This test_c.py file is for testing a version"
" of cffi that differs from the one that we"
" get from 'import _cffi_backend'")
if sys.version_info < (3,):
Expand Down
4 changes: 2 additions & 2 deletions cffi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from .error import CDefError, FFIError, VerificationError, VerificationMissing
from .error import PkgConfigError

__version__ = "1.15.1"
__version_info__ = (1, 15, 1)
__version__ = "1.16.0rc1"
__version_info__ = (1, 16, 0, 'rc1')

# The verifier module file names are based on the CRC32 of a string that
# contains the following version number. It may be older than __version__
Expand Down
2 changes: 1 addition & 1 deletion cffi/_embedding.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static int _cffi_initialize_python(void)

if (f != NULL && f != Py_None) {
PyFile_WriteString("\nFrom: " _CFFI_MODULE_NAME
"\ncompiled with cffi version: 1.15.1"
"\ncompiled with cffi version: 1.16.0rc1"
"\n_cffi_backend module: ", f);
modules = PyImport_GetModuleDict();
mod = PyDict_GetItemString(modules, "_cffi_backend");
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
# built documents.
#
# The short X.Y version.
version = '1.15'
version = '1.16'
# The full version, including alpha/beta/rc tags.
release = '1.15.1'
release = '1.16.0rc1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/goals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ everything you need to access C code and nothing more.

--- the authors, Armin Rigo and Maciej Fijalkowski

.. _`issue tracker`: https://foss.heptapod.net/pypy/cffi/issues
.. _`issue tracker`: https://github.com/python-cffi/cffi/issues
.. _`mailing list`: https://groups.google.com/forum/#!forum/python-cffi
51 changes: 9 additions & 42 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ platform as well as on Windows 32 and 64. (It relies occasionally on
libffi, so it depends on libffi being bug-free; this may not be fully
the case on some of the more exotic platforms.)

CFFI supports CPython 2.7, 3.x (tested with 3.6 to 3.9); and is
distributed with PyPy (CFFI 1.0 is distributed with and requires
PyPy 2.6).
CFFI is tested with CPython 3.8-3.12.

The core speed of CFFI is better than ctypes, with import times being
either lower if you use the post-1.0 features, or much higher if you
Expand All @@ -31,7 +29,7 @@ libraries on PyPy.

Requirements:

* CPython 2.7 or 3.x, or PyPy (PyPy 2.0 for the earliest
* CPython 3.8+, or PyPy (PyPy 2.0 for the earliest
versions of CFFI; or PyPy 2.6 for CFFI 1.0).

* in some cases you need to be able to compile C extension modules.
Expand All @@ -52,26 +50,14 @@ Download and Installation:

* https://pypi.python.org/pypi/cffi

* Checksums of the "source" package version 1.15.1:

- MD5: f493860a6e98cd0c4178149568a6b4f6

- SHA1: c42a46cd11f6153f299cf10e9c236e8b2a143c21

- SHA256: d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9

* Or grab the most current version from the `Heptapod page`_:
``hg clone https://foss.heptapod.net/pypy/cffi``

* ``python setup.py install`` or ``python setup_base.py install``
(should work out of the box on Linux or Windows; see below for
`MacOS X`_.)
* Or grab the most current version from `GitHub`_:
``git clone https://github.com/python-cffi/cffi``

* running the tests: ``pytest c/ testing/`` (if you didn't
install cffi yet, you need first ``python setup_base.py build_ext -f
-i``)

.. _`Heptapod page`: https://foss.heptapod.net/pypy/cffi
.. _`GitHub project home`: https://github.com/python-cffi/cffi

Demos:

Expand All @@ -82,9 +68,9 @@ Demos:
ultimate reference is given by the tests, notably
`testing/cffi1/test_verify1.py`_ and `testing/cffi0/backend_tests.py`_.

.. _`demo`: https://foss.heptapod.net/pypy/cffi/-/tree/branch/default/demo
.. _`testing/cffi1/test_verify1.py`: https://foss.heptapod.net/pypy/cffi/-/blob/branch/default/testing/cffi1/test_verify1.py
.. _`testing/cffi0/backend_tests.py`: https://foss.heptapod.net/pypy/cffi/-/blob/branch/default/testing/cffi0/backend_tests.py
.. _`demo`: https://github.com/python-cffi/cffi/blob/main/demo
.. _`testing/cffi1/test_verify1.py`: https://github.com/python-cffi/cffi/blob/main/testing/cffi1/test_verify1.py
.. _`testing/cffi0/backend_tests.py`: https://github.com/python-cffi/cffi/blob/main/testing/cffi0/backend_tests.py


Platform-specific instructions
Expand Down Expand Up @@ -148,28 +134,9 @@ problem applies whenever you want to run compile() to build a dll with
this specific compiler suite download.
``import setuptools`` might help, but YMMV

For Python 3.4 and beyond:
https://www.visualstudio.com/en-us/downloads/visual-studio-2015-ctp-vs


Linux and OS/X: UCS2 versus UCS4
++++++++++++++++++++++++++++++++

This is about getting an ImportError about ``_cffi_backend.so`` with a
message like ``Symbol not found: _PyUnicodeUCS2_AsASCIIString``. This
error occurs in Python 2 as soon as you mix "ucs2" and "ucs4" builds of
Python. It means that you are now running a Python compiled with
"ucs4", but the extension module ``_cffi_backend.so`` was compiled by a
different Python: one that was running "ucs2". (If the opposite problem
occurs, you get an error about ``_PyUnicodeUCS4_AsASCIIString``
instead.)

If you are using ``pyenv``, then see
https://github.com/yyuu/pyenv/issues/257.

More generally, the solution that should always work is to download the
sources of CFFI (instead of a prebuilt binary) and make sure that you
build it with the same version of Python than the one that will use it.
build it with the same version of Python that will use it.
For example, with virtualenv:

* ``virtualenv ~/venv``
Expand Down
4 changes: 2 additions & 2 deletions doc/source/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ You can find these and some other complete demos in the demo__ directory
of the repository__.

.. __: installation.html
.. __: https://foss.heptapod.net/pypy/cffi/-/tree/branch/default/demo
.. __: https://foss.heptapod.net/pypy/cffi
.. __: https://github.com/python-cffi/cffi/blob/main/demo
.. __: https://github.com/python-cffi/cffi

.. _out-of-line-api-level:
.. _real-example:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ The ``extern "Python"`` functions cannot be variadic for now. This
may be implemented in the future. (`This demo`__ shows how to do it
anyway, but it is a bit lengthy.)

.. __: https://foss.heptapod.net/pypy/cffi/-/blob/branch/default/demo/extern_python_varargs.py
.. __: https://github.com/python-cffi/cffi/blob/main/demo/extern_python_varargs.py

Each corresponding Python callback function is defined with the
``@ffi.def_extern()`` decorator. Be careful when writing this
Expand Down
12 changes: 12 additions & 0 deletions doc/source/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
What's New
======================

v1.16.0rc1
==========

* Add support for Python 3.12. With the removal of ``distutils`` from Python 3.12, projects
using CFFI features that depend on ``distutils`` at runtime must add a dependency on
``setuptools`` to function under Python 3.12+. CFFI does not declare a runtime ``setuptools``
requirement to avoid an unnecessary dependency for projects that do not require it.
* Drop support for end-of-life Python versions (2.7, 3.6, 3.7).
* Add support for PEP517 builds; ``setuptools`` is now a required build dependency.
* Declare ``python_requires`` metadata for Python 3.8+. This allows unsupported Pythons
to continue using previously released sdists and wheels.

v1.15.1
=======

Expand Down
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ license_file = LICENSE
license_files = LICENSE
project_urls =
Documentation = http://cffi.readthedocs.org/
Source Code = https://foss.heptapod.net/pypy/cffi
Issue Tracker = https://foss.heptapod.net/pypy/cffi/issues
Source Code = https://github.com/python-cffi/cffi
Issue Tracker = https://github.com/python-cffi/cffi/issues
Changelog = https://cffi.readthedocs.io/en/latest/whatsnew.html
Downloads = https://foss.heptapod.net/pypy/cffi/-/tags
Downloads = https://github.com/python-cffi/cffi/releases
Contact = https://groups.google.com/forum/#!forum/python-cffi
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def has_ext_modules(self):
`Mailing list <https://groups.google.com/forum/#!forum/python-cffi>`_
""",
version='1.15.1',
version='1.16.0rc1',
python_requires='>=3.8',
packages=['cffi'] if cpython else [],
package_data={'cffi': ['_cffi_include.h', 'parse_c_type.h',
Expand Down

0 comments on commit ff11e92

Please sign in to comment.