Skip to content

Commit

Permalink
Remove Python 3.7 (Azure#33722)
Browse files Browse the repository at this point in the history
* remove 3.7
* require pygithub (and from there pynacl) from the default requirements set. this should allow testing on windows pypy39 to successfully install requirements
* remove python_version spec
* rebalance to force windows onto py310. there iwn't a wheel for pywin32 that works with pypy
* Update tools/azure-sdk-tools/setup.py
  • Loading branch information
scbedd authored Jan 9, 2024
1 parent b135011 commit fc9d4e5
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion doc/sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in the :doc:`Installation Page<installation>`
System Requirements:
--------------------

The supported Python versions are 2.7.x, 3.4.x, 3.5.x, 3.6.x and 3.7.x
The supported Python versions are 3.8.x, 3.9.x, 3.10.x, 3.11.x, and 3.12.x
To download Python, please visit
https://www.python.org/download/

Expand Down
5 changes: 1 addition & 4 deletions eng/ci_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ coverage==7.2.5
Jinja2==3.1.2
MarkupSafe==2.1.3
json-delta==2.0
readme_renderer==37.3; python_version <= '3.7'
readme_renderer==42.0; python_version > '3.7'
readme_renderer==42.0;
pyopenssl==23.2.0
python-dotenv==0.21.1; python_version <= '3.7'
python-dotenv==1.0.0; python_version > '3.7'
pyyaml==6.0.1
urllib3==1.26.9
PyGithub==1.59.1
ConfigArgParse==1.2.3
six==1.16.0

Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/templates/jobs/update_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ pool:

steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
displayName: 'Use Python 3.8'
inputs:
versionSpec: 3.7
versionSpec: 3.8

- script: |
python3 -m pip install azure-devtools[ci_tools]>=1.1.0
python3 -m pip install -e "git+https://github.com/Azure/azure-sdk-for-python#subdirectory=tools/azure-sdk-tools&egg=azure-sdk-tools"
python3 -m pip install -e $(Build.SourcesDirectory)/tools/azure-sdk-tools[ghtools]
displayName: 'Install Azure SDK tools'

- script: python3 -m packaging_tools.update_pr -v --pr-number $(System.PullRequest.PullRequestNumber) --repo $(Build.Repository.Name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ubuntu-20.04": { "OSVmImage": "MMSUbuntu20.04", "Pool": "azsdk-pool-mms-ubuntu-2004-general" },
"macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
},
"PythonVersion": [ "3.9", "3.7", "3.8", "3.10", "3.11" ],
"PythonVersion": [ "3.9", "3.8", "3.10", "3.11" ],
"CoverageArg": "--disablecov",
"TestSamples": "false"
},
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/stages/platform-matrix-no-312.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ubuntu-20.04": { "OSVmImage": "MMSUbuntu20.04", "Pool": "azsdk-pool-mms-ubuntu-2004-general" },
"macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
},
"PythonVersion": [ "3.7", "pypy3.9", "3.8", "3.10", "3.11" ],
"PythonVersion": [ "pypy3.9", "3.8", "3.10", "3.11" ],
"CoverageArg": "--disablecov",
"TestSamples": "false"
},
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/stages/platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ubuntu-20.04": { "OSVmImage": "MMSUbuntu20.04", "Pool": "azsdk-pool-mms-ubuntu-2004-general" },
"macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
},
"PythonVersion": [ "3.7", "pypy3.9", "3.8", "3.10", "3.11" ],
"PythonVersion": [ "3.8", "pypy3.9", "3.10", "3.11" ],
"CoverageArg": "--disablecov",
"TestSamples": "false"
},
Expand Down
5 changes: 1 addition & 4 deletions eng/test_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ pyproject-api<1.6
Jinja2==3.1.2
MarkupSafe==2.1.3
json-delta==2.0
readme_renderer==37.3; python_version <= '3.7'
readme_renderer==42.0; python_version > '3.7'
readme_renderer==42.0;
pyopenssl==23.2.0
python-dotenv==0.21.1; python_version <= '3.7'
python-dotenv==1.0.0; python_version > '3.7'
pyyaml==6.0.1
urllib3==1.26.9
PyGithub==1.59.1
ConfigArgParse==1.2.3
six==1.16.0

Expand Down
2 changes: 1 addition & 1 deletion eng/tox/run_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
)
from ci_tools.parsing import ParsedSetup
from ci_tools.variables import in_ci
from gh_tools.vnext_issue_creator import create_vnext_issue


logging.getLogger().setLevel(logging.INFO)
Expand Down Expand Up @@ -102,6 +101,7 @@
sample_code_error = sample_err

if args.next and in_ci() and not is_typing_ignored(package_name):
from gh_tools.vnext_issue_creator import create_vnext_issue
if src_code_error or sample_code_error:
create_vnext_issue(package_name, "mypy")

Expand Down
2 changes: 1 addition & 1 deletion eng/tox/run_pylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from ci_tools.environment_exclusions import is_check_enabled
from ci_tools.parsing import ParsedSetup
from ci_tools.variables import in_ci
from gh_tools.vnext_issue_creator import create_vnext_issue

logging.getLogger().setLevel(logging.INFO)

Expand Down Expand Up @@ -74,6 +73,7 @@
"{} exited with linting error {}. Please see this link for more information https://aka.ms/azsdk/python/pylint-guide".format(pkg_details.name, e.returncode)
)
if args.next and in_ci() and is_check_enabled(args.target_package, "pylint"):
from gh_tools.vnext_issue_creator import create_vnext_issue
create_vnext_issue(pkg_details.name, "pylint")

