Read about our upcoming Code of Conduct on this issue

Commit bbdccf08 authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

branching: merge default into stable

This mark the start of the 5.9 freeze.

--HG--
branch : stable
Pipeline #25032 failed with stages
in 72 minutes and 40 seconds
......@@ -925,10 +925,15 @@ def ensure_linux_dev_ami(c: AWSConnection, distro='debian10', prefix='hg-'):
requirements3_path = (
pathlib.Path(__file__).parent.parent / 'linux-requirements-py3.txt'
)
requirements35_path = (
pathlib.Path(__file__).parent.parent / 'linux-requirements-py3.5.txt'
)
with requirements2_path.open('r', encoding='utf-8') as fh:
requirements2 = fh.read()
with requirements3_path.open('r', encoding='utf-8') as fh:
requirements3 = fh.read()
with requirements35_path.open('r', encoding='utf-8') as fh:
requirements35 = fh.read()
# Compute a deterministic fingerprint to determine whether image needs to
# be regenerated.
......@@ -938,6 +943,7 @@ def ensure_linux_dev_ami(c: AWSConnection, distro='debian10', prefix='hg-'):
'bootstrap_script': BOOTSTRAP_DEBIAN,
'requirements_py2': requirements2,
'requirements_py3': requirements3,
'requirements_py35': requirements35,
}
)
......@@ -979,6 +985,10 @@ def ensure_linux_dev_ami(c: AWSConnection, distro='debian10', prefix='hg-'):
fh.write(requirements3)
fh.chmod(0o0700)
with sftp.open('%s/requirements-py3.5.txt' % home, 'wb') as fh:
fh.write(requirements35)
fh.chmod(0o0700)
print('executing bootstrap')
chan, stdin, stdout = ssh_exec_command(
client, '%s/bootstrap' % home
......
......@@ -26,11 +26,11 @@ DISTROS = {
INSTALL_PYTHONS = r'''
PYENV2_VERSIONS="2.7.17 pypy2.7-7.2.0"
PYENV3_VERSIONS="3.5.10 3.6.12 3.7.9 3.8.6 3.9.0 pypy3.5-7.0.0 pypy3.6-7.3.0"
PYENV3_VERSIONS="3.5.10 3.6.13 3.7.10 3.8.10 3.9.5 pypy3.5-7.0.0 pypy3.6-7.3.3 pypy3.7-7.3.3"
git clone https://github.com/pyenv/pyenv.git /hgdev/pyenv
pushd /hgdev/pyenv
git checkout 8ac91b4fd678a8c04356f5ec85cfcd565c265e9a
git checkout 328fd42c3a2fbf14ae46dae2021a087fe27ba7e2
popd
export PYENV_ROOT="/hgdev/pyenv"
......@@ -56,7 +56,20 @@ done
for v in ${PYENV3_VERSIONS}; do
pyenv install -v ${v}
${PYENV_ROOT}/versions/${v}/bin/python get-pip.py
${PYENV_ROOT}/versions/${v}/bin/pip install -r /hgdev/requirements-py3.txt
case ${v} in
3.5.*)
REQUIREMENTS=requirements-py3.5.txt
;;
pypy3.5*)
REQUIREMENTS=requirements-py3.5.txt
;;
*)
REQUIREMENTS=requirements-py3.txt
;;
esac
${PYENV_ROOT}/versions/${v}/bin/pip install -r /hgdev/${REQUIREMENTS}
done
pyenv global ${PYENV2_VERSIONS} ${PYENV3_VERSIONS} system
......@@ -64,6 +77,18 @@ pyenv global ${PYENV2_VERSIONS} ${PYENV3_VERSIONS} system
'\r\n', '\n'
)
INSTALL_PYOXIDIZER = r'''
PYOXIDIZER_VERSION=0.16.0
PYOXIDIZER_SHA256=8875471c270312fbb934007fd30f65f1904cc0f5da6188d61c90ed2129b9f9c1
PYOXIDIZER_URL=https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F${PYOXIDIZER_VERSION}/pyoxidizer-${PYOXIDIZER_VERSION}-linux_x86_64.zip
wget -O pyoxidizer.zip --progress dot:mega ${PYOXIDIZER_URL}
echo "${PYOXIDIZER_SHA256} pyoxidizer.zip" | sha256sum --check -
unzip pyoxidizer.zip
chmod +x pyoxidizer
sudo mv pyoxidizer /usr/local/bin/pyoxidizer
'''
INSTALL_RUST = r'''
RUSTUP_INIT_SHA256=a46fe67199b7bcbbde2dcbc23ae08db6f29883e260e23899a88b9073effc9076
......@@ -72,10 +97,8 @@ echo "${RUSTUP_INIT_SHA256} rustup-init" | sha256sum --check -
chmod +x rustup-init
sudo -H -u hg -g hg ./rustup-init -y
sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup install 1.31.1 1.46.0
sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup install 1.41.1 1.52.0
sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup component add clippy
sudo -H -u hg -g hg /home/hg/.cargo/bin/cargo install --version 0.10.3 pyoxidizer
'''
......@@ -306,9 +329,9 @@ sudo mkdir /hgdev
sudo chown `whoami` /hgdev
{install_rust}
{install_pyoxidizer}
cp requirements-py2.txt /hgdev/requirements-py2.txt
cp requirements-py3.txt /hgdev/requirements-py3.txt
cp requirements-*.txt /hgdev/
# Disable the pip version check because it uses the network and can
# be annoying.
......@@ -332,6 +355,7 @@ sudo chown -R hg:hg /hgdev
'''.lstrip()
.format(
install_rust=INSTALL_RUST,
install_pyoxidizer=INSTALL_PYOXIDIZER,
install_pythons=INSTALL_PYTHONS,
bootstrap_virtualenv=BOOTSTRAP_VIRTUALENV,
)
......
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --generate-hashes --output-file=contrib/automation/linux-requirements-py3.5.txt contrib/automation/linux-requirements.txt.in
#
astroid==2.4.2 \
--hash=sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703 \
--hash=sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386
# via pylint
docutils==0.17.1 \
--hash=sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125 \
--hash=sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61
# via -r contrib/automation/linux-requirements.txt.in
fuzzywuzzy==0.18.0 \
--hash=sha256:45016e92264780e58972dca1b3d939ac864b78437422beecebb3095f8efd00e8 \
--hash=sha256:928244b28db720d1e0ee7587acf660ea49d7e4c632569cad4f1cd7e68a5f0993
# via -r contrib/automation/linux-requirements.txt.in
idna==3.1 \
--hash=sha256:5205d03e7bcbb919cc9c19885f9920d622ca52448306f2377daede5cf3faac16 \
--hash=sha256:c5b02147e01ea9920e6b0a3f1f7bb833612d507592c837a6c49552768f4054e1
# via yarl
isort==4.3.21 \
--hash=sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1 \
--hash=sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd
# via
# -r contrib/automation/linux-requirements.txt.in
# pylint
lazy-object-proxy==1.4.3 \
--hash=sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d \
--hash=sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449 \
--hash=sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08 \
--hash=sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a \
--hash=sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50 \
--hash=sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd \
--hash=sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239 \
--hash=sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb \
--hash=sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea \
--hash=sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e \
--hash=sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156 \
--hash=sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142 \
--hash=sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442 \
--hash=sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62 \
--hash=sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db \
--hash=sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531 \
--hash=sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383 \
--hash=sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a \
--hash=sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357 \
--hash=sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4 \
--hash=sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0
# via astroid
mccabe==0.6.1 \
--hash=sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42 \
--hash=sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f
# via pylint
multidict==5.0.2 \
--hash=sha256:060d68ae3e674c913ec41a464916f12c4d7ff17a3a9ebbf37ba7f2c681c2b33e \
--hash=sha256:06f39f0ddc308dab4e5fa282d145f90cd38d7ed75390fc83335636909a9ec191 \
--hash=sha256:17847fede1aafdb7e74e01bb34ab47a1a1ea726e8184c623c45d7e428d2d5d34 \
--hash=sha256:1cd102057b09223b919f9447c669cf2efabeefb42a42ae6233f25ffd7ee31a79 \
--hash=sha256:20cc9b2dd31761990abff7d0e63cd14dbfca4ebb52a77afc917b603473951a38 \
--hash=sha256:2576e30bbec004e863d87216bc34abe24962cc2e964613241a1c01c7681092ab \
--hash=sha256:2ab9cad4c5ef5c41e1123ed1f89f555aabefb9391d4e01fd6182de970b7267ed \
--hash=sha256:359ea00e1b53ceef282232308da9d9a3f60d645868a97f64df19485c7f9ef628 \
--hash=sha256:3e61cc244fd30bd9fdfae13bdd0c5ec65da51a86575ff1191255cae677045ffe \
--hash=sha256:43c7a87d8c31913311a1ab24b138254a0ee89142983b327a2c2eab7a7d10fea9 \
--hash=sha256:4a3f19da871befa53b48dd81ee48542f519beffa13090dc135fffc18d8fe36db \
--hash=sha256:4df708ef412fd9b59b7e6c77857e64c1f6b4c0116b751cb399384ec9a28baa66 \
--hash=sha256:59182e975b8c197d0146a003d0f0d5dc5487ce4899502061d8df585b0f51fba2 \
--hash=sha256:6128d2c0956fd60e39ec7d1c8f79426f0c915d36458df59ddd1f0cff0340305f \
--hash=sha256:6168839491a533fa75f3f5d48acbb829475e6c7d9fa5c6e245153b5f79b986a3 \
--hash=sha256:62abab8088704121297d39c8f47156cb8fab1da731f513e59ba73946b22cf3d0 \
--hash=sha256:653b2bbb0bbf282c37279dd04f429947ac92713049e1efc615f68d4e64b1dbc2 \
--hash=sha256:6566749cd78cb37cbf8e8171b5cd2cbfc03c99f0891de12255cf17a11c07b1a3 \
--hash=sha256:76cbdb22f48de64811f9ce1dd4dee09665f84f32d6a26de249a50c1e90e244e0 \
--hash=sha256:8efcf070d60fd497db771429b1c769a3783e3a0dd96c78c027e676990176adc5 \
--hash=sha256:8fa4549f341a057feec4c3139056ba73e17ed03a506469f447797a51f85081b5 \
--hash=sha256:9380b3f2b00b23a4106ba9dd022df3e6e2e84e1788acdbdd27603b621b3288df \
--hash=sha256:9ed9b280f7778ad6f71826b38a73c2fdca4077817c64bc1102fdada58e75c03c \
--hash=sha256:a7b8b5bd16376c8ac2977748bd978a200326af5145d8d0e7f799e2b355d425b6 \
--hash=sha256:af271c2540d1cd2a137bef8d95a8052230aa1cda26dd3b2c73d858d89993d518 \
--hash=sha256:b561e76c9e21402d9a446cdae13398f9942388b9bff529f32dfa46220af54d00 \
--hash=sha256:b82400ef848bbac6b9035a105ac6acaa1fb3eea0d164e35bbb21619b88e49fed \
--hash=sha256:b98af08d7bb37d3456a22f689819ea793e8d6961b9629322d7728c4039071641 \
--hash=sha256:c58e53e1c73109fdf4b759db9f2939325f510a8a5215135330fe6755921e4886 \
--hash=sha256:cbabfc12b401d074298bfda099c58dfa5348415ae2e4ec841290627cb7cb6b2e \
--hash=sha256:d4a6fb98e9e9be3f7d70fd3e852369c00a027bd5ed0f3e8ade3821bcad257408 \
--hash=sha256:d99da85d6890267292065e654a329e1d2f483a5d2485e347383800e616a8c0b1 \
--hash=sha256:e58db0e0d60029915f7fc95a8683fa815e204f2e1990f1fb46a7778d57ca8c35 \
--hash=sha256:e5bf89fe57f702a046c7ec718fe330ed50efd4bcf74722940db2eb0919cddb1c \
--hash=sha256:f612e8ef8408391a4a3366e3508bab8ef97b063b4918a317cb6e6de4415f01af \
--hash=sha256:f65a2442c113afde52fb09f9a6276bbc31da71add99dc76c3adf6083234e07c6 \
--hash=sha256:fa0503947a99a1be94f799fac89d67a5e20c333e78ddae16e8534b151cdc588a
# via yarl
pyflakes==2.3.1 \
--hash=sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3 \
--hash=sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db
# via -r contrib/automation/linux-requirements.txt.in
pygments==2.9.0 \
--hash=sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f \
--hash=sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e
# via -r contrib/automation/linux-requirements.txt.in
pylint==2.6.2 \
--hash=sha256:718b74786ea7ed07aa0c58bf572154d4679f960d26e9641cc1de204a30b87fc9 \
--hash=sha256:e71c2e9614a4f06e36498f310027942b0f4f2fde20aebb01655b31edc63b9eaf
# via -r contrib/automation/linux-requirements.txt.in
python-levenshtein==0.12.2 \
--hash=sha256:dc2395fbd148a1ab31090dd113c366695934b9e85fe5a4b2a032745efd0346f6
# via -r contrib/automation/linux-requirements.txt.in
pyyaml==5.3.1 \
--hash=sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97 \
--hash=sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76 \
--hash=sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2 \
--hash=sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e \
--hash=sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648 \
--hash=sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf \
--hash=sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f \
--hash=sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2 \
--hash=sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee \
--hash=sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a \
--hash=sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d \
--hash=sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c \
--hash=sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a
# via vcrpy
six==1.16.0 \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
# via
# astroid
# vcrpy
toml==0.10.2 \
--hash=sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b \
--hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f
# via pylint
typed-ast==1.4.3 ; python_version >= "3.0" and platform_python_implementation != "PyPy" \
--hash=sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace \
--hash=sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff \
--hash=sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266 \
--hash=sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528 \
--hash=sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6 \
--hash=sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808 \
--hash=sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4 \
--hash=sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363 \
--hash=sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341 \
--hash=sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04 \
--hash=sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41 \
--hash=sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e \
--hash=sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3 \
--hash=sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899 \
--hash=sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805 \
--hash=sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c \
--hash=sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c \
--hash=sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39 \
--hash=sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a \
--hash=sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3 \
--hash=sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7 \
--hash=sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f \
--hash=sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075 \
--hash=sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0 \
--hash=sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40 \
--hash=sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428 \
--hash=sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927 \
--hash=sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3 \
--hash=sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f \
--hash=sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65
# via
# -r contrib/automation/linux-requirements.txt.in
# astroid
vcrpy==4.1.1 \
--hash=sha256:12c3fcdae7b88ecf11fc0d3e6d77586549d4575a2ceee18e82eee75c1f626162 \
--hash=sha256:57095bf22fc0a2d99ee9674cdafebed0f3ba763018582450706f7d3a74fff599
# via -r contrib/automation/linux-requirements.txt.in
wrapt==1.12.1 \
--hash=sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7
# via
# astroid
# vcrpy
yarl==1.3.0 \
--hash=sha256:024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9 \
--hash=sha256:2f3010703295fbe1aec51023740871e64bb9664c789cba5a6bdf404e93f7568f \
--hash=sha256:3890ab952d508523ef4881457c4099056546593fa05e93da84c7250516e632eb \
--hash=sha256:3e2724eb9af5dc41648e5bb304fcf4891adc33258c6e14e2a7414ea32541e320 \
--hash=sha256:5badb97dd0abf26623a9982cd448ff12cb39b8e4c94032ccdedf22ce01a64842 \
--hash=sha256:73f447d11b530d860ca1e6b582f947688286ad16ca42256413083d13f260b7a0 \
--hash=sha256:7ab825726f2940c16d92aaec7d204cfc34ac26c0040da727cf8ba87255a33829 \
--hash=sha256:b25de84a8c20540531526dfbb0e2d2b648c13fd5dd126728c496d7c3fea33310 \
--hash=sha256:c6e341f5a6562af74ba55205dbd56d248daf1b5748ec48a0200ba227bb9e33f4 \
--hash=sha256:c9bb7c249c4432cd47e75af3864bc02d26c9594f49c82e2a28624417f0ae63b8 \
--hash=sha256:e060906c0c585565c718d1c3841747b61c5439af2211e185f6739a9412dfbde1
# via vcrpy
# WARNING: The following packages were not pinned, but pip requires them to be
# pinned when the requirements file includes hashes. Consider using the --allow-unsafe flag.
# setuptools
......@@ -215,7 +215,6 @@ utestpats = [
"use regex test output patterns instead of sed",
),
(uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),
(uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"),
(
uprefix + r'.*\|\| echo.*(fail|error)',
"explicit exit code checks unnecessary",
......@@ -546,6 +545,22 @@ commonpyfilters = [
),
]
# pattern only for mercurial and extensions
core_py_pats = [
[
# Windows tend to get confused about capitalization of the drive letter
#
# see mercurial.windows.abspath for details
(
r'os\.path\.abspath',
"use util.abspath instead (windows)",
r'#.*re-exports',
),
],
# warnings
[],
]
# filters to convert normal *.py files
pyfilters = [] + commonpyfilters
......@@ -701,6 +716,13 @@ checks = [
pyfilters,
py3pats,
),
(
'core files',
r'.*(hgext|mercurial)/(?!demandimport|policy|pycompat).*\.py',
'',
pyfilters,
core_py_pats,
),
('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats),
('c', r'.*\.[ch]$', '', cfilters, cpats),
('unified test', r'.*\.t$', '', utestfilters, utestpats),
......
......@@ -240,13 +240,8 @@ static void execcmdserver(const struct cmdserveropts *opts)
const char *hgcmd = gethgcmd();
const char *baseargv[] = {
hgcmd,
"serve",
"--cmdserver",
"chgunix",
"--address",
opts->initsockname,
"--daemon-postexec",
hgcmd, "serve", "--no-profile", "--cmdserver",
"chgunix", "--address", opts->initsockname, "--daemon-postexec",
"chdir:/",
};
size_t baseargvsize = sizeof(baseargv) / sizeof(baseargv[0]);
......
......@@ -11,6 +11,7 @@ from __future__ import absolute_import
from mercurial import (
dirstate,
extensions,
pycompat,
)
......@@ -18,7 +19,7 @@ def nonnormalentries(dmap):
"""Compute nonnormal entries from dirstate's dmap"""
res = set()
for f, e in dmap.iteritems():
if e[0] != b'n' or e[3] == -1:
if e.state != b'n' or e.mtime == -1:
res.add(f)
return res
......@@ -27,18 +28,21 @@ def checkconsistency(ui, orig, dmap, _nonnormalset, label):
"""Compute nonnormalset from dmap, check that it matches _nonnormalset"""
nonnormalcomputedmap = nonnormalentries(dmap)
if _nonnormalset != nonnormalcomputedmap:
ui.develwarn(b"%s call to %s\n" % (label, orig), config=b'dirstate')
b_orig = pycompat.sysbytes(repr(orig))
ui.develwarn(b"%s call to %s\n" % (label, b_orig), config=b'dirstate')
ui.develwarn(b"inconsistency in nonnormalset\n", config=b'dirstate')
ui.develwarn(b"[nonnormalset] %s\n" % _nonnormalset, config=b'dirstate')
ui.develwarn(b"[map] %s\n" % nonnormalcomputedmap, config=b'dirstate')
b_nonnormal = pycompat.sysbytes(repr(_nonnormalset))
ui.develwarn(b"[nonnormalset] %s\n" % b_nonnormal, config=b'dirstate')
b_nonnormalcomputed = pycompat.sysbytes(repr(nonnormalcomputedmap))
ui.develwarn(b"[map] %s\n" % b_nonnormalcomputed, config=b'dirstate')
def _checkdirstate(orig, self, arg):
def _checkdirstate(orig, self, *args, **kwargs):
"""Check nonnormal set consistency before and after the call to orig"""
checkconsistency(
self._ui, orig, self._map, self._map.nonnormalset, b"before"
)
r = orig(self, arg)
r = orig(self, *args, **kwargs)
checkconsistency(
self._ui, orig, self._map, self._map.nonnormalset, b"after"
)
......
......@@ -13,6 +13,10 @@ from mercurial import (
)
from mercurial.utils import procutil
from mercurial.revlogutils import (
constants as revlog_constants,
)
for fp in (sys.stdin, sys.stdout, sys.stderr):
procutil.setbinary(fp)
......@@ -32,7 +36,16 @@ def printb(data, end=b'\n'):
for f in sys.argv[1:]:
r = revlog.revlog(binopen, encoding.strtolocal(f))
localf = encoding.strtolocal(f)
if not localf.endswith(b'.i'):
print("file:", f, file=sys.stderr)
print(" invalid filename", file=sys.stderr)
r = revlog.revlog(
binopen,
target=(revlog_constants.KIND_OTHER, b'dump-revlog'),
radix=localf[:-2],
)
print("file:", f)
for i in r:
n = r.node(i)
......
from __future__ import absolute_import, print_function
import argparse
import os
import struct
import sys
import zipfile
# Add ../.. to sys.path as an absolute path so we can import hg modules
hgloc = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
sys.path[0:0] = [hgloc]
from mercurial import (
hg,
ui as uimod,
......
......@@ -139,3 +139,36 @@ check-pytype-py3:
RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t"
PYTHON: python3
TEST_HGMODULEPOLICY: "c"
# `sh.exe --login` sets a couple of extra environment variables that are defined
# in the MinGW shell, but switches CWD to /home/$username. The previous value
# is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running
# run-tests.py- it is needed to make run-tests.py generate a `python3` script
# that satisfies the various shebang lines and delegates to `py -3`.
.window_runtests_template: &windows_runtests
stage: tests
before_script:
# Temporary until this is adjusted in the environment
- $Env:TEMP="C:/Temp"
- $Env:TMP="C:/Temp"
# TODO: find/install cvs, bzr, perforce, gpg, sqlite3
script:
- echo "Entering script section"
- echo "python used, $Env:PYTHON"
- Invoke-Expression "$Env:PYTHON -V"
- Invoke-Expression "$Env:PYTHON -m black --version"
- echo "$Env:RUNTEST_ARGS"
- C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON tests/run-tests.py --color=always $RUNTEST_ARGS'
windows-py3:
<<: *windows_runtests
when: manual
tags:
- windows
timeout: 2h
variables:
TEST_HGMODULEPOLICY: "c"
RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt"
PYTHON: py -3
......@@ -31,6 +31,7 @@ command="hg-ssh --read-only repos/*"
from __future__ import absolute_import
import os
import re
import shlex
import sys
......@@ -51,6 +52,12 @@ def main():
dispatch.initstdio()
cwd = os.getcwd()
if os.name == 'nt':
# os.getcwd() is inconsistent on the capitalization of the drive
# letter, so adjust it. see https://bugs.python.org/issue40368
if re.match('^[a-z]:', cwd):
cwd = cwd[0:1].upper() + cwd[1:]
readonly = False
args = sys.argv[1:]
while len(args):
......
......@@ -23,7 +23,7 @@ import testparseutil
# Whitelist of modules that symbols can be directly imported from.
allowsymbolimports = (
'__future__',
'bzrlib',
'breezy',
'hgclient',
'mercurial',
'mercurial.hgweb.common',
......
......@@ -32,15 +32,15 @@ $PYTHON37_x86_SHA256 = "769bb7c74ad1df6d7d74071cc16a984ff6182e4016e11b8949b93db4
$PYTHON37_X64_URL = "https://www.python.org/ftp/python/3.7.9/python-3.7.9-amd64.exe"
$PYTHON37_x64_SHA256 = "e69ed52afb5a722e5c56f6c21d594e85c17cb29f12f18bb69751cf1714e0f987"
$PYTHON38_x86_URL = "https://www.python.org/ftp/python/3.8.6/python-3.8.6.exe"
$PYTHON38_x86_SHA256 = "287d5df01ff22ff09e6a487ae018603ee19eade71d462ec703850c96f1d5e8a0"
$PYTHON38_x64_URL = "https://www.python.org/ftp/python/3.8.6/python-3.8.6-amd64.exe"
$PYTHON38_x64_SHA256 = "328a257f189cb500606bb26ab0fbdd298ed0e05d8c36540a322a1744f489a0a0"
$PYTHON38_x86_URL = "https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe"
$PYTHON38_x86_SHA256 = "ad07633a1f0cd795f3bf9da33729f662281df196b4567fa795829f3bb38a30ac"
$PYTHON38_x64_URL = "https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe"
$PYTHON38_x64_SHA256 = "7628244cb53408b50639d2c1287c659f4e29d3dfdb9084b11aed5870c0c6a48a"
$PYTHON39_x86_URL = "https://www.python.org/ftp/python/3.9.0/python-3.9.0.exe"
$PYTHON39_x86_SHA256 = "a4c65917f4225d1543959342f0615c813a4e9e7ff1137c4394ff6a5290ac1913"
$PYTHON39_x64_URL = "https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe"
$PYTHON39_x64_SHA256 = "fd2e2c6612d43bb6b213b72fc53f07d73d99059fa72c96e44bde12e7815073ae"
$PYTHON39_x86_URL = "https://www.python.org/ftp/python/3.9.5/python-3.9.5.exe"
$PYTHON39_x86_SHA256 = "505129081a839b699a6ab9064b441ad922ef03767b5dd4241fd0c2166baf64de"
$PYTHON39_x64_URL = "https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe"
$PYTHON39_x64_SHA256 = "84d5243088ba00c11e51905c704dbe041040dfff044f4e1ce5476844ee2e6eac"
# PIP 19.2.3.
$PIP_URL = "https://github.com/pypa/get-pip/raw/309a56c5fd94bd1134053a541cb4657a4e47e09d/get-pip.py"
......@@ -62,6 +62,9 @@ $MERCURIAL_WHEEL_SHA256 = "1d18c7f6ca1456f0f62ee65c9a50c14cbba48ce6e924930cdb105
$RUSTUP_INIT_URL = "https://static.rust-lang.org/rustup/archive/1.21.1/x86_64-pc-windows-gnu/rustup-init.exe"
$RUSTUP_INIT_SHA256 = "d17df34ba974b9b19cf5c75883a95475aa22ddc364591d75d174090d55711c72"
$PYOXIDIZER_URL = "https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F0.16.0/PyOxidizer-0.16.0-x64.msi"
$PYOXIDIZER_SHA256 = "2a9c58add9161c272c418d5e6dec13fbe648f624b5d26770190357e4d664f24e"
# Writing progress slows down downloads substantially. So disable it.
$progressPreference = 'silentlyContinue'
......@@ -121,11 +124,8 @@ function Install-Rust($prefix) {
Invoke-Process "${prefix}\assets\rustup-init.exe" "-y --default-host x86_64-pc-windows-msvc"
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "target add i686-pc-windows-msvc"
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "install 1.46.0"
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "install 1.52.0"
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "component add clippy"
# Install PyOxidizer for packaging.
Invoke-Process "${prefix}\cargo\bin\cargo.exe" "install --version 0.10.3 pyoxidizer"
}
function Install-Dependencies($prefix) {
......@@ -151,6 +151,7 @@ function Install-Dependencies($prefix) {
Secure-Download $MINGW_BIN_URL ${prefix}\assets\mingw-get-bin.zip $MINGW_BIN_SHA256
Secure-Download $MERCURIAL_WHEEL_URL ${prefix}\assets\${MERCURIAL_WHEEL_FILENAME} $MERCURIAL_WHEEL_SHA256
Secure-Download $RUSTUP_INIT_URL ${prefix}\assets\rustup-init.exe $RUSTUP_INIT_SHA256
Secure-Download $PYOXIDIZER_URL ${prefix}\assets\PyOxidizer.msi $PYOXIDIZER_SHA256
Write-Output "installing Python 2.7 32-bit"
Invoke-Process msiexec.exe "/i ${prefix}\assets\python27-x86.msi /l* ${prefix}\assets\python27-x86.log /q TARGETDIR=${prefix}\python27-x86 ALLUSERS="
......@@ -172,6 +173,9 @@ function Install-Dependencies($prefix) {
Write-Output "installing Visual Studio 2017 Build Tools and SDKs"
Invoke-Process ${prefix}\assets\vs_buildtools.exe "--quiet --wait --norestart --nocache --channelUri https://aka.ms/vs/15/release/channel --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Component.Windows10SDK.17763 --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Component.VC.140"
Write-Output "installing PyOxidizer"
Invoke-Process msiexec.exe "/i ${prefix}\assets\PyOxidizer.msi /l* ${prefix}\assets\PyOxidizer.log /quiet"
Install-Rust ${prefix}
Write-Output "installing Visual C++ 9.0 for Python 2.7"
......
......@@ -64,6 +64,7 @@ def build_wix(
extra_packages_script=None,
extra_wxs=None,
extra_features=None,
extra_pyoxidizer_vars=None,
):
if not pyoxidizer_target and not python:
raise Exception("--python required unless building with PyOxidizer")
......@@ -105,7 +106,7 @@ def build_wix(
"timestamp_url": sign_timestamp_url,
}
fn(**kwargs)
fn(**kwargs, extra_pyoxidizer_vars=extra_pyoxidizer_vars)