Skip to content

Fix tox static#571

Open
loqs wants to merge 4 commits intoaio-libs:masterfrom
loqs:tox-static
Open

Fix tox static#571
loqs wants to merge 4 commits intoaio-libs:masterfrom
loqs:tox-static

Conversation

@loqs
Copy link
Copy Markdown

@loqs loqs commented Apr 10, 2026

What do these changes do?

  • Fix platform match to fix skipping tox static environment on all platforms.
  • Fix issues detected by pytpe:
    • autoprogramm.py - Fix incorrect type annotation
    • proxy_protocol.py - Replace ellipses as default
    • smtp.py - add assert to fix pytype error in auth_PLAIN

Are there changes in behavior for the user?

No.

Related issue number

Related #544.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • tox testenvs have been executed in the following environments:
    • Linux (Ubuntu 18.04, Ubuntu 20.04, Arch): static
    • Windows (7, 10): {py36,py37,py38,py39}-{nocov,cov,diffcov}
    • WSL 1.0 (Ubuntu 18.04): {py36,py37,py38,py39}-{nocov,cov,diffcov}, pypy3-{nocov,cov}, qa, docs
    • FreeBSD (12.2, 12.1, 11.4): {py36,pypy3}-{nocov,cov,diffcov}, qa
    • Cygwin: py36-{nocov,cov,diffcov}, qa, docs
  • Documentation reflects the changes
  • Add a news fragment into the NEWS.rst file

loqs added 4 commits April 10, 2026 21:24
re.fullmatch('^(?!win32)(?!cygwin)') will only match start of line followed by
 not 'win32' and not 'cygwin' followed by nothing meaning an empty string.
This causes static to be skipped on platforms it was intended to be run on
such as linux.

Fix by changing the regular expression to '^(?!win32)(?!cygwin).*$' which will
full match start of line followed by not 'win32' and not 'cygwin' followed by
anything followed by end of line.# Please enter the commit message for your changes. Lines starting
Use defaults for AsyncReader Protocol pytype understands:
- read(n: int = -1) - matches asyncio default (read all)
- readuntil(separator: bytes = b'\n') - matches asyncio default
Adds assert isinstance(login_and_password, bytes) to narrow the
_TriStateType Union before calling .split(). This fixes the pytype
error 'No attribute split on _Missing'.
@loqs
Copy link
Copy Markdown
Author

loqs commented Apr 10, 2026

mypy did not detect any of these errors. Would you prefer to suppress them in pytype rather than make code changes?

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