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
22 changes: 11 additions & 11 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

- name: Install python 3.9
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

# General case
- name: Install python ${{ matrix.nox_session.python }} for tests (not 3.5 not 3.14)
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
cache-build: true

- name: Install python 3.12 for nox
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5
with:
python-version: 3.12
architecture: x64
Expand All @@ -118,7 +118,7 @@ jobs:
# Share ./docs/reports so that they can be deployed with doc in next job
- name: Share reports with other jobs
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4
with:
name: reports_dir
path: ./docs/reports
Expand All @@ -128,10 +128,10 @@ jobs:
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4

- name: Install python 3.9 for nox
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
Expand All @@ -153,20 +153,20 @@ jobs:
run: echo "$GITHUB_CONTEXT"

- name: Checkout with no depth
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0 # so that gh-deploy works
# persist-credentials: false # see https://github.com/orgs/community/discussions/25702

- name: Install python 3.9 for nox
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64

# 1) retrieve the reports generated previously
- name: Retrieve reports
uses: actions/download-artifact@v4.1.4
uses: actions/download-artifact@v4
with:
name: reports_dir
path: ./docs/reports
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
EOF
- name: \[not on TAG\] Publish coverage report
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads')
uses: codecov/codecov-action@v4.1.1
uses: codecov/codecov-action@v4
with:
files: ./docs/reports/coverage/coverage.xml
- name: \[not on TAG\] Build wheel and sdist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}

- name: Run GitHub Actions Version Updater
uses: saadmk11/github-actions-version-updater@v0.8.1
uses: saadmk11/github-actions-version-updater@v0.8
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
3 changes: 2 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
### 1.16.0 - (in progress) new python versions scope

- Removed official support for python versions `<3.9`. These versions will not run in CI anymore.

- Fixed `RuntimeError` in tests when running on python 3.14. Added python 3.14 to CI. Fixes
[#112](https://github.com/smarie/python-makefun/issues/112)

### 1.15.6 - compatibility fix

Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Folders:


ENVS = {
# PY314: {"coverage": False, "pkg_specs": {"pip": ">19"}},
PY314: {"coverage": False, "pkg_specs": {"pip": ">19"}},
PY313: {"coverage": False, "pkg_specs": {"pip": ">19"}},
PY312: {"coverage": False, "pkg_specs": {"pip": ">19"}},
PY311: {"coverage": False, "pkg_specs": {"pip": ">19"}},
Expand Down
8 changes: 1 addition & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ classifiers =
License :: OSI Approved :: BSD License
Topic :: Software Development :: Libraries :: Python Modules
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
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 @@ -41,6 +34,7 @@ install_requires =
funcsigs;python_version<'3.3'
tests_require =
pytest
pytest-asyncio
# for some reason these pytest dependencies were not declared in old versions of pytest
six;python_version<'3.6'
attr;python_version<'3.6'
Expand Down
10 changes: 4 additions & 6 deletions tests/test_generators_coroutines.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def my_gencoroutine_handler(first_msg):


@pytest.mark.skipif(sys.version_info < (3, 5), reason="native coroutines with async/await require python3.6 or higher")
def test_native_coroutine():
async def test_native_coroutine():
""" Tests that we can use a native async coroutine as function_handler in `create_function`"""

# define the handler that should be called
Expand All @@ -92,13 +92,12 @@ def test_native_coroutine():
assert is_native_co(dynamic_fun)

# verify that the new function is a native coroutine and behaves correctly
from asyncio import get_event_loop
out = get_event_loop().run_until_complete(dynamic_fun(0.1))
out = await dynamic_fun(0.1)
assert out == 0.1


@pytest.mark.skipif(sys.version_info < (3, 5), reason="native coroutines with async/await require python3.6 or higher")
def test_issue_96():
async def test_issue_96():
"""Same as `test_native_coroutine` but tests that we can use 'return' in the coroutine name"""

# define the handler that should be called
Expand All @@ -114,6 +113,5 @@ def test_issue_96():
assert is_native_co(dynamic_fun)

# verify that the new function is a native coroutine and behaves correctly
from asyncio import get_event_loop
out = get_event_loop().run_until_complete(dynamic_fun(0.1))
out = await dynamic_fun(0.1)
assert out == 0.1
10 changes: 6 additions & 4 deletions tests/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def f(a):


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python 3.6 or higher (async generator)")
def test_issue_77_async_generator_wraps():
async def test_issue_77_async_generator_wraps():
import asyncio
from ._test_py36 import make_async_generator, make_async_generator_wrapper

Expand All @@ -238,11 +238,12 @@ def test_issue_77_async_generator_wraps():
assert inspect.isasyncgenfunction(f)
assert inspect.isasyncgenfunction(wrapper)

assert asyncio.get_event_loop().run_until_complete(asyncio.ensure_future(wrapper(1).__anext__())) == 1
out = await asyncio.ensure_future(wrapper(1).__anext__())
assert out == 1


@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python 3.6 or higher (async generator)")
def test_issue_77_async_generator_partial():
async def test_issue_77_async_generator_partial():
import asyncio
from ._test_py36 import make_async_generator

Expand All @@ -252,7 +253,8 @@ def test_issue_77_async_generator_partial():
assert inspect.isasyncgenfunction(f)
assert inspect.isasyncgenfunction(f_partial)

assert asyncio.get_event_loop().run_until_complete(asyncio.ensure_future(f_partial().__anext__())) == 1
out = await asyncio.ensure_future(f_partial().__anext__())
assert out == 1


@pytest.mark.skipif(sys.version_info < (3, 7, 6), reason="The __wrapped__ behavior in get_type_hints being tested was not added until python 3.7.6.")
Expand Down
Loading