Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: use latest Python 3.10 instead of 3.10.0 #1228

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

messense
Copy link
Member

No description provided.

@netlify
Copy link

netlify bot commented Oct 30, 2022

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit c40717e
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/635f3c1ae58e5900088e7463
😎 Deploy Preview https://deploy-preview-1228--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@messense
Copy link
Member Author

"/LIBPATH:C:\hostedtoolcache\windows\Python\3.10.0\x64\libs"

Odd, it installed 3.10.8 but the LIBPATH refers to 3.10.0.

@messense messense force-pushed the py310-debug branch 4 times, most recently from 765df34 to e464a35 Compare October 30, 2022 10:58
@messense
Copy link
Member Author

 --- stdout
  cargo:rerun-if-env-changed=PYO3_CROSS
  cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
  cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
  cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
  cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG

  -- PYO3_PRINT_CONFIG=1 is set, printing configuration and halting compile --
  implementation=CPython
  version=3.10
  shared=true
  abi3=false
  lib_name=python310
  lib_dir=C:\hostedtoolcache\windows\Python\3.10.0\x64\libs
  executable=D:\a\maturin\maturin\test-crates\venvs\develop-pyo3-mixed-py-subdir-cpython\Scripts\python.exe
  pointer_width=64
  build_flags=
  suppress_build_script_link_lines=false
$ test-crates\venvs\develop-pyo3-mixed-py-subdir-cpython\Scripts\python.exe --version
3.10.8

I don't understand...

@messense messense force-pushed the py310-debug branch 3 times, most recently from f31b496 to ea6e3e7 Compare October 30, 2022 11:37
@messense
Copy link
Member Author

Update to pyo3 main branch seems to have fixed the issue, is there any change related I didn't know?

@davidhewitt
Copy link
Member

Looks probably related to #1214?

@davidhewitt
Copy link
Member

Update to pyo3 main branch seems to have fixed the issue, is there any change related I didn't know?

I... don't think so. Do you think there's a way to repro locally? I can try to help debug this.

@messense
Copy link
Member Author

Yes, I want to isolate the problem first, the current CI setup doesn't really test all supported Python versions, I hope to expand it in #1214

I... don't think so. Do you think there's a way to repro locally? I can try to help debug this.

No, it's Windows x64 I don't have a working environment. I suspect it might related to build cache, 6cdee75 also passes cargo nextest run.

@davidhewitt
Copy link
Member

I have a Windows x64 machine that I can run some stuff on later in the week if you have a recommendation of what I'll need to run? 😄

@messense
Copy link
Member Author

messense commented Oct 30, 2022

if you have a recommendation of what I'll need to run?

Unfortunately I don't have a recommendation at the moment. Without ssh like remote login support, debugging Windows build on GitHub Actions is quite painful 😓. Actually looks like action-tmate supports Windows.

@davidhewitt
Copy link
Member

Hmm ok. If I get some time mid-week I can try to run this on my windows machine, no guarantee!

@messense
Copy link
Member Author

I think it's related to #1219 (comment) as well

runneradmin@fv-az319-905 MINGW64 /d/a/maturin/maturin/test-crates/targets/develop-pyo3-mixed-py-subdir/debug/build
# cat pyo3-build-config-c0fb8d48463d7859/out/pyo3-build-config.txt
implementation=CPython
version=3.10
shared=true
abi3=false
lib_name=python310
lib_dir=C:\hostedtoolcache\windows\Python\3.10.0\x64\libs
executable=D:\a\maturin\maturin\test-crates\venvs\develop-pyo3-mixed-py-subdir-cpython\Scripts\python.exe
pointer_width=64
build_flags=
suppress_build_script_link_lines=false

The 3.10.0 is definitely coming from this cached pyo3-build-config.txt file thus removing build cache makes it work.

@messense
Copy link
Member Author

@davidhewitt I think the repro steps are:

  • Create an venv with older Python version say 3.10.0 (or 3.9.x) then run maturin develop with a non-abi3 extension module
  • Recreate the venv at the same path with a newer Python version say 3.10.8, run maturin develop again to trigger the build error

@messense
Copy link
Member Author

For now we can workaround the issue by deleting the problematic caches.

@messense messense merged commit 7d96cc1 into PyO3:main Oct 31, 2022
@messense messense deleted the py310-debug branch October 31, 2022 03:29
@messense
Copy link
Member Author

messense commented Nov 8, 2022

@davidhewitt I think the repro steps are:

  • Create an venv with older Python version say 3.10.0 (or 3.9.x) then run maturin develop with a non-abi3 extension module
  • Recreate the venv at the same path with a newer Python version say 3.10.8, run maturin develop again to trigger the build error

I have a repro for Linux in PyO3/pyo3#2724

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants