Skip to content

Fails with ValueError: invalid literal for httpx 1.0.dev* #80

@janbrasna

Description

@janbrasna

Since the upper constraint was removed in #67 and httpx started publishing pre-release 1.x versions like 1.0.dev2 there seem to be expectations not compatible with this:

    from sanic_testing.testing import SanicTestClient
  File "/home/runner/.tox/py311-s23/lib/python3.11/site-packages/sanic_testing/__init__.py", line 1, in <module>
    from sanic_testing.manager import TestManager
  File "/home/runner/.tox/py311-s23/lib/python3.11/site-packages/sanic_testing/manager.py", line 3, in <module>
    from sanic_testing.testing import SanicASGITestClient, SanicTestClient
  File "/home/runner/.tox/py311-s23/lib/python3.11/site-packages/sanic_testing/testing.py", line 25, in <module>
    httpx_version = tuple(
                    ^^^^^^
ValueError: invalid literal for int() with base 10: 'dev2'

that points here:

httpx_version = tuple(
map(int, httpx.__version__.strip(ascii_lowercase).split("."))
)

Not sure if there are any actual API breaking changes relevant, but it seems surprising pre-release dependencies are resolved in the first place(?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions