Skip to content

Remove usage of py.builtin #617

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

Merged
merged 1 commit into from
Sep 9, 2017
Merged

Remove usage of py.builtin #617

merged 1 commit into from
Sep 9, 2017

Conversation

asottile
Copy link
Contributor

@asottile asottile commented Sep 9, 2017

Refs #610

  • Adds dependency on six (for use of six.text_type)
  • Replaces py.builtin._totext with explicit .decode(...)
  • Replaces _istext and _isbytes with isinstance directly (bytes is available in python2.6)
  • Replaces py.builtin.print_ with print + from __future__ import print_function
  • Replaces py.builtin.callable with just callable (available in python2.6)

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, thanks!

@asottile
Copy link
Contributor Author

asottile commented Sep 9, 2017

travis-ci is having a macos outage today, ok if I merge this?

@obestwalter obestwalter merged commit 9a5bd4a into tox-dev:master Sep 9, 2017
@obestwalter
Copy link
Member

done :)

@asottile asottile deleted the remove_py_builtin branch September 9, 2017 23:47
@codecov
Copy link

codecov bot commented Sep 10, 2017

Codecov Report

Merging #617 into master will increase coverage by <.01%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #617      +/-   ##
==========================================
+ Coverage   93.63%   93.64%   +<.01%     
==========================================
  Files          11       11              
  Lines        2358     2361       +3     
==========================================
+ Hits         2208     2211       +3     
  Misses        150      150
Impacted Files Coverage Δ
tox/session.py 94.04% <100%> (+0.01%) ⬆️
tox/_pytestplugin.py 93.57% <100%> (+0.02%) ⬆️
tox/config.py 97.55% <80%> (ø) ⬆️

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 65cf618...880d025. Read the comment docs.

@@ -293,7 +295,10 @@ def initproj(request, tmpdir):
def initproj(nameversion, filedefs=None, src_root="."):
if filedefs is None:
filedefs = {}
if _istext(nameversion) or _isbytes(nameversion):
if (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is string_types for matching both

obestwalter added a commit that referenced this pull request Sep 10, 2017
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.

4 participants