Upgrade to Python 3.11 on Heroku, refs #1905

test-3.12-dev
Simon Willison 2022-11-18 16:44:46 -08:00
rodzic 72ac9bf82f
commit 733447d7c7
2 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -194,7 +194,7 @@ def temporary_heroku_directory(
fp.write(json.dumps(metadata_content, indent=2))
with open("runtime.txt", "w") as fp:
fp.write("python-3.8.10")
fp.write("python-3.11.0")
if branch:
install = [

Wyświetl plik

@ -133,8 +133,15 @@ def test_publish_heroku_plugin_secrets(
@pytest.mark.serial
@mock.patch("shutil.which")
def test_publish_heroku_generate_dir(mock_which, tmp_path_factory):
@mock.patch("datasette.publish.heroku.check_output")
@mock.patch("datasette.publish.heroku.call")
def test_publish_heroku_generate_dir(
mock_call, mock_check_output, mock_which, tmp_path_factory
):
mock_which.return_value = True
mock_check_output.side_effect = lambda s: {
"['heroku', 'plugins']": b"heroku-builds",
}[repr(s)]
runner = CliRunner()
os.chdir(tmp_path_factory.mktemp("runner"))
with open("test.db", "w") as fp:
@ -163,7 +170,7 @@ def test_publish_heroku_generate_dir(mock_which, tmp_path_factory):
}
for name, expected in (
("requirements.txt", "datasette"),
("runtime.txt", "python-3.8.10"),
("runtime.txt", "python-3.11.0"),
(
"Procfile",
(