Patchwork [1,of,2,STABLE] contrib: split Windows requirements into multiple files

login
register
mail settings
Submitter Gregory Szorc
Date Oct. 22, 2020, 5:53 a.m.
Message ID <f79d3b740a342aa2478c.1603346017@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/47505/
State Accepted
Headers show

Comments

Gregory Szorc - Oct. 22, 2020, 5:53 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1603342399 25200
#      Wed Oct 21 21:53:19 2020 -0700
# Branch stable
# Node ID f79d3b740a342aa2478c2962997b0eb21bfc40f3
# Parent  1eee2b8298bbf6ac7c7ca9b15f14fcb4e7940ea2
contrib: split Windows requirements into multiple files

Package support for Python 2 has diverged significantly. It is no
longer trivial to maintain a single requirements file that supports
both Python 2 and 3 because the set of packages and versions varies
wildly.

This commit split up the Windows requirements files so we have
variants for Python 2 and 3. As part of this, I also renamed the
files to have what I believe to be more reasonable naming ("win32"
felt like a weird identifier to me).

We can see that some package versions decreated on 2.7. This is
because the old pinned versions weren't compatible with Python 2.
Pulkit Goyal - Oct. 22, 2020, 10:04 a.m.
On Thu, Oct 22, 2020 at 11:27 AM Gregory Szorc <gregory.szorc@gmail.com> wrote:
>
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1603342399 25200
> #      Wed Oct 21 21:53:19 2020 -0700
> # Branch stable
> # Node ID f79d3b740a342aa2478c2962997b0eb21bfc40f3
> # Parent  1eee2b8298bbf6ac7c7ca9b15f14fcb4e7940ea2
> contrib: split Windows requirements into multiple files
>
> Package support for Python 2 has diverged significantly. It is no
> longer trivial to maintain a single requirements file that supports
> both Python 2 and 3 because the set of packages and versions varies
> wildly.
>
> This commit split up the Windows requirements files so we have
> variants for Python 2 and 3. As part of this, I also renamed the
> files to have what I believe to be more reasonable naming ("win32"
> felt like a weird identifier to me).
>
> We can see that some package versions decreated on 2.7. This is
> because the old pinned versions weren't compatible with Python 2.

Queued for stable, many thanks!

Patch

