Skip to content

Commit

Permalink
Redefine _Py_stat_struct if Python 3.11 or later (#142)
Browse files Browse the repository at this point in the history
* Redefine _Py_stat_struct if Python 3.11 or later

* Test on Python 3.11 (and don't fail fast)

---------

Co-authored-by: Ben Hoyt <[email protected]>
  • Loading branch information
cielavenir and benhoyt authored Aug 27, 2023
1 parent 34a0cc1 commit 7ee0915
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['2.7', 'pypy-2.7', '3.9', '3.10']
python-version: ['2.7', 'pypy-2.7', '3.9', '3.10', '3.11']
exclude:
- os: macos-latest
python-version: 'pypy-2.7'
Expand Down
2 changes: 1 addition & 1 deletion _scandir.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ comment):

// _Py_stat_struct is already defined in fileutils.h on Python 3.5+
// But not in PyPy
#if PY_MAJOR_VERSION < 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 5) || defined(PYPY_VERSION_NUM)
#if PY_MAJOR_VERSION < 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 5) || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 11) || defined(PYPY_VERSION_NUM)
#ifdef MS_WINDOWS
struct _Py_stat_struct {
unsigned long st_dev;
Expand Down

0 comments on commit 7ee0915

Please sign in to comment.