diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index cc1858a08c..b56d6cb369 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -10,14 +10,14 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.7, 3.8, 3.9, "3.10", "3.11", '3.12'] + python-version: [3.8, 3.9, "3.10", "3.11", '3.12'] experimental: [false] include: - os: macos-latest experimental: true - python-version: 3.7 + python-version: "3.12" - os: windows-latest - python-version: 3.7 + python-version: "3.12" experimental: true # See https://github.com/actions/toolkit/issues/399 # include: diff --git a/breezy/builtins.py b/breezy/builtins.py index 83dd050e18..d369d59eaf 100644 --- a/breezy/builtins.py +++ b/breezy/builtins.py @@ -4755,17 +4755,6 @@ def run( lsprof_tests=False, sync=False, ): - # During selftest, disallow proxying, as it can cause severe - # performance penalties and is only needed for thread - # safety. The selftest command is assumed to not use threads - # too heavily. The call should be as early as possible, as - # error reporting for past duplicate imports won't have useful - # backtraces. - if sys.version_info[0] < 3: - # TODO(pad.lv/1696545): Allow proxying on Python 3, since - # disallowing it currently leads to failures in many places. - lazy_import.disallow_proxying() - try: from . import tests except ImportError as exc: diff --git a/breezy/export_pot.py b/breezy/export_pot.py index 512d717664..b37339db20 100644 --- a/breezy/export_pot.py +++ b/breezy/export_pot.py @@ -81,9 +81,7 @@ def _parse_source(source_text, filename=""): # string terminates on. It's more useful to have the line the # string begins on. Unfortunately, counting back newlines is # only an approximation as the AST is ignorant of escaping. - str_to_lineno[node.s] = node.lineno - ( - 0 if sys.version_info >= (3, 8) else node.s.count("\n") - ) + str_to_lineno[node.s] = node.lineno return cls_to_lineno, str_to_lineno diff --git a/breezy/tests/blackbox/test_locale.py b/breezy/tests/blackbox/test_locale.py index adb3e01df4..64d6b4a2ce 100644 --- a/breezy/tests/blackbox/test_locale.py +++ b/breezy/tests/blackbox/test_locale.py @@ -86,70 +86,6 @@ def test_log_coerced_utf8(self): out, ) - @unittest.skipIf( - sys.version_info[:2] >= (3, 8), - "python > 3.8 doesn't allow changing filesystem default encoding", - ) - def test_log_C(self): - self.disable_missing_extensions_warning() - out, err = self.run_log_quiet_long( - ["tree"], - # C is not necessarily the default locale, so set both LANG and - # LC_ALL explicitly because LC_ALL is preferred on (some?) Linux - # systems but only LANG is respected on Windows. - env_changes={ - "LANG": "C", - "LC_ALL": "C", - "LC_CTYPE": None, - "LANGUAGE": None, - "PYTHONCOERCECLOCALE": "0", - "PYTHONUTF8": "0", - }, - ) - self.assertEqual(b"", err) - self.assertEqualDiff( - b"""\ ------------------------------------------------------------- -revno: 1 -committer: ???? Meinel -branch nick: tree -timestamp: Thu 2006-08-24 20:28:17 +0000 -message: - Unicode ? commit -""", - out, - ) - - @unittest.skipIf( - sys.version_info[:2] >= (3, 8), - "python > 3.8 doesn't allow changing filesystem default encoding", - ) - def test_log_BOGUS(self): - out, err = self.run_log_quiet_long( - ["tree"], - env_changes={ - "LANG": "BOGUS", - "LC_ALL": None, - "LC_CTYPE": None, - "LANGUAGE": None, - "PYTHONCOERCECLOCALE": "0", - "PYTHONUTF8": "0", - }, - ) - self.assertStartsWith(err, b"brz: WARNING: Error: unsupported locale setting") - self.assertEqualDiff( - b"""\ ------------------------------------------------------------- -revno: 1 -committer: ???? Meinel -branch nick: tree -timestamp: Thu 2006-08-24 20:28:17 +0000 -message: - Unicode ? commit -""", - out, - ) - class TestMultibyteCodecs(tests.TestCaseWithTransport): """Tests for quirks of multibyte encodings and their python codecs.""" diff --git a/breezy/tests/test_export_pot.py b/breezy/tests/test_export_pot.py index 7723850530..4b0948e9a0 100644 --- a/breezy/tests/test_export_pot.py +++ b/breezy/tests/test_export_pot.py @@ -133,17 +133,9 @@ def test_strings_multiline_escapes(self): ) """ _, str_lines = export_pot._parse_source(src) - if sys.version_info < (3, 8): - self.expectFailure( - "Escaped newlines confuses the multiline handling", - self.assertNotEqual, - str_lines, - {"Escaped\n": 0, "Raw\\n": 2, "A\n\nB\n\nC\n\n": -2}, - ) - else: - self.assertEqual( - str_lines, {"Escaped\n": 1, "Raw\\n": 2, "A\n\nB\n\nC\n\n": 4} - ) + self.assertEqual( + str_lines, {"Escaped\n": 1, "Raw\\n": 2, "A\n\nB\n\nC\n\n": 4} + ) class TestModuleContext(tests.TestCase): diff --git a/pyproject.toml b/pyproject.toml index e7784ca33c..618366f692 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ classifiers = [ "Programming Language :: C", "Topic :: Software Development :: Version Control", ] -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ "configobj", "fastbencode",