[med-svn] [Git][med-team/conda][master] 15 commits: conda has an undeclared runtime dependency on distutils

Diane Trout (@diane) gitlab at salsa.debian.org
Thu Nov 4 06:14:14 GMT 2021



Diane Trout pushed to branch master at Debian Med / conda


Commits:
f5c37949 by Diane Trout at 2021-10-18T14:36:59-07:00
conda has an undeclared runtime dependency on distutils

- - - - -
3032843b by Diane Trout at 2021-10-18T14:37:15-07:00
conda/shell/bin/conda needs to have execute permissions

- - - - -
1aa80ab9 by Diane Trout at 2021-10-18T14:37:36-07:00
add use-python3-bin-conda.patch to fix unversioned bin/conda shebang

- - - - -
48f4b45e by Diane Trout at 2021-10-18T14:37:47-07:00
Fix autopkgtest run-tests

Every conda command needs CONDA_EXE to be set
run local only conda commands to test executable

- - - - -
8538cb04 by Diane Trout at 2021-11-02T22:48:50-07:00
Convert to simpler quilt patch format

QUILT_DIFF_ARGS="-p ab"
QUILT_REFRESH_ARGS="-p ab"
QUILT_NO_DIFF_INDEX=1
QUILT_NO_DIFF_TIMESTAMPS=1

- - - - -
34a7c41e by Diane Trout at 2021-11-02T22:50:33-07:00
We do need run_command for a test, import it from python_api

- - - - -
6e2845ba by Diane Trout at 2021-11-02T22:54:07-07:00
Add some more tests that seem to access the network

They also seem to have trouble parsing the proxy settings
It's possible fixing that might allow them to work

- - - - -
a204b47b by Diane Trout at 2021-11-02T22:54:52-07:00
These tests need conda's path manipulation magic to work

(At least I think so)

- - - - -
6aaae2de by Diane Trout at 2021-11-02T22:55:27-07:00
Skip another cmd.exe test

- - - - -
daec02b5 by Diane Trout at 2021-11-02T23:00:31-07:00
Refresh patch

- - - - -
af3f7be0 by Diane Trout at 2021-11-03T22:32:54-07:00
Add support-older-requests.patch to work around getting requests version

- - - - -
f4749b29 by Diane Trout at 2021-11-03T22:40:10-07:00
Add use-new-rumel-yaml-dump.patch

I ran into a problem where updating the config file lost the
comments in the config file

- - - - -
d2c4e0e3 by Diane Trout at 2021-11-03T22:46:45-07:00
use-sys-executable.patch to deal with Debian's python3 executable name

- - - - -
21c4324d by Diane Trout at 2021-11-03T22:50:04-07:00
add test-requires-installation.patch

for tests that need the conda shell setup

- - - - -
20d73088 by Diane Trout at 2021-11-03T22:51:23-07:00
Run autopackage tests and fail if they don't work

- - - - -


16 changed files:

- debian/changelog
- debian/control
- debian/patches/do_not_try_to_delete_python_interpreter.patch
- debian/patches/ignore_test_accessing_remote.patch
- debian/patches/ignore_tests_using_charizard.patch
- debian/patches/no_windows_files_in_test.patch
- debian/patches/ruamel_yaml_name.patch
- debian/patches/series
- debian/patches/skip_tests_needing_conda-build.patch
- + debian/patches/support-older-requests.patch
- + debian/patches/test-requires-installation.patch
- + debian/patches/use-new-rumel-yaml-dump.patch
- + debian/patches/use-python3-bin-conda.patch
- + debian/patches/use-sys-executable.patch
- debian/rules
- debian/tests/run-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,10 +1,25 @@
 conda (4.9.2+dfsg-1~rc0) UNRELEASED; urgency=medium
 
+  [ Steffen Moeller ]
   * New upstream release.
   * Bumped standard to 4.5.1 (no changes required)
   * Improved clean for repeated builds
   * Added myself to uploaders
 
+  [ Diane Trout ]
+  * conda has an undeclared runtime dependency on distutils
+  * conda/shell/bin/conda needs to have execute permissions
+  * add use-python3-bin-conda.patch to fix unversioned bin/conda shebang
+  * Fix autopkgtest run-tests
+    - Every conda command needs CONDA_EXE to be set
+    - run local only conda commands to test executable
+  * Add support-older-requests.patch to work around getting requests version
+  * Add use-new-rumel-yaml-dump.patch to update avoid bug updating the
+    config file
+  * use-sys-executable.patch to deal with Debian's python3 executable name
+  * add test-requires-installation.patch for tests that need the conda
+    shell setup
+
  -- Steffen Moeller <moeller at debian.org>  Wed, 10 Feb 2021 20:31:05 +0100
 
 conda (4.8.2+dfsg-1~rc0) experimental; urgency=medium