diff --git a/contrib/packaging/hgpackaging/inno.py b/contrib/packaging/hgpackaging/inno.py
--- a/contrib/packaging/hgpackaging/inno.py
+++ b/contrib/packaging/hgpackaging/inno.py
@@ -66,7 +66,7 @@  def build_with_py2exe(
     staging_dir = inno_build_dir / 'stage'
 
     requirements_txt = (
-        source_dir / 'contrib' / 'packaging' / 'requirements_win32.txt'
+        source_dir / 'contrib' / 'packaging' / 'requirements-windows-py2.txt'
     )
 
     inno_build_dir.mkdir(parents=True, exist_ok=True)
diff --git a/contrib/packaging/hgpackaging/wix.py b/contrib/packaging/hgpackaging/wix.py
--- a/contrib/packaging/hgpackaging/wix.py
+++ b/contrib/packaging/hgpackaging/wix.py
@@ -319,7 +319,7 @@  def build_installer_py2exe(
     hg_build_dir = source_dir / 'build'
 
     requirements_txt = (
-        source_dir / 'contrib' / 'packaging' / 'requirements_win32.txt'
+        source_dir / 'contrib' / 'packaging' / 'requirements-windows-py2.txt'
     )
 
     build_py2exe(
diff --git a/contrib/packaging/requirements_win32.txt b/contrib/packaging/requirements-windows-py2.txt
rename from contrib/packaging/requirements_win32.txt
rename to contrib/packaging/requirements-windows-py2.txt
--- a/contrib/packaging/requirements_win32.txt
+++ b/contrib/packaging/requirements-windows-py2.txt
@@ -2,7 +2,7 @@ 
 # This file is autogenerated by pip-compile
 # To update, run:
 #
-#    pip-compile --generate-hashes --output-file=contrib/packaging/requirements_win32.txt contrib/packaging/requirements_win32.txt.in
+#    pip-compile --generate-hashes --output-file=contrib/packaging/requirements-windows-py2.txt contrib/packaging/requirements-windows.txt.in
 #
 certifi==2020.6.20 \
     --hash=sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3 \
@@ -46,6 +46,10 @@  cffi==1.14.3 \
     --hash=sha256:f92cdecb618e5fa4658aeb97d5eb3d2f47aa94ac6477c6daf0f306c5a3b9e6b1 \
     --hash=sha256:f92f789e4f9241cd262ad7a555ca2c648a98178a953af117ef7fad46aa1d5591 \
     # via cryptography
+configparser==4.0.2 \
+    --hash=sha256:254c1d9c79f60c45dfde850850883d5aaa7f19a23f13561243a050d5a7c3fe4c \
+    --hash=sha256:c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df \
+    # via entrypoints
 cryptography==3.1.1 \
     --hash=sha256:21b47c59fcb1c36f1113f3709d37935368e34815ea1d7073862e92f810dc7499 \
     --hash=sha256:451cdf60be4dafb6a3b78802006a020e6cd709c22d240f94f7a0696240a17154 \
@@ -73,8 +77,8 @@  cryptography==3.1.1 \
 docutils==0.16 \
     --hash=sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af \
     --hash=sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc \
-    # via -r contrib/packaging/requirements_win32.txt.in
-dulwich==0.19.16 \
+    # via -r contrib/packaging/requirements-windows.txt.in
+dulwich==0.19.16 ; python_version <= "2.7" \
     --hash=sha256:10699277c6268d0c16febe141a5b1c1a6e9744f3144c2d2de1706f4b1adafe63 \
     --hash=sha256:267160904e9a1cb6c248c5efc53597a35d038ecc6f60bdc4546b3053bed11982 \
     --hash=sha256:4e3aba5e4844e7c700721c1fc696987ea820ee3528a03604dc4e74eff4196826 \
@@ -82,36 +86,44 @@  dulwich==0.19.16 \
     --hash=sha256:dddae02d372fc3b5cfb0046d0f62246ef281fa0c088df7601ab5916607add94b \
     --hash=sha256:f00d132082b8fcc2eb0d722abc773d4aeb5558c1475d7edd1f0f571146c29db9 \
     --hash=sha256:f74561c448bfb6f04c07de731c1181ae4280017f759b0bb04fa5770aa84ca850 \
-    # via -r contrib/packaging/requirements_win32.txt.in
-jeepney==0.4.3 \
-    --hash=sha256:3479b861cc2b6407de5188695fa1a8d57e5072d7059322469b62628869b8e36e \
-    --hash=sha256:d6c6b49683446d2407d2fe3acb7a368a77ff063f9182fe427da15d622adc24cf \
-    # via keyring, secretstorage
-keyring==21.4.0 \
-    --hash=sha256:4e34ea2fdec90c1c43d6610b5a5fafa1b9097db1802948e90caf5763974b8f8d \
-    --hash=sha256:9aeadd006a852b78f4b4ef7c7556c2774d2432bbef8ee538a3e9089ac8b11466 \
-    # via -r contrib/packaging/requirements_win32.txt.in
+    # via -r contrib/packaging/requirements-windows.txt.in
+entrypoints==0.3 \
+    --hash=sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19 \
+    --hash=sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451 \
+    # via keyring
+enum34==1.1.10 \
+    --hash=sha256:a98a201d6de3f2ab3db284e70a33b0f896fbf35f8086594e8c9e74b909058d53 \
+    --hash=sha256:c3858660960c984d6ab0ebad691265180da2b43f07e061c0f8dca9ef3cffd328 \
+    --hash=sha256:cce6a7477ed816bd2542d03d53db9f0db935dd013b70f336a95c73979289f248 \
+    # via cryptography
+ipaddress==1.0.23 \
+    --hash=sha256:6e0f4a39e66cb5bb9a137b00276a2eff74f93b71dcbdad6f10ff7df9d3557fcc \
+    --hash=sha256:b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2 \
+    # via cryptography
+keyring==18.0.1 \
+    --hash=sha256:67d6cc0132bd77922725fae9f18366bb314fd8f95ff4d323a4df41890a96a838 \
+    --hash=sha256:7b29ebfcf8678c4da531b2478a912eea01e80007e5ddca9ee0c7038cb3489ec6 \
+    # via -r contrib/packaging/requirements-windows.txt.in
 pycparser==2.20 \
     --hash=sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0 \
     --hash=sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705 \
     # via cffi
-pygments==2.7.1 \
-    --hash=sha256:307543fe65c0947b126e83dd5a61bd8acbd84abec11f43caebaf5534cbc17998 \
-    --hash=sha256:926c3f319eda178d1bd90851e4317e6d8cdb5e292a3386aac9bd75eca29cf9c7 \
-    # via -r contrib/packaging/requirements_win32.txt.in
+pygments==2.5.2 \
+    --hash=sha256:2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b \
+    --hash=sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe \
+    # via -r contrib/packaging/requirements-windows.txt.in
 pywin32-ctypes==0.2.0 \
     --hash=sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942 \
     --hash=sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98 \
-    # via -r contrib/packaging/requirements_win32.txt.in
-secretstorage==3.1.2 \
-    --hash=sha256:15da8a989b65498e29be338b3b279965f1b8f09b9668bd8010da183024c8bff6 \
-    --hash=sha256:b5ec909dde94d4ae2fa26af7c089036997030f0cf0a5cb372b4cccabd81c143b \
+    # via -r contrib/packaging/requirements-windows.txt.in
+secretstorage==2.3.1 \
+    --hash=sha256:3af65c87765323e6f64c83575b05393f9e003431959c9395d1791d51497f29b6 \
     # via keyring
 six==1.15.0 \
     --hash=sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259 \
     --hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced \
     # via cryptography
-urllib3==1.25.10 \
-    --hash=sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a \
-    --hash=sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461 \
+urllib3==1.25.11 \
+    --hash=sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2 \
+    --hash=sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e \
     # via dulwich
diff --git a/contrib/packaging/requirements_win32.txt b/contrib/packaging/requirements-windows-py3.txt
copy from contrib/packaging/requirements_win32.txt
copy to contrib/packaging/requirements-windows-py3.txt
--- a/contrib/packaging/requirements_win32.txt
+++ b/contrib/packaging/requirements-windows-py3.txt
@@ -2,7 +2,7 @@ 
 # This file is autogenerated by pip-compile
 # To update, run:
 #
-#    pip-compile --generate-hashes --output-file=contrib/packaging/requirements_win32.txt contrib/packaging/requirements_win32.txt.in
+#    pip-compile --generate-hashes --output-file=contrib/packaging/requirements-windows-py3.txt contrib/packaging/requirements-windows.txt.in
 #
 certifi==2020.6.20 \
     --hash=sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3 \
@@ -73,16 +73,22 @@  cryptography==3.1.1 \
 docutils==0.16 \
     --hash=sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af \
     --hash=sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc \
-    # via -r contrib/packaging/requirements_win32.txt.in
-dulwich==0.19.16 \
-    --hash=sha256:10699277c6268d0c16febe141a5b1c1a6e9744f3144c2d2de1706f4b1adafe63 \
-    --hash=sha256:267160904e9a1cb6c248c5efc53597a35d038ecc6f60bdc4546b3053bed11982 \
-    --hash=sha256:4e3aba5e4844e7c700721c1fc696987ea820ee3528a03604dc4e74eff4196826 \
-    --hash=sha256:60bb2c2c92f5025c1b53a556304008f0f624c98ae36f22d870e056b2d4236c11 \
-    --hash=sha256:dddae02d372fc3b5cfb0046d0f62246ef281fa0c088df7601ab5916607add94b \
-    --hash=sha256:f00d132082b8fcc2eb0d722abc773d4aeb5558c1475d7edd1f0f571146c29db9 \
-    --hash=sha256:f74561c448bfb6f04c07de731c1181ae4280017f759b0bb04fa5770aa84ca850 \
-    # via -r contrib/packaging/requirements_win32.txt.in
+    # via -r contrib/packaging/requirements-windows.txt.in
+dulwich==0.20.6 ; python_version >= "3" \
+    --hash=sha256:1ccd55e38fa9f169290f93e027ab4508202f5bdd6ef534facac4edd3f6903f0d \
+    --hash=sha256:2452a0379cc7bbbd7ab893ec104d18039f1ea98b0d6be6bca5646e5cf29e0ae9 \
+    --hash=sha256:2f4aebc54ed2d37dcee737024421452375570a422eb682232e676aa7ebc9cb4b \
+    --hash=sha256:304f52b10c49c3a6ddfbd73e2e93d8e979350225cfba9688e51110e74fa2f718 \
+    --hash=sha256:49e747c72d9099e873bf6196260346d5996c3f28af788294d47a8accdc524de7 \
+    --hash=sha256:4fee359928c59b53af153a582a7ed7595259a5a825df400301a29e17fd78dfd3 \
+    --hash=sha256:50ef300a9fa4efd9f85009c2bd8b515266ec1529400f8834f85c04fa9f09b2c0 \
+    --hash=sha256:5348310f21b2a23847342ce464461499b6652483fa42de03714d0f6421a99698 \
+    --hash=sha256:7e7b5dea5178b6493fdb83adccbe81de9ddff55f79880185ed594c0e3a97209b \
+    --hash=sha256:8f7a7f973be2beedfb10dd8d3eb6bdf9ec466c72ad555704897cbd6357fe5021 \
+    --hash=sha256:bea6e6caffc6c73bfd1647714c5715ab96ac49deb8beb8b67511529afa25685a \
+    --hash=sha256:e5871b86a079e9e290f52ab14559cea1b694a0b8ed2b9ebb898f6ced7f14a406 \
+    --hash=sha256:e593f514b8ac740b4ceeb047745b4719bfc9f334904245c6edcb3a9d002f577b \
+    # via -r contrib/packaging/requirements-windows.txt.in
 jeepney==0.4.3 \
     --hash=sha256:3479b861cc2b6407de5188695fa1a8d57e5072d7059322469b62628869b8e36e \
     --hash=sha256:d6c6b49683446d2407d2fe3acb7a368a77ff063f9182fe427da15d622adc24cf \
@@ -90,7 +96,7 @@  jeepney==0.4.3 \
 keyring==21.4.0 \
     --hash=sha256:4e34ea2fdec90c1c43d6610b5a5fafa1b9097db1802948e90caf5763974b8f8d \
     --hash=sha256:9aeadd006a852b78f4b4ef7c7556c2774d2432bbef8ee538a3e9089ac8b11466 \
-    # via -r contrib/packaging/requirements_win32.txt.in
+    # via -r contrib/packaging/requirements-windows.txt.in
 pycparser==2.20 \
     --hash=sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0 \
     --hash=sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705 \
@@ -98,11 +104,11 @@  pycparser==2.20 \
 pygments==2.7.1 \
     --hash=sha256:307543fe65c0947b126e83dd5a61bd8acbd84abec11f43caebaf5534cbc17998 \
     --hash=sha256:926c3f319eda178d1bd90851e4317e6d8cdb5e292a3386aac9bd75eca29cf9c7 \
-    # via -r contrib/packaging/requirements_win32.txt.in
+    # via -r contrib/packaging/requirements-windows.txt.in
 pywin32-ctypes==0.2.0 \
     --hash=sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942 \
     --hash=sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98 \
-    # via -r contrib/packaging/requirements_win32.txt.in
+    # via -r contrib/packaging/requirements-windows.txt.in
 secretstorage==3.1.2 \
     --hash=sha256:15da8a989b65498e29be338b3b279965f1b8f09b9668bd8010da183024c8bff6 \
     --hash=sha256:b5ec909dde94d4ae2fa26af7c089036997030f0cf0a5cb372b4cccabd81c143b \
@@ -111,7 +117,7 @@  six==1.15.0 \
     --hash=sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259 \
     --hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced \
     # via cryptography
-urllib3==1.25.10 \
-    --hash=sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a \
-    --hash=sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461 \
+urllib3==1.25.11 \
+    --hash=sha256:8d7eaa5a82a1cac232164990f04874c594c9453ec55eef02eab885aa02fc17a2 \
+    --hash=sha256:f5321fbe4bf3fefa0efd0bfe7fb14e90909eb62a48ccda331726b4319897dd5e \
     # via dulwich
diff --git a/contrib/packaging/requirements_win32.txt.in b/contrib/packaging/requirements-windows.txt.in
rename from contrib/packaging/requirements_win32.txt.in
rename to contrib/packaging/requirements-windows.txt.in
--- a/contrib/packaging/requirements_win32.txt.in
+++ b/contrib/packaging/requirements-windows.txt.in
@@ -1,6 +1,7 @@ 
 docutils
 # Pinned to an old version because 0.20 drops Python 3 compatibility.
-dulwich < 0.20
+dulwich < 0.20 ; python_version <= '2.7'
+dulwich ; python_version >= '3'
 keyring
 pygments
 # Need to list explicitly so dependency gets pulled in when
diff --git a/rust/hgcli/pyoxidizer.bzl b/rust/hgcli/pyoxidizer.bzl
--- a/rust/hgcli/pyoxidizer.bzl
+++ b/rust/hgcli/pyoxidizer.bzl
@@ -64,7 +64,7 @@  def make_exe(dist):
     # On Windows, we install extra packages for convenience.
     if IS_WINDOWS:
         exe.add_python_resources(
-            exe.pip_install(["-r", ROOT + "/contrib/packaging/requirements_win32.txt"]),
+            exe.pip_install(["-r", ROOT + "/contrib/packaging/requirements-windows-py2.txt"]),
         )
 
     return exe