Skip to content

Commit

Permalink
Drop support for Python 2.7 and PyPy2.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Mar 20, 2020
1 parent ccd7357 commit 078b911
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 275 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
@@ -1,7 +1,6 @@
language: python
dist: xenial
python:
- 2.7
- 3.5
- 3.6
- 3.7
Expand All @@ -10,16 +9,12 @@ python:
- pypy3
matrix:
include:
- name: "2.7-pure"
python: "2.7"
env: PURE_PYTHON=1
- name: "3.7-pure"
python: "3.7"
env: PURE_PYTHON=1
install:
- pip install zc.buildout
- pip install coveralls coverage
- buildout bootstrap
- buildout
script:
- coverage run bin/test -v1
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.rst
@@ -1,10 +1,10 @@
Changelog
=========

3.1 (unreleased)
4.0 (unreleased)
----------------

- Nothing changed yet.
- Drop support for Python 2.7 and PyPy2.


3.0 (2019-05-08)
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Expand Up @@ -13,6 +13,8 @@ environment:
- python: 36-x64
- python: 37
- python: 37-x64
- python: 38
- python: 38-x64

install:
- "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%"
Expand Down
189 changes: 0 additions & 189 deletions bootstrap.py

This file was deleted.

7 changes: 3 additions & 4 deletions setup.py
Expand Up @@ -19,7 +19,7 @@
include_dirs=['include', 'src']),
]

version = '3.1.dev0'
version = '4.0.dev0'

setup(
name='Persistence',
Expand All @@ -37,12 +37,12 @@
"Environment :: Web Environment",
"Framework :: Zope",
"Framework :: Zope :: 4",
"Framework :: Zope :: 5",
"License :: OSI Approved :: Zope Public License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
Expand All @@ -54,7 +54,6 @@
install_requires=[
'ExtensionClass >= 4.2.0',
'persistent >= 4.1.1',
'six',
],
include_package_data=True,
zip_safe=False,
Expand Down
19 changes: 0 additions & 19 deletions src/Persistence/_Persistence.c
Expand Up @@ -138,7 +138,6 @@ static struct PyMethodDef _Persistence_methods[] = {
{NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
};

#ifdef PY3K
static struct PyModuleDef moduledef =
{
PyModuleDef_HEAD_INIT,
Expand All @@ -151,7 +150,6 @@ static struct PyModuleDef moduledef =
NULL, /* m_clear */
NULL, /* m_free */
};
#endif

static PyObject*
module_init(void)
Expand All @@ -161,11 +159,7 @@ module_init(void)
if (! ExtensionClassImported)
return NULL;

#ifdef PY3K
cPersistenceCAPI = PyCapsule_Import("persistent.cPersistence.CAPI", 0);
#else
cPersistenceCAPI = PyCObject_Import("persistent.cPersistence", "CAPI");
#endif
if (cPersistenceCAPI == NULL)
return NULL;

Expand All @@ -181,13 +175,7 @@ module_init(void)
return NULL;

/* Create the module and add the functions */
#ifdef PY3K
m = PyModule_Create(&moduledef);
#else
m = Py_InitModule3("_Persistence", _Persistence_methods,
_Persistence_module_documentation);
#endif

if (m == NULL)
return NULL;

Expand All @@ -198,14 +186,7 @@ module_init(void)
return m;
}

#ifdef PY3K
PyMODINIT_FUNC PyInit__Persistence(void)
{
return module_init();
}
#else
PyMODINIT_FUNC init_Persistence(void)
{
module_init();
}
#endif

0 comments on commit 078b911

Please sign in to comment.