Skip to content

Commit

Permalink
Add support for Python 3.12
Browse files Browse the repository at this point in the history
Fixes #71
  • Loading branch information
amruthvvkp committed Jun 7, 2024
1 parent cc0fbe9 commit dd2c699
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 32 deletions.
40 changes: 25 additions & 15 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ environment:
PYTHON_VERSION: 3.11
PYTHON_ARCH: 32

- job_name: Python 3.12 x86
PYTHON: "C:\\Python312"
PYTHON_VERSION: 3.12
PYTHON_ARCH: 32

- job_name: Python 3.7 x64
PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: 3.7
Expand All @@ -55,16 +60,21 @@ environment:
PYTHON_VERSION: 3.11
PYTHON_ARCH: 64

- job_name: Python 3.12 x64
PYTHON: "C:\\Python312"
PYTHON_VERSION: 3.12
PYTHON_ARCH: 64

init:
- ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%
install:
- cmd: >-
set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
- cmd: >-
set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
python --version
python --version
before_build:
- cmd: git clone https://github.com/FlaUI/FlaUI.git C:\projects\FlaUI
- cmd: git clone https://github.com/FlaUI/FlaUI.git C:\projects\FlaUI

build_script:
- ps: |
Expand Down Expand Up @@ -99,17 +109,17 @@ artifacts:
name: test-applications

on_finish:
- ps: >-
$wc = New-Object 'System.Net.WebClient'
- ps: >-
$wc = New-Object 'System.Net.WebClient'
if (Test-Path .test-results.xml) {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .test-results.xml))
}
if (Test-Path .test-results.xml) {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .test-results.xml))
}
if (Test-Path .coverage.xml) {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/coverage/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .coverage.xml))
}
if (Test-Path .coverage.xml) {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/coverage/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .coverage.xml))
}
if (Test-Path "C:/projects/FlaUI/artifacts/UnitTestResult.xml") {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", "C:/projects/FlaUI/artifacts/UnitTestResult.xml")
}
if (Test-Path "C:/projects/FlaUI/artifacts/UnitTestResult.xml") {
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", "C:/projects/FlaUI/artifacts/UnitTestResult.xml")
}
56 changes: 39 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Quality Assurance",
Expand All @@ -47,35 +49,57 @@ classifiers = [
"Topic :: Software Development :: Testing",
"Intended Audience :: Developers",
]

[tool.poetry-git-version-plugin]
make_alpha_version = true
alpha_version_format = '{version}a{distance}+{commit_hash}'
version_format = '{version}'

[tool.poetry.dependencies]
python = ">=3.7,<3.12"
loguru = "^0.6.0"
pillow = "^9.3.0"
arrow = "^1.2.3"
pythonnet = "^3.0.1"
pydantic = "^2.0.0"
pydantic-settings = "^2.0.0"
pydantic-extra-types = "^2.0.0"
python = ">=3.7,<3.13"
loguru = "^0.7.2"
pillow = [
{ version = "^10.3.0", python = ">=3.8" },
{ version = "^9.3.0", python = "<3.8" },
]
arrow = [
{ version = "^1.3.0", python = ">=3.8" },
{ version = "^1.2.3", python = "<3.8" },
]
pythonnet = "^3.0.3"
pydantic = [
{ version = "^2.7.3", python = ">=3.8" },
{ version = "^2.0.0", python = "<3.8" },
]
pydantic-settings = [
{ version = "^2.3.1", python = ">=3.8" },
{ version = "^2.0.0", python = "<3.8" },
]
pydantic-extra-types = [
{ version = "^2.8.0", python = ">=3.8" },
{ version = "^2.0.0", python = "<3.8" },
]

[tool.poetry.group.dev.dependencies]
mypy = "^0.991"
mypy = [
{ version = "^1.10.0", python = ">=3.8" },
{ version = "^0.991", python = "<3.8" },
]
jupyter = "^1.0.0"
isort = "^5.10.1"
pre-commit = { version = "^3.3.3", python = ">=3.8" }
interrogate = "^1.5.0"
ruff = "^0.0.288"
interrogate = [
{ version = "^1.7.0", python = ">=3.8" },
{ version = "^1.5.0", python = "<3.8" },
]
ruff = "^0.4.8"

[tool.poetry.group.dev]
optional = true

[tool.poetry.group.unit_test.dependencies]
pytest = "^7.2.0"
pytest = [
{ version = "^8.2.2", python = ">=3.8" },
{ version = "^7.2.0", python = "<3.8" },
]
pytest-cov = "^4.0.0"

[tool.poetry.group.unit_test]
Expand All @@ -94,7 +118,7 @@ requires = ["poetry-core>=1.0.0", "setuptools", "wheel"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
minversion = "6.0"
minversion = "8.0"
addopts = "-ra -q -p no:warnings --junitxml=test-results.xml"
testpaths = ["tests/unit_tests/"]

Expand Down Expand Up @@ -137,7 +161,6 @@ py_version = 310
[tool.black]
# https://github.com/psf/black
line-length = 120
target_version = ['py310']
exclude = '''
(
/(
Expand All @@ -157,7 +180,6 @@ plugins = ["pydantic.mypy"]

follow_imports = "skip"
warn_redundant_casts = true
swarn_unused_ignores = true
no_implicit_reexport = true

[tool.pydantic-mypy]
Expand Down

0 comments on commit dd2c699

Please sign in to comment.