You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sapling getdeps cli build and test support for python 3.12 (#964)
Summary:
Ubuntu 24.04 and Fedora 40 are both python 3.12 based. Update sapling's OSS getdeps build to allow build/run/test on python 3.12 while keeping 3.10 support.
* distutils is deprecated in python 3.12 stdlib, but fortunately setuptools is pretty similar and includes a vendored distutils, so:
* added a manifest so we get python3-setuptools installed.
* setup.py: removed deprecated usage like `find_executable` in favor of `shutil.which()`, also removed some super old xcode 4/5.1 detection I found
* util.py makedate(): datetime.utcfromtimestamp is deprecated in 3.12, so updated to use non-deprecated methods. Tested with test-command-template.t which shows tz offset.
* Makefile: disabled test-eager-exchange.t on 3.12 where updating the expectation to run on 3.12 and 3.10 is tricky (debug output differs)
* tests modified to run on 3.12 and 3.10:
* test-import-eol.t: updated for invalid escape sequence warnings
* test-install.t: updated to filter out message that appears in different order on 3.12 vs earlier versions
* test-merge-driver2.t: match different debug output in 3.12, remove check for mercurial package
* test-sign-commit.t: updated to add --yes for newer gpg that python 3.12 using distros have
* found some tests needed bunzip2, so update manifest for sapling and bz2 to install it
Pull Request resolved: #964
X-link: facebook/openzl#1005
Test Plan:
sync the code somewhere visible to toolbox:
enter ubuntu 24.04 toolbox:
`toolbox enter ubuntu-toolbox-24.04 `
make sure system packages are installed
`./build/fbcode_builder/getdeps.py install-system-deps --recursive sapling`
build sapling getdeps
`./build/fbcode_builder/getdeps.py build --allow-system-packages --no-facebook-internal --src-dir=. sapling --project-install-prefix sapling:/`
run the tests locally to validate python 3.12 operation:
```
./build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. sapling --num-jobs=64 --project-install-prefix sapling:/
---------------------------------------------------------------------
Skipped 2 tests (missing feature: Mononoke server available):
test-fb-ext-remotefilelog-log.t
test-fb-ext-remotefilelog-worker.t
Skipped 3 tests (missing feature: running tests with fsmonitor):
test-fsmonitor-filemerge.t
test-fsmonitor-nonutf8-path.t
test-rust-hgevents.t
Skipped 48 tests (skipped):
test-atexit-epipe.t
test-casefolding.t
test-check-clang-format.t
test-check-code.t
test-check-fix-code.t
test-check-help.t
test-checkserverbookmark.t
test-chg.t
test-commitcloud-sync-omission.t
test-committer-date.t
test-debugbacktrace.t
test-debugshell-namespace.t
test-eden-clone.t
test-eden-commands.t
test-eden-du.t
test-eden-glob.t
test-eden-sparse.t
test-eden-watchman-edenapi-glob.t
test-eden-watchman-noedenapi-glob.t
test-fb-ext-fbconduit.t
test-fb-ext-scm-prompt-compat.t
test-fb-ext-scm-prompt-git.t
test-fb-ext-tweakdefaults-grep.t
test-fsmonitor-casefolding.t
test-fsmonitor-fallback.t
test-fsmonitor-metadata.t
test-fsmonitor-refreshclock.t
test-fsmonitor-status.t
test-fsmonitor-warn-fresh.t
test-histedit-reorder.t
test-matcher-expand-globs.t
test-mutation-infinitepush.t
test-non-working-symlink.t
test-progress-rust-renderer.t
test-progressfile.t
test-purge-fsmonitor.t
test-remotenames-journal.t
test-runlog.t
test-rust-status-in-transaction.t
test-sparse-track-ignored.t
test-status-case-insensitive.t
test-status-fresh-instance.t
test-status-root-ignored-py.t
test-status-watchman.t
test-symlink-migration.t
test-tracing-under-chg.t
test-treestate-fresh-instance.t
test-treestate-trackignore.t
# Ran 727 tests, 53 skipped, 0 failed.
passed on try 0
```
generate github actions CI to pick up python3-setuptools
```
./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --free-up-disk --os-type=linux --src-dir=. --output-dir=.github/workflows --job-name "Sapling CLI Getdeps " --job-file-prefix=sapling-cli-getdeps_ sapling --num-jobs=16 --project-install-prefix sapling:/
```
github CI
Reviewed By: quark-zju, singhsrb
Differential Revision: D63958742
Pulled By: ahornby
fbshipit-source-id: 460c42eb1315f2e1631c74d356e4976469104c1b
0 commit comments