Skip to content

Commit ab68d38

Browse files
Fix tox configuration for GitHub CI and Ubuntu 24.04
1 parent 855cb9b commit ab68d38

File tree

8 files changed

+8
-11
lines changed

8 files changed

+8
-11
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
include:
31-
- python-version: '3.6'
32-
os: ubuntu-20.04
3331
- python-version: '3.10'
3432
os: ubuntu-22.04
3533
- python-version: '3.11'

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ mypy = [
7373
]
7474
# pyre introduced two false-postives recently, pin it to prevent further surprises:
7575
pyre = [
76-
"pyre-check == 0.9.21",
76+
"pyre-check == 0.9.23",
7777
"pyre-extensions == 0.0.30",
7878
]
7979
pytype = [

pyre_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88
import time
99

10-
import mock
10+
from unittest import mock
1111

1212
me = os.path.basename(__file__) + ":"
1313

pytest.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
required_plugins =
1212
pytest_httpserver
1313
pytest-forked
14-
pytest-localftpserver
1514
pytest-pythonpath
1615
pytest-subprocess
1716
pytest-timeout

tests/test_httpaccessor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def http_get_request_data(self, url, read_file, error_handler):
4343

4444
def assert_http_get_request_data(self, url, read_file, error_handler):
4545
# type:(str, str, ErrorHandler) -> HTTPAccessor
46-
# pyre-ignore[23]: silence false positive
4746
with self.http_get_request_data(url, read_file, error_handler) as (httpaccessor, ref):
4847
http_accessor_filehandle = httpaccessor.openAddress(read_file)
4948
if sys.version_info >= (3, 0):

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# 2. python 3.6 test and pylint warnings from changed lines
66
# 3. pytype (needs Python 3.8 for best results)
77
# 4. pyre and pyright checks, pytest test report as markdown for GitHub Actions summary
8-
envlist = py38-covcombine-check, py36-lint-test, py310-pytype, py311-pyre-mdreport
8+
envlist = py311-covcombine-check, py36-lint-test, py310-pytype, py311-pyre-mdreport
99
isolated_build = true
1010
skip_missing_interpreters = true
1111
requires =
@@ -203,7 +203,7 @@ max-line-length = 129
203203
[pyre]
204204
commands =
205205
pyre: python3.11 --version -V # Needs py311-pyre, does not work with py310-pyre
206-
python pyre_runner.py
206+
python3.11 pyre_runner.py
207207
-pyright
208208

209209
[pytype]

xcp/bootloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
import xcp.cmd
3434

35-
# pyre-ignore-all-errors[21]
35+
# pyre-ignore-all-errors[21,30]
3636
try: # xenserver-release.rpm puts a branding.py into our xcp installation directory:
3737
from xcp import branding # type:ignore[attr-defined] # pytype: disable=import-error
3838
except ImportError: # For CI, use stubs/branding.py (./stubs is added to pythonpath)

xcp/logger.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ def openLog(lfile, level=logging.INFO):
6464
h.close()
6565
handler = logging.handlers.RotatingFileHandler(lfile,
6666
maxBytes=2**31)
67+
# pyre-ignore[16]
6768
old = fcntl.fcntl(handler.stream.fileno(), fcntl.F_GETFD)
68-
fcntl.fcntl(handler.stream.fileno(),
69-
fcntl.F_SETFD, old | fcntl.FD_CLOEXEC)
69+
# pyre-ignore[16]
70+
fcntl.fcntl(handler.stream.fileno(), fcntl.F_SETFD, old | fcntl.FD_CLOEXEC)
7071

7172
# or if it is not a string, assume its a file-like object
7273
else:

0 commit comments

Comments
 (0)