=====================================
debian/control
=====================================
@@ -27,6 +27,7 @@ Architecture: any
 Depends: ${python3:Depends},
          ${misc:Depends},
          conda-package-handling,
+         python3-distutils,
          python3-pycosat,
          python3-pexpect,
          python3-requests,


=====================================
debian/patches/do_not_try_to_delete_python_interpreter.patch
=====================================
@@ -2,11 +2,9 @@ Author: Andreas Tille <tille at debian.org>
 Last-Update: Sun, 10 Mar 2019 09:33:50 +0100
 Description: Do not run test that tries to override /usr/bin/python3.7 for whatever reason
 
-Index: conda/tests/core/test_initialize.py
-===================================================================
---- conda.orig/tests/core/test_initialize.py
-+++ conda/tests/core/test_initialize.py
-@@ -563,6 +563,7 @@ class InitializeTests(TestCase):
+--- a/tests/core/test_initialize.py
++++ b/tests/core/test_initialize.py
+@@ -563,6 +564,7 @@
              line = next(line for line in c.stdout.splitlines() if line.strip().endswith(fn))
              assert line.strip().startswith('modified'), line
  


=====================================
debian/patches/ignore_test_accessing_remote.patch
=====================================
@@ -2,8 +2,8 @@ Author: Andreas Tille <tille at debian.org>
 Last-Update: Sun, 10 Mar 2019 09:33:50 +0100
 Description: Ignore tests trying to remove remote network hosts
 
---- conda.orig/tests/test_info.py
-+++ conda/tests/test_info.py
+--- a/tests/test_info.py
++++ b/tests/test_info.py
 @@ -40,7 +40,7 @@
      assert_in(conda_info_e_out, conda_info_all_out)
      assert_in(conda_info_s_out, conda_info_all_out)
@@ -13,8 +13,8 @@ Description: Ignore tests trying to remove remote network hosts
  @pytest.mark.integration
  def test_info_package_json():
      out, err, rc = run_command(Commands.INFO, "--json", "itsdangerous=1.0.0=py37_0")
---- conda.orig/tests/test_api.py
-+++ conda/tests/test_api.py
+--- a/tests/test_api.py
++++ b/tests/test_api.py
 @@ -92,7 +92,7 @@
      ))
      inspect_arguments(Solver.solve_for_transaction, solve_for_transaction_args)
@@ -40,8 +40,8 @@ Description: Ignore tests trying to remove remote network hosts
  def test_PrefixData_return_value_contract():
      pd = PrefixData(context.conda_prefix)
  
---- conda.orig/tests/test_fetch.py
-+++ conda/tests/test_fetch.py
+--- a/tests/test_fetch.py
++++ b/tests/test_fetch.py
 @@ -15,6 +15,7 @@
  from conda.core.package_cache_data import download
  
@@ -50,8 +50,8 @@ Description: Ignore tests trying to remove remote network hosts
  @pytest.mark.integration
  class TestConnectionWithShortTimeouts(TestCase):
  
---- conda.orig/tests/core/test_index.py
-+++ conda/tests/core/test_index.py
+--- a/tests/core/test_index.py
++++ b/tests/core/test_index.py
 @@ -75,7 +75,7 @@
      assert glibc_pkg.version == '2.10'
      assert glibc_pkg.package_type == PackageType.VIRTUAL_SYSTEM
@@ -76,8 +76,8 @@ Description: Ignore tests trying to remove remote network hosts
      def test_get_index_win64_platform(self):
          win64 = 'win-64'
          index = get_index(platform=win64)
---- conda.orig/tests/core/test_envs_manager.py
-+++ conda/tests/core/test_envs_manager.py
+--- a/tests/core/test_envs_manager.py
++++ b/tests/core/test_envs_manager.py
 @@ -45,6 +45,8 @@
          rm_rf(self.prefix)
          assert not lexists(self.prefix)
@@ -87,3 +87,39 @@ Description: Ignore tests trying to remove remote network hosts
      def test_register_unregister_location_env(self):
          user_environments_txt_file = get_user_environments_txt_file()
          if (not os.path.exists(user_environments_txt_file)
+--- a/tests/core/test_subdir_data.py
++++ b/tests/core/test_subdir_data.py
+@@ -32,6 +32,7 @@
+ @pytest.mark.integration
+ class GetRepodataIntegrationTests(TestCase):
+ 
++    @pytest.mark.skip(reason="Debian: seems to access network")
+     def test_get_index_no_platform_with_offline_cache(self):
+         import conda.core.subdir_data
+         with env_var('CONDA_REPODATA_TIMEOUT_SECS', '0', stack_callback=conda_tests_ctxt_mgmt_def_pol):
+@@ -67,6 +68,7 @@
+                     assert all(index3.get(k) == rec for k, rec in iteritems(index))
+                     assert unknown or len(index) == len(index3)
+ 
++    @pytest.mark.skipif(True, reason="Debian: seems to access network")
+     def test_subdir_data_context_offline(self):
+         with env_var('CONDA_OFFLINE', 'yes', stack_callback=conda_tests_ctxt_mgmt_def_pol):
+             local_channel = Channel(join(dirname(__file__), "..", "data", "conda_format_repo", context.subdir))
+--- a/tests/conda_env/test_env.py
++++ b/tests/conda_env/test_env.py
+@@ -79,6 +79,7 @@
+         assert 'baz' in e.dependencies['pip']
+ 
+     @pytest.mark.integration
++    @pytest.mark.skip(reason="Debian: seems to access network")
+     def test_http(self):
+         e = get_simple_environment()
+         f = env.from_file("https://raw.githubusercontent.com/conda/conda/master/tests/conda_env/support/simple.yml")
+@@ -86,6 +87,7 @@
+         assert e.dependencies == f.dependencies
+ 
+     @pytest.mark.integration
++    @pytest.mark.skip(reason="Debian: seems to access network")
+     def test_http_raises(self):
+         with self.assertRaises(CondaHTTPError):
+             env.from_file("https://raw.githubusercontent.com/conda/conda/master/tests/conda_env/support/does-not-exist.yml")


=====================================
debian/patches/ignore_tests_using_charizard.patch
=====================================
@@ -3,11 +3,9 @@ Last-Update: Sun, 10 Mar 2019 09:33:50 +0100
 Description: Somehow these dirs charizard and venusaur are not added to PATH in a Debian build chroot
  Just ignore that failure
 
-Index: conda/tests/test_activate.py
-===================================================================
---- conda.orig/tests/test_activate.py
-+++ conda/tests/test_activate.py
-@@ -2067,7 +2067,7 @@ class ShellWrapperIntegrationTests(TestC
+--- a/tests/test_activate.py
++++ b/tests/test_activate.py
+@@ -2068,7 +2068,7 @@
  
          shell.assert_env_var('CONDA_SHLVL', '0')
          PATH0 = shell.get_env_var('PATH', '')
@@ -16,7 +14,7 @@ Index: conda/tests/test_activate.py
          # Remove sys.prefix from PATH. It interferes with path entry count tests.
          # We can no longer check this since we'll replace e.g. between 1 and N path
          # entries with N of them in _replace_prefix_in_path() now. It is debatable
-@@ -2220,22 +2220,22 @@ class ShellWrapperIntegrationTests(TestC
+@@ -2221,22 +2221,22 @@
          shell.sendline('conda' + activate + '"%s" --stack' % self.prefix3)
          shell.assert_env_var('CONDA_SHLVL', '2')
          PATH2 = shell.get_env_var('PATH')
@@ -45,3 +43,19 @@ Index: conda/tests/test_activate.py
          if on_win:
              assert PATH4.lower() == PATH2.lower()
          else:
+@@ -2273,6 +2273,7 @@
+             self.basic_posix(shell)
+ 
+     @pytest.mark.skipif(not which('dash') or on_win, reason='dash not installed')
++    @pytest.mark.skip(reason="Needs to be installed")
+     def test_dash_basic_integration(self):
+         with InteractiveShell('dash') as shell:
+             self.basic_posix(shell)
+@@ -2530,6 +2531,7 @@
+             shell.expect('usage: conda activate')
+ 
+     @pytest.mark.skipif(bash_unsupported(), reason=bash_unsupported_because())
++    @pytest.mark.skip(reason="Debian: requires being installed")
+     def test_legacy_activate_deactivate_bash(self):
+         with InteractiveShell('bash') as shell:
+ 


=====================================
debian/patches/no_windows_files_in_test.patch
=====================================
@@ -2,8 +2,8 @@ Author: Andreas Tille <tille at debian.org>
 Last-Update: Sun, 10 Mar 2019 09:33:50 +0100
 Description: Ignore test trying to verify installation of Windows executable files
 
---- conda.orig/tests/core/test_initialize.py
-+++ conda/tests/core/test_initialize.py
+--- a/tests/core/test_initialize.py
++++ b/tests/core/test_initialize.py
 @@ -27,6 +27,7 @@
  from conda.models.enums import LinkType
  from tests.helpers import tempdir
@@ -28,3 +28,11 @@ Description: Ignore test trying to verify installation of Windows executable fil
      def test_install_condabin_conda_bat(self):
          with tempdir() as conda_temp_prefix:
              conda_prefix = abspath(sys.prefix)
+@@ -637,6 +640,7 @@
+ 
+         assert "unset CONDA_SHLVL" in c.stdout
+ 
++    @pytest.mark.skipif(True, reason="Debian: There is no point to test for windows .exe files on Debian")
+     def test_initialize_dev_cmd_exe(self):
+         with env_vars({'CONDA_DRY_RUN': 'true', 'CONDA_VERBOSITY': '0'}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
+             with tempdir() as conda_temp_prefix:


=====================================
debian/patches/ruamel_yaml_name.patch
=====================================
@@ -4,11 +4,9 @@ Description: For some strange reason ruamel.yaml is named ruamel_yaml
  No idea under what circumstances this can work but in unstable pbuilder
  it does not and it is fixed hereby
 
-Index: conda/tests/conda_env/test_env.py
-===================================================================
---- conda.orig/tests/conda_env/test_env.py
-+++ conda/tests/conda_env/test_env.py
-@@ -376,6 +376,8 @@ class EnvironmentSaveTestCase(unittest.T
+--- a/tests/conda_env/test_env.py
++++ b/tests/conda_env/test_env.py
+@@ -376,6 +376,8 @@
          self.assertEqual(e.to_yaml(), actual)
  
  
@@ -17,11 +15,9 @@ Index: conda/tests/conda_env/test_env.py
  class SaveExistingEnvTestCase(unittest.TestCase):
      @unittest.skipIf(not is_prefix_activated_PATHwise(),
                        "You are running `pytest` outside of proper activation. "
-Index: conda/tests/core/test_index.py
-===================================================================
---- conda.orig/tests/core/test_index.py
-+++ conda/tests/core/test_index.py
-@@ -85,12 +85,14 @@ class GetIndexIntegrationTests(TestCase)
+--- a/tests/core/test_index.py
++++ b/tests/core/test_index.py
+@@ -85,12 +85,14 @@
          for dist, record in iteritems(index):
              assert platform_in_record(linux64, record), (linux64, record.url)
  
@@ -36,7 +32,7 @@ Index: conda/tests/core/test_index.py
      def test_get_index_win64_platform(self):
          win64 = 'win-64'
          index = get_index(platform=win64)
-@@ -101,6 +103,7 @@ class GetIndexIntegrationTests(TestCase)
+@@ -101,6 +103,7 @@
  @pytest.mark.integration
  class ReducedIndexTests(TestCase):
  
@@ -44,11 +40,9 @@ Index: conda/tests/core/test_index.py
      def test_basic_get_reduced_index(self):
          get_reduced_index(None, (Channel('defaults'), Channel('conda-test')), context.subdirs,
                            (MatchSpec('flask'), ), 'repodata.json')
-Index: conda/tests/test_history.py
-===================================================================
---- conda.orig/tests/test_history.py
-+++ conda/tests/test_history.py
-@@ -35,6 +35,7 @@ class HistoryTestCase(unittest.TestCase)
+--- a/tests/test_history.py
++++ b/tests/test_history.py
+@@ -35,6 +35,7 @@
                      pass
              self.assertEqual(1, update.call_count)
  
@@ -56,7 +50,7 @@ Index: conda/tests/test_history.py
      @skip_if_no_mock
      def test_returns_history_object_as_context_object(self):
          h = History("/path/to/prefix")
-@@ -44,7 +45,7 @@ class HistoryTestCase(unittest.TestCase)
+@@ -44,7 +45,7 @@
                  with h as h2:
                      self.assertEqual(h, h2)
  


=====================================
debian/patches/series
=====================================
@@ -9,3 +9,8 @@ ignore_test_trying_to_delete_python3.patch
 fix_other_test_issues.patch
 no_windows_files_in_test.patch
 find_conda_profile
+use-python3-bin-conda.patch
+support-older-requests.patch
+use-new-rumel-yaml-dump.patch
+use-sys-executable.patch
+test-requires-installation.patch


=====================================
debian/patches/skip_tests_needing_conda-build.patch
=====================================
@@ -4,11 +4,9 @@ Description: There is a circular dependency in the test suite between
  conda and conda-build.  Skip the tests needing conda-build here to break
  this circle.
 
-Index: conda/tests/test_link_order.py
-===================================================================
---- conda.orig/tests/test_link_order.py
-+++ conda/tests/test_link_order.py
-@@ -8,7 +8,7 @@ import os
+--- a/tests/test_link_order.py
++++ b/tests/test_link_order.py
+@@ -8,7 +8,7 @@
  import shutil
  import tempfile
  
@@ -17,7 +15,7 @@ Index: conda/tests/test_link_order.py
  
  try:
      from unittest.mock import patch
-@@ -17,6 +17,8 @@ except ImportError:
+@@ -17,6 +17,8 @@
  
  log = getLogger(__name__)
  
@@ -26,7 +24,7 @@ Index: conda/tests/test_link_order.py
  class TestLinkOrder(unittest.TestCase):
      def setUp(self):
          self.prefix = tempfile.mkdtemp()
-@@ -24,6 +26,7 @@ class TestLinkOrder(unittest.TestCase):
+@@ -24,6 +26,7 @@
      def tearDown(self):
          shutil.rmtree(self.prefix)
  
@@ -34,11 +32,9 @@ Index: conda/tests/test_link_order.py
      @pytest.mark.integration
      def test_link_order_post_link_actions(self):
          stdout, stderr, _ = run_command(Commands.CREATE, self.prefix, "c_post_link_package", "-c", "conda-test")
-Index: conda/tests/test_history.py
-===================================================================
---- conda.orig/tests/test_history.py
-+++ conda/tests/test_history.py
-@@ -9,7 +9,7 @@ from conda.exceptions import CondaUpgrad
+--- a/tests/test_history.py
++++ b/tests/test_history.py
+@@ -9,7 +9,7 @@
  from conda.gateways.disk import mkdir_p
  from .decorators import skip_if_no_mock
  from .helpers import mock, tempdir
@@ -47,7 +43,7 @@ Index: conda/tests/test_history.py
  
  from conda.history import History
  from conda.resolve import MatchSpec
-@@ -44,6 +44,7 @@ class HistoryTestCase(unittest.TestCase)
+@@ -44,6 +44,7 @@
                  with h as h2:
                      self.assertEqual(h, h2)
  
@@ -55,7 +51,7 @@ Index: conda/tests/test_history.py
      @skip_if_no_mock
      def test_empty_history_check_on_empty_env(self):
          with mock.patch.object(History, 'file_is_empty') as mock_file_is_empty:
-@@ -54,6 +55,7 @@ class HistoryTestCase(unittest.TestCase)
+@@ -54,6 +55,7 @@
          self.assertEqual(mock_file_is_empty.call_count, 1)
          assert not h.file_is_empty()
  
@@ -63,16 +59,14 @@ Index: conda/tests/test_history.py
      @skip_if_no_mock
      @auto_inject_fixtures('tmpdir')
      def test_parse_on_empty_env(self):
-Index: conda/tests/test_activate.py
-===================================================================
---- conda.orig/tests/test_activate.py
-+++ conda/tests/test_activate.py
-@@ -33,9 +33,10 @@ from conda.gateways.disk.delete import r
+--- a/tests/test_activate.py
++++ b/tests/test_activate.py
+@@ -33,9 +33,10 @@
  from conda.gateways.disk.update import touch
  import pytest
  from tests.helpers import tempdir
 -from tests.test_create import Commands, run_command
-+#from tests.test_create import Commands, run_command
++from conda.cli.python_api import Commands, run_command
  from conda._vendor.auxlib.decorators import memoize
 -from .test_create import SPACER_CHARACTER
 +#from .test_create import SPACER_CHARACTER
@@ -80,7 +74,7 @@ Index: conda/tests/test_activate.py
  
  try:
      from unittest.mock import patch
-@@ -2032,7 +2033,7 @@ class ShellWrapperIntegrationTests(TestC
+@@ -2032,7 +2033,7 @@
                           "a conda env. They stack envs which means that the"
                           "the original sys.prefix conda env falls off of it."
                          .format(sys.prefix))
@@ -89,11 +83,9 @@ Index: conda/tests/test_activate.py
  
      def tearDown(self):
          rm_rf(self.prefix)
-Index: conda/tests/core/test_package_cache_data.py
-===================================================================
---- conda.orig/tests/core/test_package_cache_data.py
-+++ conda/tests/core/test_package_cache_data.py
-@@ -16,7 +16,6 @@ from conda.gateways.disk.create import c
+--- a/tests/core/test_package_cache_data.py
++++ b/tests/core/test_package_cache_data.py
+@@ -16,7 +16,6 @@
  from conda.gateways.disk.permissions import make_read_only
  from conda.gateways.disk.read import isfile, listdir, yield_lines
  from conda.models.records import PackageRecord
@@ -101,7 +93,7 @@ Index: conda/tests/core/test_package_cache_data.py
  from conda.common.compat import on_win
  import datetime
  
-@@ -82,154 +81,6 @@ def test_ProgressiveFetchExtract_prefers
+@@ -82,154 +81,6 @@
      assert extract_action.source_full_path.endswith('.conda')
  
  
@@ -256,7 +248,7 @@ Index: conda/tests/core/test_package_cache_data.py
  # TODO: need to ask Kale about this one.  I think we don't trigger any sha256 stuff because we go through
  #     the local logic, which only uses md5.  Should this be using sha256, too?  I thought we agreed to
  #     keep sha256 for only doing the download verification from internet sources.
-@@ -252,123 +103,5 @@ def test_conda_pkg_in_pkg_cache_doesnt_o
+@@ -252,123 +103,5 @@
  #         assert isinstance(exc.value.errors[0], ChecksumMismatchError)
  #         assert "expected sha256: 0000000000" in repr(exc.value.errors[0])
  
@@ -380,11 +372,9 @@ Index: conda/tests/core/test_package_cache_data.py
 -        assert zlib_base_fn not in pkgs_dir_files
 -        assert zlib_tar_bz2_fn in pkgs_dir_files
 -        assert zlib_conda_fn in pkgs_dir_files
-Index: conda/tests/test_cli.py
-===================================================================
---- conda.orig/tests/test_cli.py
-+++ conda/tests/test_cli.py
-@@ -143,30 +143,6 @@ class TestJson(unittest.TestCase):
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -143,30 +143,6 @@
          self.assertIsInstance(capture_json_with_argv('conda search ipython --json'), dict)
  
      @pytest.mark.integration
@@ -415,11 +405,9 @@ Index: conda/tests/test_cli.py
      def test_search_4(self):
          self.assertIsInstance(capture_json_with_argv('conda search --json --use-index-cache'), dict)
  
-Index: conda/tests/test_export.py
-===================================================================
---- conda.orig/tests/test_export.py
-+++ conda/tests/test_export.py
-@@ -4,92 +4,3 @@ from unittest import TestCase
+--- a/tests/test_export.py
++++ b/tests/test_export.py
+@@ -4,92 +4,3 @@
  
  from conda.gateways.disk.delete import rm_rf
  import pytest
@@ -512,11 +500,9 @@ Index: conda/tests/test_export.py
 -                assert urls1 == urls2
 -            finally:
 -                rm_rf(env_txt.name)
-Index: conda/tests/test_priority.py
-===================================================================
---- conda.orig/tests/test_priority.py
-+++ conda/tests/test_priority.py
-@@ -7,68 +7,3 @@ import pytest
+--- a/tests/test_priority.py
++++ b/tests/test_priority.py
+@@ -7,68 +7,3 @@
  from conda.base.context import context, conda_tests_ctxt_mgmt_def_pol
  from conda.common.compat import on_win
  from conda.common.io import env_var
@@ -585,10 +571,8 @@ Index: conda/tests/test_priority.py
 -            # python sys.version should show conda-forge python
 -            python_tuple = get_conda_list_tuple(prefix, "python")
 -            assert python_tuple[3] == 'conda-forge'
-Index: conda/tests/cli/test_cli_install.py
-===================================================================
---- conda.orig/tests/cli/test_cli_install.py
-+++ conda/tests/cli/test_cli_install.py
+--- a/tests/cli/test_cli_install.py
++++ b/tests/cli/test_cli_install.py
 @@ -1,6 +1,5 @@
  import tempfile
  from unittest import TestCase
@@ -596,7 +580,7 @@ Index: conda/tests/cli/test_cli_install.py
  
  import pytest
  
-@@ -13,32 +12,3 @@ try:
+@@ -13,32 +12,3 @@
  except ImportError:
      from mock import patch
  


=====================================
debian/patches/support-older-requests.patch
=====================================
@@ -0,0 +1,20 @@
+Author: Diane Trout <diane at ghic.org>
+Description: The requests module that gets installed by Debian has the
+ version string in
+ pip._vendor.requests.__version__.__version__
+ and the version installed by miniconda has the version string in
+ pip._vendor.requests.__version__
+ This means the __version__ on Debian is a module and not a string like
+ their expecting.
+
+--- a/conda/cli/main_info.py
++++ b/conda/cli/main_info.py
+@@ -112,6 +112,8 @@
+     except ImportError:  # pragma: no cover
+         try:
+             from pip._vendor.requests import __version__ as requests_version
++            if isinstance(requests_version, type(sys)):
++                requests_version = requests_version.__version__
+         except Exception as e:  # pragma: no cover
+             requests_version = "Error %r" % e
+     except Exception as e:  # pragma: no cover


=====================================
debian/patches/test-requires-installation.patch
=====================================
@@ -0,0 +1,20 @@
+--- a/tests/test_activate.py
++++ b/tests/test_activate.py
+@@ -2643,6 +2643,7 @@
+         assert original_path == os.environ.get("PATH")
+ 
+     @pytest.mark.skipif(bash_unsupported(), reason=bash_unsupported_because())
++    @pytest.mark.skip(reason="Debian: requires installation")
+     def test_activate_deactivate_modify_path_bash(self):
+         self.activate_deactivate_modify_path("bash")
+ 
+--- a/tests/core/test_initialize.py
++++ b/tests/core/test_initialize.py
+@@ -516,6 +516,7 @@
+         assert python_version == '%d.%d.%d' % sys.version_info[:3]
+         assert site_packages_dir.endswith('dist-packages')
+ 
++    @pytest.mark.skip(reason="Debian: needs installation")
+     def test_install_1(self):
+         with env_vars({'CONDA_DRY_RUN': 'true', 'CONDA_VERBOSITY': '0'}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
+             with tempdir() as conda_temp_prefix:


=====================================
debian/patches/use-new-rumel-yaml-dump.patch
=====================================
@@ -0,0 +1,68 @@
+Author: Diane Trout <diane at ghic.org>
+Description: At some point ruamel.yaml changed it's API and
+ conda was following the older API style. This cause problems
+ where it was losing the comments when updating the configuration
+ file.
+ And there were quite a few warnings due to the use of the old api
+ so I updated to the newer API.
+
+--- a/conda/common/serialize.py
++++ b/conda/common/serialize.py
+@@ -3,6 +3,7 @@
+ # SPDX-License-Identifier: BSD-3-Clause
+ from __future__ import absolute_import, division, print_function, unicode_literals
+ 
++from io import StringIO
+ import json
+ from logging import getLogger
+ 
+@@ -54,7 +55,9 @@
+ 
+ 
+ def yaml_round_trip_load(string):
+-    return yaml.round_trip_load(string, version="1.2")
++    reader = yaml.YAML()
++    reader.version = "1.2"
++    return reader.load(string)
+ 
+ 
+ def yaml_safe_load(string):
+@@ -64,21 +67,31 @@
+         {'key': 'value'}
+ 
+     """
+-    return yaml.safe_load(string, version="1.2")
++    reader = yaml.YAML(typ="safe", pure=True)
++    reader.version = "1.2"
++    return reader.load(string)
+ 
+ 
+ def yaml_round_trip_dump(object):
+     """dump object to string"""
+-    return yaml.round_trip_dump(
+-        object, block_seq_indent=2, default_flow_style=False, indent=2
+-    )
++    writer = yaml.YAML()
++    writer.block_seq_indent = 2
++    writer.default_flow_style = False
++    writer.indent = 2
++    b = StringIO()
++    writer.dump(object, b)
++    return b.getvalue()
+ 
+ 
+ def yaml_safe_dump(object):
+     """dump object to string"""
+-    return yaml.safe_dump(
+-        object, block_seq_indent=2, default_flow_style=False, indent=2
+-    )
++    writer = yaml.YAML(typ="safe", pure=True)
++    writer.block_seq_indent = 2
++    writer.default_flow_style = False
++    writer.indent = 2
++    b = StringIO()
++    writer.dump(object, b)
++    return b.getvalue()
+ 
+ 
+ def json_load(string):


=====================================
debian/patches/use-python3-bin-conda.patch
=====================================
@@ -0,0 +1,8 @@
+--- a/conda/shell/bin/conda
++++ b/conda/shell/bin/conda
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # Copyright (C) 2012 Anaconda, Inc
+ # SPDX-License-Identifier: BSD-3-Clause


=====================================
debian/patches/use-sys-executable.patch
=====================================
@@ -0,0 +1,46 @@
+--- a/tests/core/test_initialize.py
++++ b/tests/core/test_initialize.py
+@@ -427,7 +427,7 @@
+                 assert first_line == 'set -gx CONDA_EXE "%s"' % join(conda_prefix, 'bin', 'conda')
+                 assert second_line == 'set _CONDA_ROOT "%s"' % conda_prefix
+                 assert third_line == 'set _CONDA_EXE "%s"' % join(conda_prefix, 'bin', 'conda')
+-                assert fourth_line == 'set -gx CONDA_PYTHON_EXE "%s"' % join(conda_prefix, 'bin', 'python')
++                assert fourth_line == 'set -gx CONDA_PYTHON_EXE "%s"' % join(sys.executable)
+ 
+             with open(join(CONDA_PACKAGE_ROOT, 'shell', 'etc', 'fish', 'conf.d', 'conda.fish')) as fh:
+                 original_contents = fh.read()
+@@ -476,12 +476,12 @@
+                 assert first_line == 'setenv CONDA_EXE `cygpath %s`' % join(conda_prefix, 'Scripts', 'conda.exe')
+                 assert second_line == 'setenv _CONDA_ROOT `cygpath %s`' % conda_prefix
+                 assert third_line == 'setenv _CONDA_EXE `cygpath %s`' % join(conda_prefix, 'Scripts', 'conda.exe')
+-                assert fourth_line == 'setenv CONDA_PYTHON_EXE `cygpath %s`' % join(conda_prefix, 'python.exe')
++                assert fourth_line == 'setenv CONDA_PYTHON_EXE `cygpath %s`' % join(sys.executable)
+             else:
+                 assert first_line == 'setenv CONDA_EXE "%s"' % join(conda_prefix, 'bin', 'conda')
+                 assert second_line == 'setenv _CONDA_ROOT "%s"' % conda_prefix
+                 assert third_line == 'setenv _CONDA_EXE "%s"' % join(conda_prefix, 'bin', 'conda')
+-                assert fourth_line == 'setenv CONDA_PYTHON_EXE "%s"' % join(conda_prefix, 'bin', 'python')
++                assert fourth_line == 'setenv CONDA_PYTHON_EXE "%s"' % join(sys.executable)
+ 
+             with open(join(CONDA_PACKAGE_ROOT, 'shell', 'etc', 'profile.d', 'conda.csh')) as fh:
+                 original_contents = fh.read()
+--- a/tests/gateways/test_subprocess.py
++++ b/tests/gateways/test_subprocess.py
+@@ -1,4 +1,5 @@
+ from conda.gateways.subprocess import subprocess_call
++import sys
+ 
+ try:
+     from unittest.mock import patch, call
+@@ -10,8 +11,9 @@
+ @patch("sys.stdout", spec=True)
+ def test_subprocess_call_with_live_stream(mock_stdout, mock_stderr):
+     resp = subprocess_call(
+-        ('python -c "import sys, time; sys.stdout.write(\'1\\n\'); '
+-         'sys.stderr.write(\'2\\n\'); time.sleep(.3); sys.stdout.write(\'end\\n\')"'),
++        ('{} -c "import sys, time; sys.stdout.write(\'1\\n\'); '
++         'sys.stderr.write(\'2\\n\'); time.sleep(.3); sys.stdout.write(\'end\\n\')"'.format(
++             sys.executable)),
+         live_stream=True,
+     )
+ 


=====================================
debian/rules
=====================================
@@ -49,7 +49,9 @@ override_dh_auto_install:
 	dh_auto_install
 	for py3ver in $(shell py3versions -s); do \
 	  mv debian/conda/usr/lib/$${py3ver}/dist-packages/test_data \
-	  debian/conda/usr/lib/$${py3ver}/dist-packages/conda/test_data ; done
+	  debian/conda/usr/lib/$${py3ver}/dist-packages/conda/test_data ; \
+	  chmod a+x debian/conda/usr/lib/$${py3ver}/dist-packages/conda/shell/bin/conda ; \
+	done
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
@@ -66,7 +68,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	    tests/conda_env/test_cli.py \
 	    tests/conda_env/test_create.py \
 	    $(CURDIR)/tmp_test_ignore/conda_env
-	CONDA_PKGS_DIRS=/tmp/pkgs dh_auto_test || /bin/true
+	CONDA_PKGS_DIRS=/tmp/pkgs dh_auto_test
 	# restore all tests
 	mv $(CURDIR)/tmp_test_ignore/conda_env/* tests/conda_env
 	rmdir $(CURDIR)/tmp_test_ignore/conda_env


=====================================
debian/tests/run-test
=====================================
@@ -1,4 +1,5 @@
 #!/bin/bash -ex
 
-source /usr/lib/python3/dist-packages/conda/shell/bin/activate
-CONDA_EXE=/usr/lib/python3/dist-packages/conda/shell/bin/conda conda create --name snowflakes biopython
+CONDA_EXE=/usr/lib/python3/dist-packages/conda/shell/bin/conda source /usr/lib/python3/dist-packages/conda/shell/bin/activate
+CONDA_EXE=/usr/lib/python3/dist-packages/conda/shell/bin/conda conda config
+CONDA_EXE=/usr/lib/python3/dist-packages/conda/shell/bin/conda conda help



View it on GitLab: https://salsa.debian.org/med-team/conda/-/compare/27d4e5380513588023678412a3819c11696c2d4b...20d7308826e5fb6939e4e98cdd69f97b136836cd

-- 
View it on GitLab: https://salsa.debian.org/med-team/conda/-/compare/27d4e5380513588023678412a3819c11696c2d4b...20d7308826e5fb6939e4e98cdd69f97b136836cd
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211104/bfa73c67/attachment-0001.htm>


More information about the debian-med-commit mailing list