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

Fix minor py37+ issues #23

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Fix minor py37+ issues #23

wants to merge 5 commits into from

Conversation

vbanos
Copy link

@vbanos vbanos commented Feb 13, 2020

Add testing for py37 and py38, remove py26andpy33.

Fix bytes/str issue that caused pypy3 tests to fail.

Update .travis.ci to limit versions of pytest, pytest-cov to allow tests to run in all python versions.

Resolve py37+ warnings like the following by adding r prefix to that regex.

surt/handyurl.py:37: DeprecationWarning: invalid escape sequence \+
    _RE_HAS_PROTOCOL = re.compile(b"^([a-zA-Z][a-zA-Z0-9\+\-\.]*):")

Vangelis Banos added 5 commits February 13, 2020 09:48
We see the following warning using py37.
```
surt/handyurl.py:37: DeprecationWarning: invalid escape sequence \+
    _RE_HAS_PROTOCOL = re.compile(b"^([a-zA-Z][a-zA-Z0-9\+\-\.]*):")
```

We resolve it by adding `r` prefix to that string. This is already used
in some other regex strings in the same file.
This code was triggering an error only on `pypy3` unit tests.
We add a check to convert to str if `host` is `bytes`.
Limit pkg versions to be compatible with older python versions.

Add `py38` to the target envs.
After that version, `pytest-cov` requires a newer `pytest` and we have
a conflict with `pytest<5`.
@vbanos vbanos changed the title Fix py37 deprecation warning and add py37 to tox.ini Fix minor py37+ issues Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant