switch to python 3.12 (#582)

* switch to python 3.12
* 3.11 on RTD
* fix SyntaxWarning (regex strings were invalid partially)
This commit is contained in:
Patrick Kanzler 2023-10-09 00:13:39 +02:00 committed by GitHub
parent e4f4844983
commit 3a8af8a6f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 17 deletions

View File

@ -12,7 +12,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
matrix: matrix:
python-version: ['3.10', '3.11'] python-version: ['3.11', '3.12']
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ['3.8', '3.9', '3.10', '3.11'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -22,6 +22,7 @@ classifiers =
Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: CPython
Topic :: Software Development :: Libraries :: Python Modules Topic :: Software Development :: Libraries :: Python Modules
Topic :: Office/Business :: Financial :: Point-Of-Sale Topic :: Office/Business :: Financial :: Point-Of-Sale

View File

@ -249,23 +249,26 @@ BARCODE_TYPE_B: Dict[str, bytes] = {
#: supported barcode formats #: supported barcode formats
BARCODE_FORMATS = { BARCODE_FORMATS = {
"UPC-A": ([(11, 12)], "^[0-9]{11,12}$"), "UPC-A": ([(11, 12)], r"^[0-9]{11,12}$"),
"UPC-E": ([(7, 8), (11, 12)], "^([0-9]{7,8}|[0-9]{11,12})$"), "UPC-E": ([(7, 8), (11, 12)], r"^([0-9]{7,8}|[0-9]{11,12})$"),
"EAN13": ([(12, 13)], "^[0-9]{12,13}$"), "EAN13": ([(12, 13)], r"^[0-9]{12,13}$"),
"EAN8": ([(7, 8)], "^[0-9]{7,8}$"), "EAN8": ([(7, 8)], r"^[0-9]{7,8}$"),
"CODE39": ([(1, 255)], "^([0-9A-Z \$\%\+\-\.\/]+|\*[0-9A-Z \$\%\+\-\.\/]+\*)$"), "CODE39": ([(1, 255)], r"^([0-9A-Z \$\%\+\-\.\/]+|\*[0-9A-Z \$\%\+\-\.\/]+\*)$"),
"ITF": ([(2, 255)], "^([0-9]{2})+$"), "ITF": ([(2, 255)], r"^([0-9]{2})+$"),
"NW7": ([(1, 255)], "^[A-Da-d][0-9\$\+\-\.\/\:]+[A-Da-d]$"), "NW7": ([(1, 255)], r"^[A-Da-d][0-9\$\+\-\.\/\:]+[A-Da-d]$"),
"CODABAR": ([(1, 255)], "^[A-Da-d][0-9\$\+\-\.\/\:]+[A-Da-d]$"), # Same as NW7 "CODABAR": ([(1, 255)], r"^[A-Da-d][0-9\$\+\-\.\/\:]+[A-Da-d]$"), # Same as NW7
"CODE93": ([(1, 255)], "^[\\x00-\\x7F]+$"), "CODE93": ([(1, 255)], r"^[\x00-\x7F]+$"),
"CODE128": ([(2, 255)], "^\{[A-C][\\x00-\\x7F]+$"), "CODE128": ([(2, 255)], r"^\{[A-C][\x00-\x7F]+$"),
"GS1-128": ([(2, 255)], "^\{[A-C][\\x00-\\x7F]+$"), # same as CODE128 "GS1-128": ([(2, 255)], r"^\{[A-C][\x00-\x7F]+$"), # same as CODE128
"GS1 DATABAR OMNIDIRECTIONAL": ([(13, 13)], "^[0-9]{13}$"), "GS1 DATABAR OMNIDIRECTIONAL": ([(13, 13)], r"^[0-9]{13}$"),
"GS1 DATABAR TRUNCATED": ([(13, 13)], "^[0-9]{13}$"), # same as GS1 omnidirectional "GS1 DATABAR TRUNCATED": (
"GS1 DATABAR LIMITED": ([(13, 13)], "^[01][0-9]{12}$"), [(13, 13)],
r"^[0-9]{13}$",
), # same as GS1 omnidirectional
"GS1 DATABAR LIMITED": ([(13, 13)], r"^[01][0-9]{12}$"),
"GS1 DATABAR EXPANDED": ( "GS1 DATABAR EXPANDED": (
[(2, 255)], [(2, 255)],
"^\([0-9][A-Za-z0-9 \!\"\%\&'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\_\{]+$", r"^\([0-9][A-Za-z0-9 \!\"\%\&'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\_\{]+$",
), ),
} }