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

Fix CI job to include tomli in zipapp #1194

Merged
merged 2 commits into from Jan 6, 2024

Conversation

sgryjp
Copy link
Contributor

@sgryjp sgryjp commented Jan 6, 2024

  • I have added an entry to docs/changelog.md

Summary of changes

This PR changes the CI job for creating zipapp file (pipx.pyz) to use Python 3.8. Doing so makes shiv include tomli and the zipapp can be executed with Python 3.10 or earlier.

This should closes #1142.

Test plan

Tested by running python pipx.pyz reinstall black and then confirm the installed black works by running black --version, for Python 3.8 through 3.12:

mac:~% for VER in 3.8 3.9 3.10 3.11 3.12; do python$VER pipx.pyz reinstall black; black --version; done
uninstalled black! ✨ 🌟 ✨
  installed package black 23.12.1, installed using Python 3.8.18
  These apps are now globally available
    - black
    - blackd
done! ✨ 🌟 ✨
black, 23.12.1 (compiled: yes)
Python (CPython) 3.8.18
uninstalled black! ✨ 🌟 ✨
  installed package black 23.12.1, installed using Python 3.9.18
  These apps are now globally available
    - black
    - blackd
done! ✨ 🌟 ✨
black, 23.12.1 (compiled: yes)
Python (CPython) 3.9.18
uninstalled black! ✨ 🌟 ✨
  installed package black 23.12.1, installed using Python 3.10.13
  These apps are now globally available
    - black
    - blackd
done! ✨ 🌟 ✨
black, 23.12.1 (compiled: yes)
Python (CPython) 3.10.13
uninstalled black! ✨ 🌟 ✨
  installed package black 23.12.1, installed using Python 3.11.6
  These apps are now globally available
    - black
    - blackd
done! ✨ 🌟 ✨
black, 23.12.1 (compiled: yes)
Python (CPython) 3.11.6
uninstalled black! ✨ 🌟 ✨
  installed package black 23.12.1, installed using Python 3.12.1
  These apps are now globally available
    - black
    - blackd
done! ✨ 🌟 ✨
black, 23.12.1 (compiled: yes)
Python (CPython) 3.12.1

@dukecat0 dukecat0 enabled auto-merge (squash) January 6, 2024 06:43
@dukecat0 dukecat0 disabled auto-merge January 6, 2024 06:43
Copy link
Member

@dukecat0 dukecat0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dukecat0 dukecat0 enabled auto-merge (squash) January 6, 2024 06:45
@dukecat0 dukecat0 merged commit 98c803f into pypa:main Jan 6, 2024
14 checks passed
@sgryjp sgryjp deleted the fix/include-tomli-in-zipapp branch January 6, 2024 07:17
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.

Executing zipapp with Python 3.10 or earlier fails on importing 'tomli'
2 participants