Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0cad122
import urlparse in py3
malloxpb Jun 6, 2018
71a2a89
py3 sp in setup.py
malloxpb Jun 6, 2018
248dd75
add sp for py3 in cgurl
malloxpb Jun 7, 2018
54dc582
change to relative import
malloxpb Jun 7, 2018
6c915a9
change the name of the functions to sp py3
malloxpb Jun 7, 2018
a2f09b0
correct print command
malloxpb Jun 7, 2018
9e086f6
fix the build error
malloxpb Jun 7, 2018
9c8a185
fix the import error
malloxpb Jun 7, 2018
b40fbc7
put include_package_data back
malloxpb Jun 7, 2018
888a3bf
change the function names back
malloxpb Jun 7, 2018
746d271
rebuild cython
malloxpb Jun 7, 2018
09c07e0
Merge pull request #1 from nctl144/py3sp
malloxpb Jun 7, 2018
74d7493
testing unicode sp
malloxpb Jun 7, 2018
1c389d9
rebuild cython
malloxpb Jun 7, 2018
f4e21ad
indentation
malloxpb Jun 7, 2018
fa7ba59
convert result to unicode on python2
malloxpb Jun 7, 2018
7509bf4
compile cython on py3
malloxpb Jun 7, 2018
0712b11
fix the urllib import
malloxpb Jun 7, 2018
3f0b956
Merge pull request #2 from nctl144/py3sp
malloxpb Jun 7, 2018
92dfbcc
testing unicode sp
malloxpb Jun 7, 2018
1819f78
rebuild cython
malloxpb Jun 7, 2018
7fb618a
indentation
malloxpb Jun 7, 2018
452a430
convert result to unicode on python2
malloxpb Jun 7, 2018
feebe43
compile cython on py3
malloxpb Jun 7, 2018
70f9128
Merge branch 'unicodesp' of https://github.com/nctl144/urlparse4 into…
malloxpb Jun 8, 2018
65d927d
decode in cython
malloxpb Jun 8, 2018
13eb988
compile cython
malloxpb Jun 8, 2018
30f581f
add travis config file
malloxpb Jun 8, 2018
0ea4927
Merge pull request #3 from nctl144/unicodesp
malloxpb Jun 8, 2018
06c658a
update gitignore
malloxpb Jun 8, 2018
26a94c2
add tox config file
malloxpb Jun 8, 2018
3a5dd47
update the test to the latest
malloxpb Jun 11, 2018
5160908
compile on Python 2 first
malloxpb Jun 11, 2018
8af3567
change the env to python 2
malloxpb Jun 11, 2018
a0bc1ff
update the test to use urlparse4
malloxpb Jun 11, 2018
480da47
put urls into the correct place
malloxpb Jun 11, 2018
25c134d
fix the benchmark file location
malloxpb Jun 11, 2018
faa1feb
delete the pytest-cov for now
malloxpb Jun 11, 2018
74b5549
change the test env to py 3
malloxpb Jun 11, 2018
b67aa6f
recompile urlparse4 on py3
malloxpb Jun 11, 2018
ec16b65
Merge pull request #4 from nctl144/travis
malloxpb Jun 11, 2018
e6110d7
support unicode handling for urljoin
malloxpb Jun 11, 2018
b19d0e7
compile cython on py3
malloxpb Jun 11, 2018
2d6de08
Merge pull request #7 from nctl144/unicode_join
malloxpb Jun 11, 2018
9b75d98
add the performance test
malloxpb Jun 11, 2018
1f41372
put the test into the right dir
malloxpb Jun 11, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@
/tmp
/MANIFEST
/urlparse4/*.html
/dist
/dist

# Unit test / coverage reports
.coverage
.tox
nosetests.xml
htmlcov
.pytest_cache
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: python
sudo: false
branches:
only:
- master
- /^\d\.\d+$/
- /^\d\.\d+\.\d+(rc\d+|\.dev\d+)?$/
matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 2.7
env: TOXENV=pypy
- python: 2.7
env: TOXENV=pypy3
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
install:
- pip install -U pip tox
script:
- tox
17 changes: 17 additions & 0 deletions benchmarks/performance_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from urlparse4 import urlsplit, urljoin
from timeit import default_timer as timer

total = 0

with open('urls/chromiumUrls.txt') as f:
for url in f:

start = timer()

a = urlsplit(url)

end = timer()

total += end - start

print("the total time is", total, "seconds")
2 changes: 1 addition & 1 deletion benchmarks/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

URLS = []
for fp in os.listdir("tests/urls/"):
with open("tests/urls/%s" % fp) as f:
with open("urls/%s" % fp) as f:
URLS += f.readlines()

data = []
Expand Down
82,257 changes: 82,257 additions & 0 deletions benchmarks/urls/chromiumUrls.txt

Large diffs are not rendered by default.

File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VERSION = "0.1.3"

extension = Extension(
name="urlparse4/cgurl",
name="cgurl",
sources=["urlparse4/cgurl.pyx",
"vendor/gurl/base/third_party/icu/icu_utf.cc",
"vendor/gurl/base/strings/string16.cc",
Expand Down Expand Up @@ -43,7 +43,7 @@
from Cython.Build import cythonize
ext_modules = cythonize(extension, annotate=True)
except:
print "urlparse4/gurl.cpp not found and Cython failed to run to recreate it. Please install/upgrade Cython and try again."
print("urlparse4/cgurl.cpp not found and Cython failed to run to recreate it. Please install/upgrade Cython and try again.")
raise
else:
ext_modules = [extension]
Expand Down
Loading