exit(1)
2 changes: 1 addition & 1 deletion eng/tox/run_pyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
)
from ci_tools.parsing import ParsedSetup
from ci_tools.variables import in_ci
from gh_tools.vnext_issue_creator import create_vnext_issue

logging.getLogger().setLevel(logging.INFO)

Expand Down Expand Up @@ -116,6 +115,7 @@ def get_pyright_config_path(args):
check_call(commands)
except CalledProcessError as error:
if args.next and in_ci() and is_check_enabled(args.target_package, "pyright") and not is_typing_ignored(package_name):
from gh_tools.vnext_issue_creator import create_vnext_issue
create_vnext_issue(package_name, "pyright")

print("See https://aka.ms/python/typing-guide for information.\n\n")
Expand Down
2 changes: 1 addition & 1 deletion eng/tox/run_sphinx_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

from ci_tools.parsing import ParsedSetup
from ci_tools.functions import get_config_setting
from gh_tools.vnext_issue_creator import create_vnext_issue

logging.getLogger().setLevel(logging.INFO)

Expand Down Expand Up @@ -69,6 +68,7 @@ def sphinx_build(target_dir, output_dir, fail_on_warning=False, package_name=Non
)
)
if args.strict and in_ci():
from gh_tools.vnext_issue_creator import create_vnext_issue
create_vnext_issue(package_name, "sphinx")
exit(1)

Expand Down
4 changes: 4 additions & 0 deletions eng/tox/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ setenv =
PROXY_URL=http://localhost:5002
deps =
-rdev_requirements.txt
PyGitHub>=1.59.0
commands =
python -m pip install pylint=={[testenv:next-pylint]pylint_version}
python -m pip install azure-pylint-guidelines-checker==0.2.0 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
Expand Down Expand Up @@ -184,6 +185,7 @@ deps =
types-requests==2.31.0.6
types-six==1.16.21.9
types-redis==4.6.0.7
PyGitHub>=1.59.0
commands =
python {repository_root}/eng/tox/create_package_and_install.py \
-d {envtmpdir}/dist \
Expand Down Expand Up @@ -227,6 +229,7 @@ setenv =
deps =
{[base]deps}
pyright=={[testenv:next-pyright]pyright_version}
PyGitHub>=1.59.0
commands =
python {repository_root}/eng/tox/create_package_and_install.py \
-d {envtmpdir}/dist \
Expand Down Expand Up @@ -353,6 +356,7 @@ deps =
sphinx_rtd_theme==1.3.0
myst_parser==2.0.0
sphinxcontrib-jquery==4.1
PyGitHub>=1.59.0
commands =
python {repository_root}/eng/tox/create_package_and_install.py \
-d {envtmpdir}/dist \
Expand Down
2 changes: 1 addition & 1 deletion scripts/devops_tasks/test_run_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", ".."))

MINIMUM_TESTED_PYTHON_VERSION = ">=3.7.0"
MINIMUM_TESTED_PYTHON_VERSION = ">=3.8.0"

"""
Some samples may "run forever" or need to be timed out after a period of time. Add them here in the following format:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"COMMUNICATION_SKIP_CAPABILITIES_LIVE_TEST": "false"
}
},
"PythonVersion": ["pypy3.9", "3.7", "3.8", "3.10", "3.11"],
"PythonVersion": ["pypy3.9", "3.8", "3.10", "3.11"],
"CoverageArg": "--disablecov",
"TestSamples": "false"
},
Expand Down
4 changes: 2 additions & 2 deletions sdk/identity/platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"include": [
{
"Config": {
"ubuntu_20.04_3.7_msal": {
"ubuntu_20.04_3.8_msal": {
"OSVmImage": "MMSUbuntu20.04",
"Pool": "azsdk-pool-mms-ubuntu-2004-general",
"PythonVersion": "3.7",
"PythonVersion": "3.8",
"CoverageArg": "--disablecov",
"InjectedPackages": "git+https://github.com/AzureAD/microsoft-authentication-library-for-python@dev",
"UnsupportedToxEnvironments": "mindependency,latestdependency"
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/platform-matrix-all-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"windows-2022": { "OSVmImage": "MMS2022", "Pool": "azsdk-pool-mms-win-2022-general" },
"macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
},
"PythonVersion": [ "3.7", "3.8", "3.9", "3.10", "3.11" ],
"PythonVersion": [ "3.8", "3.9", "3.10", "3.11" ],
"CoverageArg": "--disablecov",
"TestSamples": "false",
"AZURE_LIVE_TEST_SERVICE_VERSION": [
Expand Down
5 changes: 2 additions & 3 deletions tools/azure-sdk-tools/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
"PyYAML",
"urllib3",
"tomli-w==1.0.0",
# gh tools
"PyGithub>=1.59.0",
]

setup(
Expand Down Expand Up @@ -60,6 +58,7 @@
":python_version<'3.11'": ["tomli==2.0.1"],
"build": ["six", "setuptools", "pyparsing", "certifi", "cibuildwheel"],
"conda": ["beautifulsoup4"],
"systemperf": ["aiohttp>=3.0", "requests>=2.0", "tornado==6.0.3", "httpx>=0.21", "azure-core"]
"systemperf": ["aiohttp>=3.0", "requests>=2.0", "tornado==6.0.3", "httpx>=0.21", "azure-core"],
"ghtools": ["PyGithub>=1.59.0"],
},
)

0 comments on commit fc9d4e5

Please sign in to comment.