Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.10 support #51

Merged
merged 1 commit into from
Jan 29, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "pypy-3.7"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.8"]

runs-on: ${{ matrix.os }}
steps:
Expand Down
3 changes: 3 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ Release Notes

(unreleased)

* Add ``Python 3.10`` support.

* Drop ``Python 2.7`` support. It's dead for more than a year anyway. Those who
want to use picobox with ``Python 2`` should stick with ``2.x`` branch.

Expand All @@ -367,6 +369,7 @@ Release Notes
* Make some parameters keyword-only: ``factory`` and ``scope`` in ``Box.put()``,
``as_`` in ``Box.pass_()`` and ``chain`` in ``picobox.push()``.


2.2.0
`````

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries",
Expand Down
7 changes: 6 additions & 1 deletion tests/test_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import collections
import inspect
import itertools
import sys
import traceback

import picobox
Expand Down Expand Up @@ -402,7 +403,11 @@ def fn(a, b):
with pytest.raises(TypeError) as excinfo:
fn(1, 2)

assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'"
expected = "fn() got an unexpected keyword argument 'd'"
if sys.version_info >= (3, 10):
expected = f"test_box_pass_unexpected_argument.<locals>.{expected}"

assert str(excinfo.value) == expected


def test_box_pass_keyerror(boxclass):
Expand Down
7 changes: 6 additions & 1 deletion tests/test_stack.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test picobox's stack interface."""

import itertools
import sys
import traceback

import picobox
Expand Down Expand Up @@ -472,7 +473,11 @@ def fn(a, b):
with pytest.raises(TypeError) as excinfo:
fn(1, 2)

assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'"
expected = "fn() got an unexpected keyword argument 'd'"
if sys.version_info >= (3, 10):
expected = f"test_box_pass_unexpected_argument.<locals>.{expected}"

assert str(excinfo.value) == expected


def test_box_pass_keyerror(boxclass, teststack):
Expand Down