Skip to content

Commit

Permalink
Merge pull request #51 from ikalnytskyi/python/3.10
Browse files Browse the repository at this point in the history
Add Python 3.10 support
ikalnytskyi authored Jan 29, 2022
2 parents 7744331 + 1fcc4a0 commit 9addf38
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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:
3 changes: 3 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -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.

@@ -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
`````

1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
7 changes: 6 additions & 1 deletion tests/test_box.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
import collections
import inspect
import itertools
import sys
import traceback

import picobox
@@ -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):
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
@@ -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):

0 comments on commit 9addf38

Please sign in to comment.