Commit bbcf7b2b authored by Andreas Tille's avatar Andreas Tille
Browse files

Remove file that should not have been commited

parent 2bfa22ca
Loading
Loading
Loading
Loading
+0 −121
Original line number Diff line number Diff line
FIXME: useless debugging stuff - should be deleted

--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -239,6 +239,7 @@ def make_temp_channel(packages):
 
 def create_temp_location():
     tempdirdir = gettempdir()
+    print("DEBUG: ", tempdirdir)
     dirname = str(uuid4())[:8]
     return join(tempdirdir, dirname)
 
--- a/tests/test_plan.py
+++ b/tests/test_plan.py
@@ -25,8 +25,12 @@ from .decorators import skip_if_no_mock
 from .gateways.disk.test_permissions import tempdir
 from .helpers import captured, get_index_r_1, mock, tempdir
 
-index, r, = get_index_r_1()
-index = index.copy()  # create a shallow copy so this module can mutate state
+try:
+    index, r, = get_index_r_1()
+    index = index.copy()  # create a shallow copy so this module can mutate state
+except:
+    print("DEBUG: something went wrong")
+
 
 try:
     from unittest.mock import patch
@@ -1481,6 +1485,7 @@ def test_pinned_specs():
     specs_2 = tuple(MatchSpec(spec_str, optional=True) for spec_str in specs_str_2)
 
     with tempdir() as td:
+        print("DEBUG", td)
         mkdir_p(join(td, 'conda-meta'))
         with open(join(td, 'conda-meta', 'pinned'), 'w') as fh:
             fh.write("\n".join(specs_str_2))
@@ -1491,6 +1496,7 @@ def test_pinned_specs():
 
     # Test pinned specs conda configuration and pinned specs conda environment file
     with tempdir() as td:
+        print("DEBUG", td)
         mkdir_p(join(td, 'conda-meta'))
         with open(join(td, 'conda-meta', 'pinned'), 'w') as fh:
             fh.write("\n".join(specs_str_1))
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -165,7 +165,11 @@ def get_index_r_1(subdir=context.subdir)
         }
 
     channel = Channel('https://conda.anaconda.org/channel-1/%s' % subdir)
-    sd = SubdirData(channel)
+    sys.stderr.write("DEBUG stderr: %s\n" % channel)
+    try:
+        sd = SubdirData(channel)
+    except:
+        sys.stderr.write("SubdirData FAILED: DEBUG stderr: Subdir: %s\n" % str(sd))
     with env_var("CONDA_ADD_PIP_AS_PYTHON_DEPENDENCY", "false", reset_context):
         sd._process_raw_repodata_str(json.dumps(repodata))
     sd._loaded = True
--- a/conda/core/subdir_data.py
+++ b/conda/core/subdir_data.py
@@ -53,19 +53,24 @@ REPODATA_PICKLE_VERSION = 28
 MAX_REPODATA_VERSION = 1
 REPODATA_HEADER_RE = b'"(_etag|_mod|_cache_control)":[ ]?"(.*?[^\\\\])"[,\}\s]'  # NOQA
 
+import sys
 
 class SubdirDataType(type):
 
     def __call__(cls, channel):
+        sys.stderr.write("DEBUG stderr SubdirDataType: %s\n" % channel.subdir)
         assert channel.subdir
+        sys.stderr.write("DEBUG stderr SubdirDataType: %s\n" % channel.package_filename)
         assert not channel.package_filename
         assert type(channel) is Channel
         cache_key = channel.url(with_credentials=True)
+        sys.stderr.write("DEBUG stderr SubdirDataType: %s\n" % cache_key)
         if not cache_key.startswith('file://') and cache_key in SubdirData._cache_:
             return SubdirData._cache_[cache_key]
 
         subdir_data_instance = super(SubdirDataType, cls).__call__(channel)
         SubdirData._cache_[cache_key] = subdir_data_instance
+        sys.stderr.write("DEBUG stderr SubdirDataType: %s\n" % subdir_data_instance)
         return subdir_data_instance
 
 
@@ -219,6 +224,7 @@ class SubdirData(object):
         except Response304ContentUnchanged:
             log.debug("304 NOT MODIFIED for '%s'. Updating mtime and loading from disk",
                       self.url_w_subdir)
+            sys.stderr.write("conda/core/subdir_data.py _load() DEBUG stderr: self.cache_path_json = %s\n" % self.cache_path_json)
             touch(self.cache_path_json)
             _internal_state = self._read_local_repdata(mod_etag_headers.get('_etag'),
                                                        mod_etag_headers.get('_mod'))
--- a/conda/gateways/disk/update.py
+++ b/conda/gateways/disk/update.py
@@ -88,6 +88,8 @@ def backoff_rename(source_path, destinat
     exp_backoff_fn(rename, source_path, destination_path, force)
 
 
+import sys
+
 def touch(path, mkdir=False, sudo_safe=False):
     # sudo_safe: use any time `path` is within the user's home directory
     # returns:
@@ -96,12 +98,14 @@ def touch(path, mkdir=False, sudo_safe=F
     # raises: NotWritableError, which is also an OSError having attached errno
     try:
         path = expand(path)
+        sys.stderr.write("conda/gateways/disk/update.py touch() FAILED: DEBUG stderr: path = %s\n" % path)
         log.trace("touching path %s", path)
         if lexists(path):
             os.utime(path, None)
             return True
         else:
             dirpath = dirname(path)
+            sys.stderr.write("conda/gateways/disk/update.py touch() FAILED: DEBUG stderr: dirname = %s\n" % dirname)
             if not isdir(dirpath) and mkdir:
                 if sudo_safe:
                     mkdir_p_sudo_safe(dirpath)