René's URL Explorer Experiment


Title: Pin Python 3.9.16 on Cygwin CI by EliahKagan · Pull Request #1814 · gitpython-developers/GitPython · GitHub

Open Graph Title: Pin Python 3.9.16 on Cygwin CI by EliahKagan · Pull Request #1814 · gitpython-developers/GitPython

X Title: Pin Python 3.9.16 on Cygwin CI by EliahKagan · Pull Request #1814 · gitpython-developers/GitPython

Description: The bug The latest currently packaged version of Python 3.9 for Cygwin is 3.9.18 (provided by the Cygwin package python39 at version 3.9.18-1). That version, at least as we are using it, has a problem where pip stalls indefinitely on some PyPI package downloads. This is the problem encountered around the time #1813 was reviewed and merged, and discussed in comments there, but it was not triggered by that or any other change in GitPython. Details In #1813 (comment) I said I couldn't produce it locally, but since then I have been able to do so. I believe the reason I couldn't produce it locally at that time was that I had not cleared cached pip downloads in ~/.cache. I am unsure of the exact condition under which the problem occurs, but it is possibly when a single run of pip must download two packages; the first downloads, and the second stalls forever. I have in some places, including some commit messages, described this as "blocking," but that was a guess, and a wrong one. When produced locally, the Cygwin python3.9 process uses a full CPU core until terminated (so it is "spinning" rather than "blocking"). I'm willing to rebase commits on request to correct that, but I lean toward not doing so for reasons of efficiency, in part because CI will run again on them. In Cygwin with the kill command, SIGTERM does not terminate it; SIGKILL does not seem to either, or at least not reliably. Right-clicking on the process in the "Details" tab of the Task Manager always terminates it immediately. Once terminated, pip can be attempted again, and it will succeed in downloading what it had just failed to download, but then fail on the next download if there is another one (which there usually is). This happens whether or not I upgrade the PyPA packages (pip, setuptools, and wheel). It sometimes happens for wheel when I do, which is how a number of the CI runs have failed. When it doesn't, that pip run succeeds. Whether or not PyPA packages were upgraded, the subsequent run of pip install -e ".[test]", which installs many more packages, always encounters the problem. More specifically, it used to happen with the coverage package, but a few hours ago started usually happening with pytest instead, which I believe is just due to a different order in which packages are downloaded, triggered by the very recent release of pytest 8. If pip is terminated and rerun, it will happen on every second package, as far as I have observed. This happens with multiple versions of the python39-pip Cygwin package, as well as with multiple versions of the PyPI pip package if requested explicitly. Therefore, while the problem happens when pip runs, I don't believe it is due to a bug in pip or even a bug in Cygwin's python39-pip package. It also does not seem to be affected by whether pip is run with pip or python3.9 -m pip, nor by whether or not pip is used in a virtual environment. It happens with multiple versions of the cygwin Cygwin package which provides cygwin1.dll. It can happen when attempting to download a source package or a wheel. It only happens on Cygwin, not native Windows or other platforms. Examining the CI logs for commits from before and after the problem began reveals that the problem did not occur when the python39 Cygwin package was at version 3.9.16-1, and always occurred once it was at version 3.9.18-1. For example, 9b7e15f used 3.9.16-1 while 987dbf4 used 3.8.18-1. Specific versions were not requested, so typically the latest stable versions of Cygwin packages are installed, and it was on 26 January that python39 version 3.9.18-1 was promoted to stable. This does not occur with Python 3.8. The workaround Pinning 3.9.16-1 This pull request downgrades Python on Cygwin to the latest available patch version of 3.9 packaged for Cygwin of those that strictly precede 3.9.18 where the problem occurs. That version is 3.9.16, provided by the Cygwin package python39 at version 3.9.16-1. This version may eventually no longer be available for download from Cygwin's repositories, so hopefully a real solution or better workaround will be found by then, or perhaps a future update to the package itself will fix the problem. Because 3.8 works, an existing backup workaround is to downgrade even further to 3.8. Switching actions to facilitate pinning Although GitHub code search finds repositories where the official cygwin/install-cygwin-action GitHub Action was used, or an attempt made to use it, with the package=version syntax for specifying Cygwin packages to be installed, that does not appear working. It doesn't report an error when I attempt it, but the version number seems always to be ignored. So in order to pin python39 at 3.9.16-1, I also switched to using egor-tensin/setup-cygwin. The dependency graph feature in GitHub reports them as being about equally popular (official, unofficial). However, I removed add-to-path: false; it seems egor-tensin/setup-cygwin doesn't have such a feature. So it may be worthwhile to switch back once we can, to use that again. The main benefit of add-to-path: false is clarity about the environment from which we are using Cygwin facilities, but it can also help with cleanup/finalization performed by actions that that are run before Cygwin is installed: actions/checkout issues a warning and seems like it may not be cleaning up fully, due to attempting to use the Cygwin git for cleanup. I think it is okay for now because the GitHub hosted runners are virtual machines that get deleted and recreated each time; only self-hosted runners are (potentially) reused. But if we have to keep using it for a long time then that should be fixed. Other things I tried I tried a bunch of other things while investigating this, as well as trying a few variations on the downgrades (corresponding to some of the things I said made no difference above). If each of my original commits were its own commit in this pull request, the pull request would have more than 40 commits. Although this may not be inherently excessive, it seems to me that it was better to squash them down into two commits, represented the two actually useful workarounds I found (downgrading to 3.8, and downgrading only to 3.9.16) done in what seemed like the best of the ways I tried. However, for future investigation, I preserved the full history by using GitHub itself to perform the squashes, from two fork-internal PRs, EliahKagan#2 and EliahKagan#3, which are linked and explained in the two commits. (I had to amend the second after squashing to fix a mistake in its title, which is why its hash differs from the hash the PR shows as merged.) The individual original commits can be examined in those PRs, though I don't believe it is at all necessary to look at that to review this PR (if I did, I wouldn't have squashed them). Note that some of those individual commits might be misleading individually because the changes did not always achieve what the messages described; in particular, attempts to pin packages before switching from cygwin/cygwin-install-action to egor-tensin/setup-cygwin did not actually do any pinning.

Open Graph Description: The bug The latest currently packaged version of Python 3.9 for Cygwin is 3.9.18 (provided by the Cygwin package python39 at version 3.9.18-1). That version, at least as we are using it, has a prob...

X Description: The bug The latest currently packaged version of Python 3.9 for Cygwin is 3.9.18 (provided by the Cygwin package python39 at version 3.9.18-1). That version, at least as we are using it, has a prob...

Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1814

X: @github

direct link

Domain: redirect.github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2ee1db7c-8cf6-161a-961e-bc936dc0a7d5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC0F4:1301FE:4EFDD1:6A5C9F:69696FB4
html-safe-noncec1c38202a965251c04d8e03bf4a4928ec5e9b378d1e1268a267dcba49e934b4c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEY0OjEzMDFGRTo0RUZERDE6NkE1QzlGOjY5Njk2RkI0IiwidmlzaXRvcl9pZCI6IjQ1NTYwMjIxNzg4ODc4NTYwNTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2867a8518c917d2f82cfa8fce3474483a40a73fa237d843bfe95f75f3b47293d
hovercard-subject-tagpull_request:1698670595
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/1814/files
twitter:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
og:image:altThe bug The latest currently packaged version of Python 3.9 for Cygwin is 3.9.18 (provided by the Cygwin package python39 at version 3.9.18-1). That version, at least as we are using it, has a prob...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonec6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files#start-of-content
https://redirect.github.com/
Sign in https://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1814%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1814%2Ffiles
Sign up https://redirect.github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
Reloadhttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
Reloadhttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
gitpython-developers https://redirect.github.com/gitpython-developers
GitPythonhttps://redirect.github.com/gitpython-developers/GitPython
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
Notifications https://redirect.github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 964 https://redirect.github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5k https://redirect.github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://redirect.github.com/gitpython-developers/GitPython
Issues 169 https://redirect.github.com/gitpython-developers/GitPython/issues
Pull requests 8 https://redirect.github.com/gitpython-developers/GitPython/pulls
Discussions https://redirect.github.com/gitpython-developers/GitPython/discussions
Actions https://redirect.github.com/gitpython-developers/GitPython/actions
Security Uh oh! There was an error while loading. Please reload this page. https://redirect.github.com/gitpython-developers/GitPython/security
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
Insights https://redirect.github.com/gitpython-developers/GitPython/pulse
Code https://redirect.github.com/gitpython-developers/GitPython
Issues https://redirect.github.com/gitpython-developers/GitPython/issues
Pull requests https://redirect.github.com/gitpython-developers/GitPython/pulls
Discussions https://redirect.github.com/gitpython-developers/GitPython/discussions
Actions https://redirect.github.com/gitpython-developers/GitPython/actions
Security https://redirect.github.com/gitpython-developers/GitPython/security
Insights https://redirect.github.com/gitpython-developers/GitPython/pulse
Sign up for GitHub https://redirect.github.com/signup?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://redirect.github.com/login?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
Byronhttps://redirect.github.com/Byron
gitpython-developers:mainhttps://redirect.github.com/gitpython-developers/GitPython/tree/main
EliahKagan:cygwin-pythonhttps://redirect.github.com/EliahKagan/GitPython/tree/cygwin-python
Conversation 9 https://redirect.github.com/gitpython-developers/GitPython/pull/1814
Commits 2 https://redirect.github.com/gitpython-developers/GitPython/pull/1814/commits
Checks 0 https://redirect.github.com/gitpython-developers/GitPython/pull/1814/checks
Files changed https://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
Pin Python 3.9.16 on Cygwin CI https://redirect.github.com/gitpython-developers/GitPython/pull/1814/files#top
Show all changes 2 commits https://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
73ebcfa Use Python 3.8 on Cygwin CI EliahKagan Jan 28, 2024 https://redirect.github.com/gitpython-developers/GitPython/pull/1814/commits/73ebcfa54d923503d88078118c5b479c45920205
8dc4cb0 Use Python 3.9.16 on Cygwin CI EliahKagan Jan 28, 2024 https://redirect.github.com/gitpython-developers/GitPython/pull/1814/commits/8dc4cb02b5b9d01bd720dc46a9a847bdb906eae0
Clear filters https://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files
.github/workflows/cygwin-test.ymlhttps://redirect.github.com/gitpython-developers/GitPython/pull/1814/files#diff-cf2326c301e0abbc3891bf5c0f476cf05faa2c2ddf165185fe6bffb10bd5aea5
View file https://redirect.github.com/EliahKagan/GitPython/blob/8dc4cb02b5b9d01bd720dc46a9a847bdb906eae0/.github/workflows/cygwin-test.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/gitpython-developers/GitPython/pull/1814/{{ revealButtonHref }}
https://redirect.github.com/gitpython-developers/GitPython/pull/1814/files#diff-cf2326c301e0abbc3891bf5c0f476cf05faa2c2ddf165185fe6bffb10bd5aea5
https://redirect.github.com/gitpython-developers/GitPython/pull/1814/files#diff-cf2326c301e0abbc3891bf5c0f476cf05faa2c2ddf165185fe6bffb10bd5aea5
https://redirect.github.com/gitpython-developers/GitPython/pull/1814/files#diff-cf2326c301e0abbc3891bf5c0f476cf05faa2c2ddf165185fe6bffb10bd5aea5
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.