Skip to content

Commit

Permalink
Merge branch 'main' into complete-307-changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored May 28, 2024
2 parents 19ecac2 + 4f9f958 commit 2a7ce8e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'

Expand Down
30 changes: 20 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ jobs:
architecture: ['x64', 'x86']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
cache: pip
cache-dependency-path: .github/workflows/main.yml

- name: Setup environment
run: |
Expand Down Expand Up @@ -67,13 +69,15 @@ jobs:
python-version: ['3.10', '3.11', '3.12-dev']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
cache: pip
cache-dependency-path: .github/workflows/main.yml

- name: Setup Environment
run: |
Expand All @@ -99,11 +103,13 @@ jobs:
checkers:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# This job only needs to target the oldest supported version (black@stable supports Python >=3.8)
python-version: '3.8'
cache: pip
cache-dependency-path: .github/workflows/main.yml
- run: pip install pycln
- run: pycln . --config=pycln.toml --check
- uses: chartboost/ruff-action@v1
Expand All @@ -121,10 +127,12 @@ jobs:
# mypy 1.5 dropped support for Python 3.7
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: .github/workflows/main.yml
- run: pip install types-regex types-setuptools mypy==1.9
- run: mypy . --python-version=${{ matrix.python-version }}

Expand All @@ -135,10 +143,12 @@ jobs:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: .github/workflows/main.yml
# pyright vendors typeshed, but let's make sure we have the most up to date stubs
- run: pip install types-regex types-setuptools
- uses: jakebailey/pyright-action@v2
Expand Down
6 changes: 3 additions & 3 deletions adodbapi/test/dbapi20.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,12 @@ def _paraminsert(self, cur):
self.assertEqual(
beers[0],
"Cooper's",
"cursor.fetchall retrieved incorrect data, or data inserted " "incorrectly",
"cursor.fetchall retrieved incorrect data, or data inserted incorrectly",
)
self.assertEqual(
beers[1],
"Victoria Bitter",
"cursor.fetchall retrieved incorrect data, or data inserted " "incorrectly",
"cursor.fetchall retrieved incorrect data, or data inserted incorrectly",
)
trouble = "thi%s :may ca%(u)se? troub:1e"
self.assertEqual(
Expand Down Expand Up @@ -541,7 +541,7 @@ def test_fetchone(self):
self.assertEqual(
cur.fetchone(),
None,
"cursor.fetchone should return None if a query retrieves " "no rows",
"cursor.fetchone should return None if a query retrieves no rows",
)
self.assertTrue(cur.rowcount in (-1, 0))

Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,16 @@ def build_extensions(self):
redist_globs = [vcbase + r"redist\%s\*MFC\mfc140u.dll" % self.plat_dir]
m = re.search(r"\\VC\\Tools\\", vcbase)
if m:
# typical path on newer Visual Studios - ensure corresponding version
# typical path on newer Visual Studios
# prefere corresponding version but accept different version
same_version = vcverdir is not None and os.path.isdir(
vcbase[: m.start()]
+ r"\VC\Redist\MSVC\{}{}".format(vcverdir, self.plat_dir)
)
redist_globs.append(
vcbase[: m.start()]
+ r"\VC\Redist\MSVC\{}{}\*\mfc140u.dll".format(
vcverdir or "*\\", self.plat_dir
vcverdir if same_version else "*\\", self.plat_dir
)
)
# Only mfcNNNu DLL is required (mfcmNNNX is Windows Forms, rest is ANSI)
Expand Down

0 comments on commit 2a7ce8e

Please sign in to comment.