Skip to content

Commit

Permalink
Respond to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed Nov 6, 2024
1 parent c9d7bfa commit 1c51917
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
- { machine: 'ubuntu-20.04', python: '3.13t', java: '8', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' }
- { machine: 'windows-2022', python: '3.13t', java: '8', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' }
- { machine: 'macos-13', python: '3.13t', java: '8', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' }
- { machine: 'macos-latest', python: '3.13t', java: '11', arch: 'arm64', cmd: '.github/env/macOS/bdist-wheel.sh' }
- { machine: 'macos-14', python: '3.13t', java: '11', arch: 'arm64', cmd: '.github/env/macOS/bdist-wheel.sh' }

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
source .venv/bin/activate
uv pip install pip
echo $JAVA_HOME
echo PATH=$PATH >> $GITHUB_ENV
echo PATH=$PATH >> $GITHUB_PATH
- run: pip install "setuptools < 72"

Expand Down
7 changes: 2 additions & 5 deletions jpyutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,8 @@ def _find_python_dll_file(fail=False):
# Prepare list of possible library file names

# account for Python debug builds
try:
sys.gettotalrefcount()
debug_build = True
except AttributeError:
debug_build = False

debug_build = sysconfig.get_config_var('Py_DEBUG')

# account for Python 3.13+ with GIL disabled
dll_suffix = ''
Expand Down
4 changes: 2 additions & 2 deletions src/main/c/jni/org_jpy_PyLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ void dumpDict(const char* dictName, PyObject* dict)

size = PyDict_Size(dict);
printf(">> dumpDict: %s.size = %ld\n", dictName, size);
#ifdef Py_GIL_DISABLED
#if PY_VERSION_HEX >= 0x030D0000 // >=3.13
// PyDict_Next is not thread-safe, so we need to protect it with a critical section
// https://docs.python.org/3/howto/free-threading-extensions.html#pydict-next
Py_BEGIN_CRITICAL_SECTION(dict);
Expand All @@ -510,7 +510,7 @@ void dumpDict(const char* dictName, PyObject* dict)
printf(">> dumpDict: %s[%ld].name = '%s'\n", dictName, i, name);
i++;
}
#ifdef Py_GIL_DISABLED
#if PY_VERSION_HEX >= 0x030D0000 // >=3.13
Py_END_CRITICAL_SECTION();
#endif
}
Expand Down

0 comments on commit 1c51917

Please sign in to comment.