Skip to content

Conversation

@tleonhardt
Copy link
Member

@tleonhardt tleonhardt commented Apr 15, 2018

cmd2 now supports Python 3.4+ only for versions starting with 0.9.0. This PR starts removing support for Python 2.7 and begins cleaning up things which are no longer needed.

Changes include:

  • No longer run Python 2.7 unit tests on either TravisCI or AppVeyor
  • On AppVeyor, Windows code coverage analysis is now done for Python 3.6 instead of 2.7
  • 3rd party mock module is now only used for tests on Python 3.5
  • Cleaned up most references to Python 2.7 in the docs
  • Removed all dependency on the six module
  • Removed conditional code branches which were for Python 2.7
  • Started using super() to call base class dunder init

This closes #260

mock was a backport of Python's built in unittest.mock and was required for Python 3.2 or earlier
- Since we now support Python 3.4+ moving forward we no longer need to make use of the 3rd party mock module
Apparently there were some issues in the unitest.mock module in Python 3.5 (but not 3.4 or 3.6)
Removed all dependency on six other than for six.moves.input

Also:
- Started removing code branches which were for Python 2 support
@tleonhardt tleonhardt added this to the 0.9.0 milestone Apr 15, 2018
@tleonhardt tleonhardt self-assigned this Apr 15, 2018
@codecov
Copy link

codecov bot commented Apr 15, 2018

Codecov Report

Merging #354 into master will increase coverage by 0.05%.
The diff coverage is 73.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #354      +/-   ##
==========================================
+ Coverage   89.26%   89.31%   +0.05%     
==========================================
  Files           1        1              
  Lines        1909     1872      -37     
==========================================
- Hits         1704     1672      -32     
+ Misses        205      200       -5
Impacted Files Coverage Δ
cmd2.py 89.31% <73.07%> (+0.05%) ⬆️

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 8aaf6f4...11a9664. Read the comment docs.

@tleonhardt tleonhardt changed the title Started moving to Python 3 only Move to Python 3.4+ only Apr 15, 2018
This is to support installation from package managers on older OSes such as Debian 9.
@tleonhardt
Copy link
Member Author

I'm going to go ahead and merge this. We can clean up and/or change in future PRs if need be. But future work will depend on this, so I'm going to merge it in.

@tleonhardt tleonhardt merged commit 33f2f03 into master Apr 17, 2018
@tleonhardt tleonhardt deleted the python3 branch April 17, 2018 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discontinuing support for Python 2.7 on April 15, 2018

2 participants