Skip to content

[3.3] Backport CI config from master #2481

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 8 commits into from
Jul 20, 2017
Merged

[3.3] Backport CI config from master #2481

merged 8 commits into from
Jul 20, 2017

Conversation

vstinner
Copy link
Member

No description provided.

@vstinner
Copy link
Member Author

This PR is more or less a copy of the PR #2475 adapted for the 3.3 branch. Right now, I didn't backport the test_os change, since I got conflict and I'm not sure that the test_os os.walk() test also fails on 3.3.

@vstinner vstinner changed the title [3.3] Backport CI config from master [WIP][3.3] Backport CI config from master Jun 28, 2017
@vstinner
Copy link
Member Author

The Travis CI job failed with:

$ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi

Getting the list of files that have been added/changed ... need a checkout to get modified files

The AppVeyor job is full of errors, it seems like the build system is unable to open the Python 3.3 PCbuild files.

@vstinner
Copy link
Member Author

@zooba, @zware, @brettcannon: Which Visual Studio is needed to build Python 3.3 on Windows? Any idea how to adapt AppVeyor configuration to fix it?

@vstinner
Copy link
Member Author

If it's just impossible to build Python 3.3 on AppVeyor, hum, too bad. We might remove the AppVeyor CI in that case. If at least we could have Travis CI for Linux, it would already be a first enhancement!

@zooba
Copy link
Member

zooba commented Jun 30, 2017

No idea, never tried to build it. I'd assume it's the same configuration as 3.4.

Looking at the build log, it probably needs to be pointed specifically at the VS 2010 MSBuild.exe, rather than any newer version.

@vstinner
Copy link
Member Author

vstinner commented Jul 3, 2017

I added 2 more commits:

test_protocol_sslv3() and test_options() of test_ssl still fail because of SSLv3. OpenSSL now disables SSLv3 by default: we should backport a9dcdab from the 3.4 branch, but I would prefer to do that in a separated commit since this change not only changes tests but also Modules/_ssl.c.

@vstinner vstinner changed the title [WIP][3.3] Backport CI config from master [3.3] Backport CI config from master Jul 4, 2017
@vstinner
Copy link
Member Author

vstinner commented Jul 4, 2017

Ok, I removed the [WIP] tag: I consider that this PR is now ready for a review.

Summary of the PR for Python 3.3:

  • Add CI configuration to get 3 CI: Travis CI Linux, Travis CI macOS and AppVeyor CI
  • I adapted and simplifiy the CI configuration to 3.3
  • I backported two test fixes: "replace 512 bit dh key with a 2014 bit one" to fix test_ssl, "bpo-30231: Remove skipped test_imaplib tests" to fix test_imaplib. These change only change Lib/test/

CI status:

  • Travis CI Linux: test_site fails
  • Travis CI macOS: 5 tests fail, test__osx_support test_distutils test_site test_socket test_sysconfig -- sorry, I didn't look at these ones. I prefer to focus on Linux.
  • AppVeyor: broken, the compilation fails badly. I don't know how to debug/fix that. Maybe we should just remove this CI?

@zware
Copy link
Member

zware commented Jul 12, 2017

I think getting AppVeyor working with 3.3 is probably more effort than it is worth. Various rewrites of the batch files in PCbuild (build.bat, rt.bat, etc.) were not backported that far, and probably don't need to be.

FTR, 3.3 was built with VS 2010.

@ned-deily
Copy link
Member

I agree with not trying to get AppVeyor working. 3.3 is just about to be end-of-lifed. Basically, we just need to get the existing small backlog of security patches and PRs updated and merged and then that will likely be it for 3.3, assuming no new security issues arise between now and 2017-09-29. In any case, let's hold off on making a decision whether to merge this until we've had a chance to review the 3.3 backlog.

@@ -0,0 +1,28 @@
version: 3.3.6+.{build}
Copy link
Member

Choose a reason for hiding this comment

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

As noted in the comments above, let's not try to deal with appveyor. There should only be a handful of further commits to the 3.3 branch before it is EOLed. So delete this file.

Copy link
Member Author

Choose a reason for hiding this comment

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

I deleted AppVeyor.

@@ -0,0 +1,47 @@
Contributing to Python
Copy link
Member

Choose a reason for hiding this comment

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

There's no reason to add this file for 3.3. Just delete it, please.

Copy link
Member Author

Choose a reason for hiding this comment

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

