Skip to content

Commit

Permalink
Merge pull request #16 from oremanj/release-v0.2.2
Browse files Browse the repository at this point in the history
Release v0.2.2
  • Loading branch information
oremanj authored Mar 1, 2023
2 parents 1e6afe2 + 665f026 commit 3cce0b7
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 62 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.6', '3.7', '3.8']
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
arch: ['x86', 'x64']
steps:
- name: Checkout
Expand All @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.6', '3.7', '3.8']
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
check_docs: ['0']
check_lint: ['0']
extra_name: ['']
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.6', '3.7', '3.8']
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
8 changes: 8 additions & 0 deletions docs/source/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ Release history

.. towncrier release notes start
tricycle 0.2.2 (2023-03-01)
---------------------------

* tricycle now explicitly re-exports all names, improving PEP-561 compliance and
allowing type checkers that enforce export strictness (including mypy with
``--no-implicit-reexport``) to check code using tricycle.
`#14 <https://github.com/oremanj/tricycle/issues/14>`__

tricycle 0.2.1 (2020-09-30)
---------------------------

Expand Down
3 changes: 0 additions & 3 deletions newsfragments/14.misc.rst

This file was deleted.

10 changes: 3 additions & 7 deletions test-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ pytest-cov
pytest-trio >= 0.6.0

# Tools
black == 19.10b0; implementation_name == "cpython"
black; implementation_name == "cpython"
mypy >= 0.780; implementation_name == "cpython"
flake8
# 6.0.0 requires py3.8+:
flake8 < 6.0.0

# Project dependencies
attrs >= 19.2.0
async_generator >= 1.9
trio >= 0.15.0
trio-typing >= 0.5.0

# typed-ast is required by black + mypy and doesn't build on PyPy;
# it will be unconstrained in requirements.txt if we don't
# constrain it here
typed-ast; implementation_name == "cpython"
110 changes: 74 additions & 36 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,78 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile test-requirements.in
#
appdirs==1.4.3 # via black
async-generator==1.10 # via -r test-requirements.in, pytest-trio, trio
attrs==19.3.0 # via -r test-requirements.in, black, outcome, pytest, trio
black==19.10b0 ; implementation_name == "cpython" # via -r test-requirements.in
click==7.0 # via black
coverage==4.5.4 # via pytest-cov
entrypoints==0.3 # via flake8
flake8==3.7.9 # via -r test-requirements.in
idna==2.8 # via trio
mccabe==0.6.1 # via flake8
more-itertools==8.0.2 # via pytest
mypy-extensions==0.4.3 # via mypy, trio-typing
mypy==0.782 ; implementation_name == "cpython" # via -r test-requirements.in, trio-typing
outcome==1.0.1 # via pytest-trio, trio
packaging==19.2 # via pytest
pathspec==0.6.0 # via black
pluggy==0.13.1 # via pytest
py==1.8.0 # via pytest
pycodestyle==2.5.0 # via flake8
pyflakes==2.1.1 # via flake8
pyparsing==2.4.5 # via packaging
pytest-cov==2.8.1 # via -r test-requirements.in
pytest-trio==0.6.0 # via -r test-requirements.in
pytest==5.3.1 # via -r test-requirements.in, pytest-cov, pytest-trio
regex==2019.12.9 # via black
six==1.13.0 # via packaging
sniffio==1.1.0 # via trio
sortedcontainers==2.1.0 # via trio
toml==0.10.0 # via black
trio-typing==0.5.0 # via -r test-requirements.in
trio==0.17.0 # via -r test-requirements.in, pytest-trio, trio-typing
typed-ast==1.4.0 ; implementation_name == "cpython" # via -r test-requirements.in, black, mypy
typing-extensions==3.7.4.1 # via mypy, trio-typing
wcwidth==0.1.7 # via pytest
async-generator==1.10
# via
# -r test-requirements.in
# trio
attrs==22.2.0
# via
# -r test-requirements.in
# pytest
# trio
black==23.1.0 ; implementation_name == "cpython"
# via -r test-requirements.in
click==8.1.3
# via black
coverage[toml]==7.2.1
# via pytest-cov
flake8==5.0.4
# via -r test-requirements.in
idna==3.4
# via trio
iniconfig==2.0.0
# via pytest
mccabe==0.7.0
# via flake8
mypy==1.0.1 ; implementation_name == "cpython"
# via -r test-requirements.in
mypy-extensions==1.0.0
# via
# black
# mypy
# trio-typing
outcome==1.2.0
# via
# pytest-trio
# trio
packaging==23.0
# via
# black
# pytest
pathspec==0.11.0
# via black
platformdirs==3.0.0
# via black
pluggy==1.0.0
# via pytest
pycodestyle==2.9.1
# via flake8
pyflakes==2.5.0
# via flake8
pytest==7.2.1
# via
# -r test-requirements.in
# pytest-cov
# pytest-trio
pytest-cov==4.0.0
# via -r test-requirements.in
pytest-trio==0.8.0
# via -r test-requirements.in
sniffio==1.3.0
# via trio
sortedcontainers==2.4.0
# via trio
trio==0.22.0
# via
# -r test-requirements.in
# pytest-trio
# trio-typing
trio-typing==0.7.0
# via -r test-requirements.in
typing-extensions==4.5.0
# via
# mypy
# trio-typing
6 changes: 2 additions & 4 deletions tricycle/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ async def wrap(self: Any) -> AsyncIterator[None]:
dct["__wrap__"] = wrap

# NB: wrap() closes over this 'cls' variable
cls: ScopedObjectMeta = super().__new__( # type: ignore
mcls, clsname, bases, dct, **kwargs
)
cls: ScopedObjectMeta = super().__new__(mcls, clsname, bases, dct, **kwargs)
return cls

@asynccontextmanager
Expand Down Expand Up @@ -158,7 +156,7 @@ class MyObject(BackgroundObject, daemon=True):

def __init_subclass__(cls, *, daemon: bool = False, **kwargs: Any):
cls.__daemon = daemon
super().__init_subclass__(**kwargs) # type: ignore
super().__init_subclass__(**kwargs)

@asynccontextmanager
async def __wrap__(self) -> AsyncIterator[None]:
Expand Down
2 changes: 1 addition & 1 deletion tricycle/_tests/test_meta.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import attr
import pytest # type: ignore
import pytest
import types
import trio
import trio.testing
Expand Down
2 changes: 1 addition & 1 deletion tricycle/_tests/test_multi_cancel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pytest # type: ignore
import pytest

import trio
import trio.testing
Expand Down
2 changes: 1 addition & 1 deletion tricycle/_tests/test_rwlock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pytest # type: ignore
import pytest
import itertools
import trio
import trio.testing
Expand Down
6 changes: 3 additions & 3 deletions tricycle/_tests/test_service_nursery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pytest # type: ignore
import pytest
from typing import Any
from trio_typing import TaskStatus

Expand Down Expand Up @@ -104,6 +104,6 @@ def evil() -> Any:
else:
return trio.sleep(0)

with pytest.raises(trio.TrioInternalError) as info:
with pytest.raises(trio.TrioInternalError) as info2:
nursery.start_soon(evil)
assert "all bets are off at this point" in str(info.value)
assert "all bets are off at this point" in str(info2.value)
5 changes: 2 additions & 3 deletions tricycle/_tests/test_streams.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pytest # type: ignore
import pytest
import locale
import random
import sys
Expand Down Expand Up @@ -97,7 +97,7 @@ async def checked_receive(num_bytes: int, raw_reads: Sequence[int] = ()) -> byte
await receive_stream.aclose()


@pytest.fixture # type: ignore # "Untyped decorator makes ... untyped"
@pytest.fixture
async def receiver_factory() -> AsyncIterator[
Callable[[], AsyncContextManager[BufferedReceiveStream]]
]:
Expand Down Expand Up @@ -206,7 +206,6 @@ async def make_streams_with_hook(
]
]
) -> Streams:

send_stream, receive_stream_raw = trio.testing.memory_stream_one_way_pair()
receive_stream = TextReceiveStream(
receive_stream_raw, "UTF-8", chunk_size=8, newline=newline
Expand Down

0 comments on commit 3cce0b7

Please sign in to comment.