Skip to content

Commit

Permalink
Fix warnings (#148)
Browse files Browse the repository at this point in the history
* Fix warnings

* Remove py27 support

* Remove whitespace

* Remove pypy2 support
  • Loading branch information
kvesteri committed Apr 2, 2020
1 parent ae3771c commit f8608f4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
language: python
matrix:
include:
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.7
dist: xenial
sudo: true
- python: pypy
- python: pypy3
install:
- pip install -e ".[test]"
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Changelog

- Handle None values gracefully in domain validator (#144, pull request courtesy reahaas)
- Local part of the email address should be less or equal than 64 bytes (#147, pull request courtesy mondeja)
- Removed py27 support
- Removed pypy2 support


0.14.2 (2020-01-24)
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ def get_version():
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
Expand Down
2 changes: 1 addition & 1 deletion validators/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def email(value, whitelist=None):

if not user_regex.match(user_part):
return False

if len(user_part.encode("utf-8")) > 64:
return False

Expand Down
6 changes: 3 additions & 3 deletions validators/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
r"(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
r")\]|"
# host name
u"(?:(?:[a-z\u00a1-\uffff0-9]-?)*[a-z\u00a1-\uffff0-9]+)"
r"(?:(?:[a-z\u00a1-\uffff0-9]-?)*[a-z\u00a1-\uffff0-9]+)"
# domain name
u"(?:\.(?:[a-z\u00a1-\uffff0-9]-?)*[a-z\u00a1-\uffff0-9]+)*"
r"(?:\.(?:[a-z\u00a1-\uffff0-9]-?)*[a-z\u00a1-\uffff0-9]+)*"
# TLD identifier
u"(?:\.(?:[a-z\u00a1-\uffff]{2,}))"
r"(?:\.(?:[a-z\u00a1-\uffff]{2,}))"
r")"
# port number
r"(?::\d{2,5})?"
Expand Down

0 comments on commit f8608f4

Please sign in to comment.