]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46178: Remove/rename redundant Travis CI code (#30309)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Fri, 31 Dec 2021 00:16:27 +0000 (02:16 +0200)
committerGitHub <noreply@github.com>
Fri, 31 Dec 2021 00:16:27 +0000 (16:16 -0800)
.azure-pipelines/posix-steps.yml
Doc/library/unittest.rst
Lib/test/test_urllib2net.py
README.rst
Tools/scripts/patchcheck.py

index b6dde593019e6c6241c36f1012d61cc11f7ebdf4..2a3680897302efe1b2c73a4eede3bc8925a8ea1c 100644 (file)
@@ -66,7 +66,7 @@ steps:
         COMMAND: make
 
 - ${{ if eq(parameters.patchcheck, 'true') }}:
-  - script: ./python Tools/scripts/patchcheck.py --travis true
+  - script: ./python Tools/scripts/patchcheck.py --ci true
     displayName: 'Run patchcheck.py'
     condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
 
index bf7a1e87928a6488d49e530c499c6e7800f77bce..22723f42d048f7bdca24ef1bbbd1dc3127655c9b 100644 (file)
@@ -72,8 +72,9 @@ test runner
    a GUI tool for test discovery and execution.  This is intended largely for ease of use
    for those new to unit testing.  For production environments it is
    recommended that tests be driven by a continuous integration system such as
-   `Buildbot <https://buildbot.net/>`_, `Jenkins <https://jenkins.io/>`_
-   or `Travis-CI <https://travis-ci.com>`_, or `AppVeyor <https://www.appveyor.com/>`_.
+   `Buildbot <https://buildbot.net/>`_, `Jenkins <https://jenkins.io/>`_,
+   `GitHub Actions <https://github.com/features/actions>`_, or
+   `AppVeyor <https://www.appveyor.com/>`_.
 
 
 .. _unittest-minimal-example:
index aa41811560c789114cd80dea6d0f1da87a22fcd4..04cfb492e454923e299864e6fac3c039f5afbcd8 100644 (file)
@@ -28,13 +28,6 @@ def _wrap_with_retry_thrice(func, exc):
         return _retry_thrice(func, exc, *args, **kwargs)
     return wrapped
 
-# bpo-35411: FTP tests of test_urllib2net randomly fail
-# with "425 Security: Bad IP connecting" on Travis CI
-skip_ftp_test_on_travis = unittest.skipIf('TRAVIS' in os.environ,
-                                          'bpo-35411: skip FTP test '
-                                          'on Travis CI')
-
-
 # Connecting to remote hosts is flaky.  Make it more robust by retrying
 # the connection several times.
 _urlopen_with_retry = _wrap_with_retry_thrice(urllib.request.urlopen,
@@ -139,7 +132,6 @@ class OtherNetworkTests(unittest.TestCase):
     # XXX The rest of these tests aren't very good -- they don't check much.
     # They do sometimes catch some major disasters, though.
 
-    @skip_ftp_test_on_travis
     def test_ftp(self):
         urls = [
             'ftp://www.pythontest.net/README',
@@ -339,7 +331,6 @@ class TimeoutTest(unittest.TestCase):
 
     FTP_HOST = 'ftp://www.pythontest.net/'
 
-    @skip_ftp_test_on_travis
     def test_ftp_basic(self):
         self.assertIsNone(socket.getdefaulttimeout())
         with socket_helper.transient_internet(self.FTP_HOST, timeout=None):
@@ -347,7 +338,6 @@ class TimeoutTest(unittest.TestCase):
             self.addCleanup(u.close)
             self.assertIsNone(u.fp.fp.raw._sock.gettimeout())
 
-    @skip_ftp_test_on_travis
     def test_ftp_default_timeout(self):
         self.assertIsNone(socket.getdefaulttimeout())
         with socket_helper.transient_internet(self.FTP_HOST):
@@ -359,7 +349,6 @@ class TimeoutTest(unittest.TestCase):
                 socket.setdefaulttimeout(None)
             self.assertEqual(u.fp.fp.raw._sock.gettimeout(), 60)
 
-    @skip_ftp_test_on_travis
     def test_ftp_no_timeout(self):
         self.assertIsNone(socket.getdefaulttimeout())
         with socket_helper.transient_internet(self.FTP_HOST):
@@ -371,7 +360,6 @@ class TimeoutTest(unittest.TestCase):
                 socket.setdefaulttimeout(None)
             self.assertIsNone(u.fp.fp.raw._sock.gettimeout())
 
-    @skip_ftp_test_on_travis
     def test_ftp_timeout(self):
         with socket_helper.transient_internet(self.FTP_HOST):
             u = _urlopen_with_retry(self.FTP_HOST, timeout=60)
index 9f84432a55c97234516a52c3b4fefbaee38c479d..d4b6621a805540246bfc27c313ce6ac2551e9a65 100644 (file)
@@ -1,10 +1,6 @@
 This is Python version 3.11.0 alpha 3
 =====================================
 
-.. image:: https://travis-ci.com/python/cpython.svg?branch=main
-   :alt: CPython build status on Travis CI
-   :target: https://travis-ci.com/python/cpython
-
 .. image:: https://github.com/python/cpython/workflows/Tests/badge.svg
    :alt: CPython build status on GitHub Actions
    :target: https://github.com/python/cpython/actions
index 8e59c78a4c58443dbed01d7a5b642e55592afc8b..4cab66c8e97bed7e39e85aa803a7b4ada9b893f1 100755 (executable)
@@ -245,7 +245,7 @@ def regenerated_pyconfig_h_in(file_paths):
     else:
         return "not needed"
 
-def travis(pull_request):
+def ci(pull_request):
     if pull_request == 'false':
         print('Not a pull request; skipping')
         return
@@ -301,10 +301,10 @@ def main():
 if __name__ == '__main__':
     import argparse
     parser = argparse.ArgumentParser(description=__doc__)
-    parser.add_argument('--travis',
+    parser.add_argument('--ci',
                         help='Perform pass/fail checks')
     args = parser.parse_args()
-    if args.travis:
-        travis(args.travis)
+    if args.ci:
+        ci(args.ci)
     else:
         main()