From 92eb702f6be2d1cc02d53d776a6318578d455e32 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 8 Jun 2021 14:36:20 -0400 Subject: [PATCH 1/7] Add newsfragment --- newsfragments/3733.installation | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/3733.installation diff --git a/newsfragments/3733.installation b/newsfragments/3733.installation new file mode 100644 index 000000000..c1cac649b --- /dev/null +++ b/newsfragments/3733.installation @@ -0,0 +1 @@ +Use netifaces 0.11.0 wheel package from PyPI.org if you use 64-bit Python 2.7 on Windows. VCPython27 downloads are no longer available at Microsoft's website, which has made building Python 2.7 wheel packages of Python libraries with C extensions (such as netifaces) on Windows difficult. From 197b9051749303896e18ce5cb5792d207a666350 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 8 Jun 2021 14:36:59 -0400 Subject: [PATCH 2/7] Update netifaces dependency --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index df917eb40..22988de73 100644 --- a/setup.py +++ b/setup.py @@ -128,7 +128,7 @@ install_requires = [ "future >= 0.18.2", # Discover local network configuration - "netifaces", + "netifaces >= 0.11.0", # Utility code: "pyutil >= 3.3.0", From 6c578df6a9307a7d444f718d0fd8a384e4436017 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 8 Jun 2021 14:48:12 -0400 Subject: [PATCH 3/7] CI: remove special handling for Python 2.7 + Windows --- .github/workflows/ci.yml | 41 ---------------------------------------- 1 file changed, 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 875f21cc9..92a0b9bfc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,33 +37,10 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - if: ${{ matrix.os != 'windows-latest' }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - # See note below about need for using 32-bit Python 2.7 on - # Windows. - - name: Set up Python ${{ matrix.python-version }} [Windows x64] - if: ${{ ( matrix.os == 'windows-latest' ) && ( matrix.python-version != '2.7' ) }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: 'x64' - - # We use netifaces, which does not ship a 64-bit wheel for the - # Python 2.7 + Windows combination, but it ships a 32-bit wheel. - # Since MS has removed vcpython27 compiler downloads from their - # usual download site, building a netifaces wheel locally is not - # an option anymore. So let us just test with 32-bit Python on - # Windows. - - name: Set up Python ${{ matrix.python-version }} [Windows x86] - if: ${{ ( matrix.os == 'windows-latest' ) && ( matrix.python-version == '2.7' ) }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - architecture: 'x86' - # To use pip caching with GitHub Actions in an OS-independent # manner, we need `pip cache dir` command, which became # available since pip v20.1+. At the time of writing this, @@ -203,19 +180,10 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - if: ${{ matrix.os != 'windows-latest' }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - # See this step under coverage job. - - name: Set up Python ${{ matrix.python-version }} [Windows x86] - if: ${{ matrix.os == 'windows-latest' }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - architecture: 'x86' - - name: Get pip cache directory id: pip-cache run: | @@ -272,19 +240,10 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - if: ${{ matrix.os != 'windows-latest' }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - # See this step under coverage job. - - name: Set up Python ${{ matrix.python-version }} [Windows x86] - if: ${{ matrix.os == 'windows-latest' }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - architecture: 'x86' - - name: Get pip cache directory id: pip-cache run: | From ccfd897914edd7e1a2d4daec58f720d6aa811002 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 8 Jun 2021 14:54:19 -0400 Subject: [PATCH 4/7] Do not rock the NixOS boat --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 22988de73..df917eb40 100644 --- a/setup.py +++ b/setup.py @@ -128,7 +128,7 @@ install_requires = [ "future >= 0.18.2", # Discover local network configuration - "netifaces >= 0.11.0", + "netifaces", # Utility code: "pyutil >= 3.3.0", From f65d6c14c9e3fe6c85efb73e6dd8cab18d32980e Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Fri, 25 Jun 2021 11:03:47 -0400 Subject: [PATCH 5/7] Rename related newsfragment The newsfragment text related to ticket #3681 is in odds with the changess made in ticket #3733. We do not want the old text to confuse people. Renaming it to .minor should do it, since minor newsfragments are excluded from final NEWS file. --- newsfragments/{3681.installation => 3681.minor} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename newsfragments/{3681.installation => 3681.minor} (100%) diff --git a/newsfragments/3681.installation b/newsfragments/3681.minor similarity index 100% rename from newsfragments/3681.installation rename to newsfragments/3681.minor From a2186f3c989a9027cca9f5c279b18c4289d48e80 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Fri, 25 Jun 2021 11:07:11 -0400 Subject: [PATCH 6/7] Add an explanation within newsfragment Why are we changing an unrelated newsfragment? --- newsfragments/3681.minor | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/newsfragments/3681.minor b/newsfragments/3681.minor index a697e6c60..bc84b6b8f 100644 --- a/newsfragments/3681.minor +++ b/newsfragments/3681.minor @@ -1,3 +1,8 @@ +(The below text is no longer valid: netifaces has released a 64-bit +Python 2.7 wheel for Windows. Ticket #3733 made the switch in CI. We +should be able to test and run Tahoe-LAFS without needing vcpython27 +now.) + Tahoe-LAFS CI now runs tests only on 32-bit Windows. Microsoft has removed vcpython27 compiler downloads from their site, and Tahoe-LAFS needs vcpython27 to build and install netifaces on 64-bit Windows. From d2fdd92b8b91ef49fda4b568706913886babe116 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 5 Jul 2021 08:37:49 -0400 Subject: [PATCH 7/7] Use older Tor on macOS + Python 2.7 --- .github/workflows/ci.yml | 15 +++++++++++++-- newsfragments/3744.minor | 0 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 newsfragments/3744.minor diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5b5f581d..b1c1108f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -189,9 +189,20 @@ jobs: if: matrix.os == 'ubuntu-latest' run: sudo apt install tor - - name: Install Tor [macOS] - if: matrix.os == 'macos-latest' + - name: Install Tor [macOS, ${{ matrix.python-version }} ] + if: ${{ ( matrix.os == 'macos-latest' ) && ( matrix.python-version != '2.7' ) }} run: brew install tor + + # TODO: See https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3744. + # We have to use an older version of Tor for running integration + # tests on macOS using Python 2.7. We should stop doing this + # when Python 2.7 is dropped. + - name: Install Tor [macOS, ${{ matrix.python-version }} ] + if: ${{ ( matrix.os == 'macos-latest' ) && ( matrix.python-version == '2.7' ) }} + run: | + brew extract --version 0.4.5.8 tor homebrew/cask + brew install tor@0.4.5.8 + brew link --overwrite tor@0.4.5.8 - name: Install Tor [Windows] if: matrix.os == 'windows-latest' diff --git a/newsfragments/3744.minor b/newsfragments/3744.minor new file mode 100644 index 000000000..e69de29bb