windows: upgrade to Python 3.9

Summary: Python 3.9 has a fix (https://github.com/python/cpython/issues/79473) for a slow mimetype import. This fix saves 300ms on Python startup for Mercurial.

Reviewed By: jordanwebster

Differential Revision: D37890474

fbshipit-source-id: 04da3d3963ba53514b2fa71dd7f1c255740dc9c1
This commit is contained in:
Durham Goode 2022-07-19 15:51:06 -07:00 committed by Facebook GitHub Bot
parent df1a12daef
commit 1ec790ed04
2 changed files with 6 additions and 3 deletions

View File

@ -43,8 +43,10 @@ import zipfile
if sys.version_info.major == 2:
raise RuntimeError("This setup.py is Python 3 only!")
PY_VERSION = "38"
if os.name == "nt":
PY_VERSION = "39"
else:
PY_VERSION = "38"
def ensureenv():

View File

@ -6,6 +6,7 @@
from __future__ import absolute_import
import os.path
import sys
import time
from edenscm.mercurial import progress, registrar
@ -30,7 +31,7 @@ command = registrar.command(cmdtable)
)
def basiccommandtest(ui, exit_code, **opts):
waitforfile(opts.get("waitfile"))
exit(int(exit_code))
sys.exit(int(exit_code))
@command(