-
Notifications
You must be signed in to change notification settings - Fork 517
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
Removing testing and support for Python 2.6 #322
Conversation
This commit does not include changes in the Pyomo source tree that are not backwards compatible, but I expect that subsequent commits will begin to introduce changes that are not compatible with Python 2.6.
@whart222: What is the motivation for this? Apart from some syntatical sugar that @ghackebeil mentions in #295, I don't see a real driver for this. I am not saying that we shouldn't do it, but I don't see a reason to bypass the developer meetings and rush this into 5.4. I would rather see this discussed and nominated for 5.5. |
@jsiirola New test failures have cropped up on the master branch that reflect additional package dependencies that are impacting our testing. This is the real driver for this change. The PR is minimal, so I thought it was worth moving forward with. I agree that we should confirm that there isn't a blocker, but I don't know of any. Finally, note that this PR does not eliminate support for Python 2.6, but rather eliminates testing for Python 2.6 compatibility. |
You are referring to the openpyxl release that installs in 2.6 but contains a syntax error? That is trivially fixed in our check for if openpyxl is available (master has been updated). I will point out that if we remove testing for 2.6 (especially if it is because tests are failing), we are effectively immediately removing support for 2.6. |
I agree that we're eliminating support. I meant to say that this PR does not immediately eliminate compatibility with Python 2.6 (though I think that will happen eventually). |
Yes, I was referring to openpyxl. I've already fixed several such build failure issues. :( |
Codecov Report
@@ Coverage Diff @@
## master #322 +/- ##
==========================================
- Coverage 66.36% 65.97% -0.39%
==========================================
Files 487 487
Lines 63180 63180
==========================================
- Hits 41928 41686 -242
- Misses 21252 21494 +242
Continue to review full report at Codecov.
|
I would vote for making a clean break and eliminating both testing and support for Python 2.6 at the same time. |
This allows Python 2.7.x and versions greater than 3.5.x
@jsiirola @carldlaird Now that we've finalized the 5.5 release, I think we're ready to process this PR. Please review. |
We are no longer testing 3.4, so we should not advertise support for 3.4
Perhaps we should add a line to the README that lists the Python versions we support. The expr_dev branch could add PyPy to that line. |
@ghackebeil The versions supported are documented in the setup.py file, which is used to configure the PyPI pages. This seems like the best place to document this other than the online documentation. So perhaps the other TODO here is to update the online docs. I'll do that shortly. |
As discussed in the PR, we to include installation instructions in our documentation, including a summary of supported versions.
Yes. I'm pretty sure we omitted Python 3.4 tests recent due to performance issues. Right? If not, then yes I'd strongly recommend deprecating 3.4 as well. The conda builds only support 2.7, 3.5 and 3.6. I've regularly seen performance issues with tests. And when developing the expression system I've seen weird test failures on 3.4 that I haven't been able to explain. |
No - as I said, 3.4 (and for that matter until this PR is approved, 2.6) are still "officially" supported by Pyomo and are tested on Travis and Jenkins. |
NOTE: We can ignore the appveyor build failures in this PR. They are resolved in PR #438 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one question - see comment in code.
Also, I don't see successful tests. After successful tests - happy to merge.
@@ -12,11 +12,7 @@ | |||
import sys | |||
import os | |||
import subprocess | |||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know that this was only for python 2.6? (i.e., is the comment correct?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve once the tests are shown to pass.
Pyomo currently supports the following versions of Python: | ||
|
||
* CPython: 2.7, 3.5, 3.6 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whart222 you're missing 3.4 in this list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
.. doctest:: | ||
Pyomo currently supports the following versions of Python: | ||
|
||
* CPython: 2.7, 3.5, 3.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still support 3.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
@@ -6,9 +6,10 @@ Pyomo CHANGELOG | |||
Current Development | |||
------------------------------------------------------------------------------- | |||
|
|||
- Resolved Python 3.4 build errors on Appveyor. | |||
- Resolved Python 3.4 build errors on Appveyor. (#438) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change s a bleed over from #438. At a minimum, we need to resync with master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already synced with master. This documentation was omitted in that PR. I figured it was a waste of time to have a PR for 7 characters.
.. bash:: | ||
conda install -c conda-forge pyomo | ||
|
||
Pyomo also has conditional dependencies on a variety of third-party Python packages. These can also be installed with conda: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This document should list the third-party packages, as that is relevant to all distributions /package managers (i.e., pip)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it should. But I'm pretty sure that no one will maintain this list here.
Using CONDA | ||
~~~~~~~~~~~ | ||
|
||
We recommend installation with *conda*, which is included with the Anaconda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not recommend conda. I am still confused as to why we don't list pip as the standard install route for pyomo and list conda as a convenience for Anaconda users. Recommending miniconda for non-conda platforms results in a new Python on their system, which will cause problems with IDEs, PATHs, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do recommend conda, because pyomo.extras robustly installs third-party packages. We tried using a similar package for PyPI and users had problem with package installations.
You don't need to install miniconda to use conda.
|
||
However, *pip* does not support the robust installation of conditional | ||
dependencies (i.e. the third-party Python packages or the solvers | ||
that Pyomo may use). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with this statement. pip is the generally recommended installation method for Python packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a true statement, regardless whether pip is generally recommended. But I'll delete it.
Optimization solvers are not installed with Pyomo, but some open source optimization solvers can be installed with conda as well: | ||
|
||
.. bash:: | ||
conda install -c conda-forge pyomo.solvers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be conda install -c conda-forge ipopt coin-cbc glpk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
* CPython: 2.7, 3.4, 3.5, 3.6 | ||
|
||
|
||
Using CONDA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Conda" not "CONDA"
Fixes #295
Summary/Motivation:
We do not have users actively downloading for Python 2.6, and it's becoming increasingly difficult to support testing for Python2.6 as packages that Pyomo relies on drop support for this version.
Changes proposed in this PR:
This PR does not include changes in the Pyomo source tree that
are not backwards compatible, but I expect that subsequent commits
will begin to introduce changes that are not compatible with Python 2.6.
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: