Skip to content

Commit

Permalink
Fix typos, drop mentions of Python<3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Oct 5, 2021
1 parent b730153 commit 3745b3d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def read(name):

if not NO_EXTENSIONS:
print("**********************")
print("* Accellerated build *")
print("* Accelerated build *")
print("**********************")
setup(ext_modules=extensions, **args)
else:
Expand Down
9 changes: 1 addition & 8 deletions tests/test_url.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import sys
import pytest
from urllib.parse import SplitResult

from yarl import URL


@pytest.mark.skipif(
sys.version_info < (3, 6), reason="The feature requires Python 3.6+"
)
def test_inheritance():
with pytest.raises(TypeError) as ctx:

class MyURL(URL): # type: ignore[misc]
pass

assert (
"Inheritance a class "
"Inheriting a class "
"<class 'test_url.test_inheritance.<locals>.MyURL'> "
"from URL is forbidden" == str(ctx.value)
)
Expand Down Expand Up @@ -1222,9 +1218,6 @@ def test_join_from_rfc_3986_normal(url, expected):
]


@pytest.mark.skipif(
sys.version_info < (3, 5), reason="Python 3.4 doen't support abnormal cases"
)
@pytest.mark.parametrize("url,expected", ABNORMAL)
def test_join_from_rfc_3986_abnormal(url, expected):
# test case from https://tools.ietf.org/html/rfc3986.html#section-5.4.2
Expand Down
1 change: 0 additions & 1 deletion tests/test_url_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ def test_another_bad_port(self):
with pytest.raises(ValueError):
URL("//h:22:no/path")

@pytest.mark.skipif(sys.version_info < (3, 6), reason="Requires Python 3.6+")
def test_bad_port_again(self):
with pytest.raises(ValueError):
URL("//h:-80/path")
Expand Down
2 changes: 1 addition & 1 deletion yarl/_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def build(
return url

def __init_subclass__(cls):
raise TypeError("Inheritance a class {!r} from URL is forbidden".format(cls))
raise TypeError("Inheriting a class {!r} from URL is forbidden".format(cls))

def __str__(self):
val = self._val
Expand Down

0 comments on commit 3745b3d

Please sign in to comment.