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

Update auth_tkt.py for python3 compatibility #45

Merged
merged 3 commits into from
Jan 26, 2020

Conversation

marzetas
Copy link
Contributor

First of all, thanks for taking care of paste, even if it's just in maintenance mode.

I've been trying to use the auth token module on python3, but I've found an issue with some imports from urllib, which have been moved to a different path in python3.

This PR uses a try..except approach to do the import correctly regardless of the python version.

@codecov-io
Copy link

codecov-io commented Jan 22, 2020

Codecov Report

Merging #45 into master will increase coverage by 0.54%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
+ Coverage   54.08%   54.63%   +0.54%     
==========================================
  Files         125      126       +1     
  Lines       14822    14858      +36     
  Branches     2500     2505       +5     
==========================================
+ Hits         8016     8117     +101     
+ Misses       6262     6193      -69     
- Partials      544      548       +4
Flag Coverage Δ
#py27 53.45% <71.15%> (+0.47%) ⬆️
#py35 52.81% <75%> (+0.47%) ⬆️
#py36 52.81% <75%> (+0.47%) ⬆️
#py37 52.8% <75%> (+0.47%) ⬆️
#pypy 52.72% <71.15%> (+0.47%) ⬆️
Impacted Files Coverage Δ
tests/test_auth/test_auth_tkt.py 100% <100%> (ø)
paste/auth/auth_tkt.py 39.78% <84%> (+39.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79e5b38...c1464dc. Read the comment docs.

@cdent
Copy link
Collaborator

cdent commented Jan 22, 2020

Thanks for doing this. I'll try to get it reviewed and merged some time this week.

@marzetas
Copy link
Contributor Author

I've found some other issues around string encodings in calculate_digest as well. I'll try to get those sorted as well.

@cdent cdent merged commit d3e74f8 into pasteorg:master Jan 26, 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.

3 participants