Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest]
include:
# Needs to be all supported Python versions, they upload the built
# wheels for releases.
- os: macos-latest
python-version: 3.8
- os: macos-latest
python-version: 3.9
- os: macos-latest
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Changes
=========

3.1.2 (unreleased)
3.2.0 (unreleased)
==================

- Nothing changed yet.
- Remove support for Python 3.7 and 3.8.


3.1.1 (2024-09-20)
Expand Down
23 changes: 1 addition & 22 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@ environment:
PYTHON_EXE: python


- PYTHON: "C:\\Python38-x64"
PYTHON_ARCH: "64"
PYTHON_VERSION: "3.8.x"
PYTHON_EXE: python


- PYTHON: "C:\\Python37-x64"
PYTHON_ARCH: "64"
PYTHON_VERSION: "3.7.x"
PYTHON_EXE: python


# Tested 32-bit versions. A small, hand-picked selection covering
# important variations. No need to include newer versions of
Expand All @@ -100,17 +89,7 @@ environment:
# Untested 32-bit versions. As above, we don't expect any variance
# from the tested 32-bit versions, OR they are very EOL.

- PYTHON: "C:\\Python38"
PYTHON_ARCH: "32"
PYTHON_VERSION: "3.8.x"
PYTHON_EXE: python
GWHEEL_ONLY: true

- PYTHON: "C:\\Python37"
PYTHON_ARCH: "32"
PYTHON_VERSION: "3.7.x"
PYTHON_EXE: python
GWHEEL_ONLY: true
# None right now.



Expand Down
2 changes: 1 addition & 1 deletion make-manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ -d /greenlet -a -d /opt/python ]; then
which auditwheel
echo "Installed Python versions"
ls -l /opt/python
for variant in `ls -d /opt/python/cp{313,37,38,39,310,311,312}*`; do
for variant in `ls -d /opt/python/cp{313,39,310,311,312}*`; do
if [ "$variant" = "/opt/python/cp313-313t" ]; then
echo "Skipping no-gil build. The GIL is required."
continue
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,6 @@ def get_greenlet_version():
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand All @@ -261,6 +259,6 @@ def get_greenlet_version():
'psutil',
],
},
python_requires=">=3.7",
python_requires=">=3.9",
zip_safe=False,
)
43 changes: 1 addition & 42 deletions src/greenlet/TThreadStateDestroy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "TGreenlet.hpp"

#include "greenlet_thread_support.hpp"
#include "greenlet_cpython_add_pending.hpp"
#include "greenlet_compiler_compat.hpp"
#include "TGreenletGlobals.cpp"
#include "TThreadState.hpp"
Expand Down Expand Up @@ -168,47 +167,7 @@ struct ThreadState_DestroyNoGIL
delete state; // Deleting this runs the destructor, DECREFs the main greenlet.
}

// ensure this is actually defined.
static_assert(GREENLET_BROKEN_PY_ADD_PENDING == 1 || GREENLET_BROKEN_PY_ADD_PENDING == 0,
"GREENLET_BROKEN_PY_ADD_PENDING not defined correctly.");

#if GREENLET_BROKEN_PY_ADD_PENDING
static int _push_pending_call(struct _pending_calls *pending,
int (*func)(void *), void *arg)
{
int i = pending->last;
int j = (i + 1) % NPENDINGCALLS;
if (j == pending->first) {
return -1; /* Queue full */
}
pending->calls[i].func = func;
pending->calls[i].arg = arg;
pending->last = j;
return 0;
}

static int AddPendingCall(int (*func)(void *), void *arg)
{
_PyRuntimeState *runtime = &_PyRuntime;
if (!runtime) {
// obviously impossible
return 0;
}
struct _pending_calls *pending = &runtime->ceval.pending;
if (!pending->lock) {
return 0;
}
int result = 0;
PyThread_acquire_lock(pending->lock, WAIT_LOCK);
if (!pending->finishing) {
result = _push_pending_call(pending, func, arg);
}
PyThread_release_lock(pending->lock);
SIGNAL_PENDING_CALLS(&runtime->ceval);
return result;
}
#else
// Python < 3.8 or >= 3.9
static int AddPendingCall(int (*func)(void*), void* arg)
{
// If the interpreter is in the middle of finalizing, we can't add a
Expand All @@ -234,7 +193,7 @@ struct ThreadState_DestroyNoGIL
}
return Py_AddPendingCall(func, arg);
}
#endif




Expand Down
172 changes: 0 additions & 172 deletions src/greenlet/greenlet_cpython_add_pending.hpp

This file was deleted.

Loading