deleted

vstinner added 7 commits July 19, 2017 11:12
Add .travis.yml for Travis CI.
The regen-all Makefile rule doesn't exist in Python 3.4, only since
Python 3.5 and newer (and 2.7).
tzdata resource doesn't exist in Python 3.4.
Fixing Sphinx warnings requires to backport huge intrusive changes
like:

- commit d97b7dc
- commit 5c67933
The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept
TLS connection using our self-signed x509 certificate. Remove the two
tests which are already skipped.
(cherry picked from commit 7895a05)
@vstinner
Copy link
Member Author

Oh, Travis CI success on Linux: "All checks have passed"

Strange. On my Fedora 25, test_ssl and test_ftplib fail (maybe an error related to SSLv3, I don't know exactly). Well, it's a good thing, the CI pass :-)

@vstinner
Copy link
Member Author

The macOS CI has 4 failing tests: test__osx_support test_distutils test_socket test_sysconfig. Examples:

@ned-deily: Should I try to fix these failures, remove the macOS CI from Travis config, or just do nothing?

======================================================================

FAIL: test_get_platform_osx (test.test__osx_support.Test_OSXSupport)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/travis/build/python/cpython/Lib/test/test__osx_support.py", line 272, in test_get_platform_osx

    self.assertEqual(('macosx', '10.6', 'fat'), result)

AssertionError: Tuples differ: ('macosx', '10.6', 'fat') != ('macosx', '10.6', ' ')

test_deployment_target_default (distutils.tests.test_build_ext.BuildExtTestCase) ... /var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/tmpb6az8m/deptargetmodule.c:7:2: error: "Unexpected target"

#error "Unexpected target"

 ^

======================================================================

ERROR: testFDPassEmpty (test.test_socket.RecvmsgSCMRightsStreamTest)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/travis/build/python/cpython/Lib/test/test_socket.py", line 2620, in testFDPassEmpty

    len(MSG), 10240),

  File "/Users/travis/build/python/cpython/Lib/test/test_socket.py", line 1728, in doRecvmsg

    result = sock.recvmsg(bufsize, *args)

OSError: [Errno 12] Cannot allocate memory


======================================================================

FAIL: test_get_platform (test.test_sysconfig.TestSysConfig)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/travis/build/python/cpython/Lib/test/test_sysconfig.py", line 179, in test_get_platform

    self.assertEqual(get_platform(), 'macosx-10.4-fat')

AssertionError: 'macosx-10.4-x86_64' != 'macosx-10.4-fat'

- macosx-10.4-x86_64

+ macosx-10.4-fat

@vstinner
Copy link
Member Author

Summary of the PR:

  • Add .travis.yml to run the Python test suite on Linux and macOS
  • Remove 2 tests from test_imaplib using a public IMAP server which doesn't accept our private x509 client certificate. These tests were already removed in 2.7, 3.5, 3.6 and master.
  • Python test suite pass on Travis CI Linux
  • 4 tests fails on Travis CI macOS

AppVeyor and CodeCov are not part of this PR, I consider that we don't need them for Python 3.3. For AppVeyor, it's just too hard to setup the CI and it was decided that it's not worth it (read comments above).

IMHO a working CI on Linux is already a huge improvement compared to the current state: no more CI at all. We removed the Python 3.3 buildbots long time ago...

$ git diff 3.3.. --stat
 .travis.yml              | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Lib/test/test_imaplib.py | 10 ----------
 2 files changed, 63 insertions(+), 10 deletions(-)

@ned-deily
Copy link
Member

"The macOS CI has 4 failing tests." You should remove the macOS CI configuration. Vanilla 3.3.x has never functioned properly on macOS versions beyond OS X 9. 3.3.x was already in security-fix mode when OS X 10.10 was released which broke various things. It would be out-of-scope to try to fix things now as there has been no demand for it that I'm aware of and it would be sending the wrong message now; in any case, some downstream distributors have backported 3.3 support long ago if anyone really needs it.

@vstinner
Copy link
Member Author

You should remove the macOS CI configuration.

Ok, done.

@ned-deily ned-deily merged commit b5f20ea into python:3.3 Jul 20, 2017
@vstinner vstinner deleted the travis33 branch July 20, 2017 22:33
@vstinner
Copy link
Member Author

Yeah! A CI for 3.3, that's so cool ;-)

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.

6 participants