Skip to content

Commit

Permalink
Fixes for new dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Jun 24, 2024
1 parent b7f699a commit b510f2e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ jobs:
if: matrix.python.architecture
# See https://github.com/pandas-dev/pandas/issues/54979
run: |
(Get-Content .\requirements\coverage.txt) -replace 'numpy==[0-9.]+', 'numpy==1.26.4' | Out-File .\requirements\coverage.txt
(Get-Content .\requirements\coverage.txt) -replace 'pandas==[0-9.]+', 'pandas==2.0.3' | Out-File .\requirements\coverage.txt
(Get-Content .\requirements\coverage.txt) -replace 'pyarrow==[0-9.]+', '# omitted' | Out-File .\requirements\coverage.txt
- name: Install dependencies
Expand Down Expand Up @@ -235,7 +236,7 @@ jobs:
actions-cache-folder: emsdk-cache
- name: Build
run: |
pip install "pydantic<2" pyodide-build==$PYODIDE_VERSION
pip install pyodide-build==$PYODIDE_VERSION
cd hypothesis-python/
CFLAGS=-g2 LDFLAGS=-g2 pyodide build
- name: Set up Pyodide venv and install dependencies
Expand Down
5 changes: 3 additions & 2 deletions hypothesis-python/tests/pandas/test_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
def test_gets_right_dtype_for_empty_indices(ix):
is_32bit = sys.maxsize == 2**31 - 1
pandas2 = pandas.__version__.startswith("2.")
numpy1 = np.__version__.startswith("1.")
windows = sys.platform == "win32" # including 64-bit windows, confusingly
if pandas2 and (is_32bit or windows):
# No, I don't know what this is int32 on 64-bit windows, but here we are.
if pandas2 and (is_32bit or (windows and numpy1)):
# No, I don't know what this is int32 on 64-bit windows until Numpy 2.0
assert ix.dtype == np.dtype("int32")
else:
assert ix.dtype == np.dtype("int64")
Expand Down
2 changes: 1 addition & 1 deletion tooling/src/hypothesistooling/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def run_tox(task, version, *args):
"3.10": "3.10.14",
"3.11": "3.11.9",
"3.12": "3.12.3",
"3.13": "3.13.0b1",
"3.13": "3.13.0b2",
"3.14": "3.14-dev",
"pypy3.8": "pypy3.8-7.3.11",
"pypy3.9": "pypy3.9-7.3.16",
Expand Down
9 changes: 8 additions & 1 deletion whole_repo_tests/revealed_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.

try:
from numpy import __version__ as np_version
except ImportError:
NP1 = False
else:
NP1 = np_version.startswith("1.")

REVEALED_TYPES = [
("integers()", "int"),
("text()", "str"),
Expand Down Expand Up @@ -37,7 +44,7 @@
),
(
"boolean_dtypes()",
"dtype[bool_]",
"dtype[bool_]" if NP1 else "dtype[bool]",
),
(
"unsigned_integer_dtypes(sizes=8)",
Expand Down

0 comments on commit b510f2e

Please sign in to comment.