Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: import importlib.metadata not importlib_metadata whenever available #5818

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

yarikoptic
Copy link
Member

Bug introduced by myself in #5669 ,
which forbids building debian package on systems with python3 >= 3.8
where we do not (as should not) require importlib_metadata backport.

Bug introduced by myself in datalad#5669 ,
which forbids building debian package on systems with python3 >= 3.8
where we do not (as should not) require importlib_metadata backport.
@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #5818 (8eeda3b) into maint (08f6de4) will decrease coverage by 60.69%.
The diff coverage is n/a.

❗ Current head 8eeda3b differs from pull request most recent head bf9dd5f. Consider uploading reports for the commit bf9dd5f to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##            maint    #5818       +/-   ##
===========================================
- Coverage   90.24%   29.55%   -60.70%     
===========================================
  Files         300      297        -3     
  Lines       42353    42317       -36     
===========================================
- Hits        38223    12506    -25717     
- Misses       4130    29811    +25681     
Impacted Files Coverage Δ
datalad/tests/test_api.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/support/digests.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_base.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_config.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/ui/tests/__init__.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test__main__.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_strings.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/ui/tests/test_base.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/support/tests/utils.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/tests/test_testrepos.py 0.00% <0.00%> (-100.00%) ⬇️
... and 246 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08f6de4...bf9dd5f. Read the comment docs.

@adswa
Copy link
Member

adswa commented Jul 26, 2021

The travis failure is maybe a connection issue?

2021-07-23T20:31:17+0000 [INFO    ] datalad_installer Extra args: None

2021-07-23T20:31:17+0000 [INFO    ] datalad_installer Running: /tmp/dl-miniconda-74pbsfkg/bin/conda install -q -c conda-forge -y git-annex=8.20201007
Collecting package metadata (current_repodata.json): ...working... failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
    Traceback (most recent call last):
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/urllib3/response.py", line 438, in _error_catcher
        yield
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/urllib3/response.py", line 764, in read_chunked
        self._update_chunk_length()
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/urllib3/response.py", line 694, in _update_chunk_length
        line = self._fp.fp.readline()
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/socket.py", line 704, in readinto
        return self._sock.recv_into(b)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/ssl.py", line 1241, in recv_into
        return self.read(nbytes, buffer)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/ssl.py", line 1099, in read
        return self._sslobj.read(len, buffer)
    ConnectionResetError: [Errno 104] Connection reset by peer
    

    During handling of the above exception, another exception occurred:  

    Traceback (most recent call last):
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/requests/models.py", line 753, in generate
        for chunk in self.raw.stream(chunk_size, decode_content=True):
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/urllib3/response.py", line 572, in stream
        for line in self.read_chunked(amt, decode_content=decode_content):
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/urllib3/response.py", line 793, in read_chunked
        self._original_response.close()
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/contextlib.py", line 135, in __exit__
        self.gen.throw(type, value, traceback)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/urllib3/response.py", line 455, in _error_catcher
        raise ProtocolError("Connection broken: %r" % e, e)
    urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))
    

    During handling of the above exception, another exception occurred:
   
    Traceback (most recent call last):
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/exceptions.py", line 1079, in __call__
        return func(*args, **kwargs)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/cli/main.py", line 84, in _main
        exit_code = do_call(args, p)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/cli/conda_argparse.py", line 83, in do_call
        return getattr(module, func_name)(args, parser)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/cli/main_install.py", line 20, in execute
        install(args, parser, 'install')
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/cli/install.py", line 261, in install
        unlink_link_transaction = solver.solve_for_transaction(
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/solve.py", line 114, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/solve.py", line 157, in solve_for_diff
        final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/solve.py", line 262, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/common/io.py", line 88, in decorated
        return f(*args, **kwds)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/solve.py", line 425, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/solve.py", line 1020, in _prepare
        reduced_index = get_reduced_index(self.prefix, self.channels,
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/index.py", line 288, in get_reduced_index
        new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/subdir_data.py", line 140, in query_all
        result = tuple(concat(executor.map(subdir_query, channel_urls)))
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/concurrent/futures/_base.py", line 608, in result_iterator
        yield fs.pop().result()
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/concurrent/futures/_base.py", line 445, in result
        return self.__get_result()
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
        raise self._exception
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/concurrent/futures/thread.py", line 52, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/subdir_data.py", line 132, in <lambda>
        subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/subdir_data.py", line 145, in query
        self.load()
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/subdir_data.py", line 210, in load
        _internal_state = self._load()
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/subdir_data.py", line 375, in _load
        raw_repodata_str = fetch_repodata_remote_request(
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/conda/core/subdir_data.py", line 701, in fetch_repodata_remote_request
        resp = session.get(join_url(url, filename), headers=headers, proxies=session.proxies,
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
        return self.request('GET', url, **kwargs)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
        resp = self.send(prep, **send_kwargs)
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/requests/sessions.py", line 697, in send
        r.content
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/requests/models.py", line 831, in content
        self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
      File "/tmp/dl-miniconda-74pbsfkg/lib/python3.9/site-packages/requests/models.py", line 756, in generate
        raise ChunkedEncodingError(e)
    requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))

`$ /tmp/dl-miniconda-74pbsfkg/bin/conda install -q -c conda-forge -y git-annex=8.20201007`

  environment variables:
                 CIO_TEST=<not set>
               CONDA_ROOT=/tmp/dl-miniconda-74pbsfkg
           CURL_CA_BUNDLE=<not set>
                 GEM_PATH=/home/travis/.rvm/gems/ruby-2.5.3:/home/travis/.rvm/gems/ruby-2.5.3@global
                   GOPATH=/home/travis/gopath
                  MANPATH=/home/travis/.nvm/versions/node/v10.24.1/share/man:/home/travis/.rvm/rubies/ruby-2.5.3/share/man:/usr/local/cmake-3.12.4/man:/usr/local/clan
                          g-7.0.0/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man:/
                          home/travis/.rvm/man
                     PATH=/home/travis/virtualenv/python3.6.7/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v10.24.1/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.
linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin
     PYTHON_CFLAGS=-g -fstack-protector --param=ssp-buffer-size=4 -Wformat  -Werror=format-security
    PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs4 --with-wide-unicode --enable-shared --enable- ipv6 --enable-loadable-sqlite-extensions --with-computed-gotos
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
         TRAVIS_APT_PROXY=<set>
             rvm_bin_path=/home/travis/.rvm/bin
                 rvm_path=/home/travis/.rvm
     active environment : None
       user config file : /home/travis/.condarc
 populated config files : 
          conda version : 4.10.3
    conda-build version : not installed

         python version : 3.9.5.final.0

       virtual packages : __linux=4.15.0=0

                          __glibc=2.23=0

                          __unix=0=0

                          __archspec=1=x86_64

       base environment : /tmp/dl-miniconda-74pbsfkg  (writable)

      conda av data dir : /tmp/dl-miniconda-74pbsfkg/etc/conda

  conda av metadata url : None

           channel URLs : https://conda.anaconda.org/conda-forge/linux-64

                          https://conda.anaconda.org/conda-forge/noarch

                          https://repo.anaconda.com/pkgs/main/linux-64

                          https://repo.anaconda.com/pkgs/main/noarch

                          https://repo.anaconda.com/pkgs/r/linux-64

                          https://repo.anaconda.com/pkgs/r/noarch

          package cache : /tmp/dl-miniconda-74pbsfkg/pkgs

                          /home/travis/.conda/pkgs

       envs directories : /tmp/dl-miniconda-74pbsfkg/envs

                          /home/travis/.conda/envs

               platform : linux-64

             user-agent : conda/4.10.3 requests/2.25.1 CPython/3.9.5 Linux/4.15.0-1077-gcp ubuntu/16.04.5 glibc/2.23

                UID:GID : 2000:2000

             netrc file : None

           offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

Upload successful.

Traceback (most recent call last):

  File "/home/travis/virtualenv/python3.6.7/bin/datalad-installer", line 8, in <module>

    sys.exit(main())

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/datalad_installer.py", line 2139, in main

    return manager.main(argv)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/datalad_installer.py", line 671, in main

    self.addcomponent(name=cr.name, **cr.kwargs)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/datalad_installer.py", line 720, in addcomponent

    component(self).provide(**kwargs)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/datalad_installer.py", line 1110, in provide

    bins = self.get_installer(method).install(self.NAME, **kwargs)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/datalad_installer.py", line 1196, in install

    bindir = self.install_package(package, **kwargs)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/datalad_installer.py", line 1653, in install_package

    runcmd(*cmd)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/datalad_installer.py", line 2031, in runcmd

    return subprocess.run(arglist, check=True, **kwargs)

  File "/opt/python/3.6.7/lib/python3.6/subprocess.py", line 418, in run

    output=stdout, stderr=stderr)

subprocess.CalledProcessError: Command '['/tmp/dl-miniconda-74pbsfkg/bin/conda', 'install', '-q', '-c', 'conda-forge', '-y', 'git-annex=8.20201007']' returned non-zero exit status 1.

The command "eval datalad-installer --sudo ok -E new.env ${_DL_ANNEX_INSTALL_SCENARIO}" failed and exited with 1 during .

@yarikoptic yarikoptic added the semver-internal Changes only affect the internal API label Jul 26, 2021
@yarikoptic
Copy link
Member Author

thank you @adswa . yeap, for those installation issues filed datalad/datalad-installer#81, so hopefully @jwodder would mitigate them at datalad-installer level. Let's proceed

@yarikoptic yarikoptic merged commit ddd6c2a into datalad:maint Jul 26, 2021
@yarikoptic yarikoptic deleted the bf-importlib_metadata branch October 8, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-internal Changes only affect the internal API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants