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

updated python versiions in CI #1663

Merged
merged 7 commits into from
Mar 13, 2023
Merged

updated python versiions in CI #1663

merged 7 commits into from
Mar 13, 2023

Conversation

auvipy
Copy link
Member

@auvipy auvipy commented Mar 12, 2023

No description provided.

@auvipy auvipy added this to the 5.3 milestone Mar 12, 2023
@auvipy
Copy link
Member Author

auvipy commented Mar 12, 2023

=================================== FAILURES ===================================
_______________________________ test_entrypoints _______________________________

def test_entrypoints():
    with patch(
        'kombu.utils.compat.importlib_metadata.entry_points', create=True

Restoring 2 unacknowledged message(s)
) as iterep:
eps = [Mock(), Mock()]
iterep.return_value = {'kombu.test': eps}

      assert list(entrypoints('kombu.test'))

t/unit/utils/test_compat.py:21:


.0 = <dict_keyiterator object at 0x7f14ea0351c0>

return (
  (ep, ep.load())
    for ep in entry_points
)

E AttributeError: 'str' object has no attribute 'load'

kombu/utils/compat.py:92: AttributeError
=============================== warnings summary ===============================
.tox/3.10-linux-unit/lib/python3.10/site-packages/coverage/inorout.py:460
/home/runner/work/kombu/kombu/.tox/3.10-linux-unit/lib/python3.10/site-packages/coverage/inorout.py:460: CoverageWarning: --include is ignored because --source is set (include-ignored)
self.warn("--include is ignored because --source is set", slug="include-ignored")

t/unit/transport/virtual/test_base.py::test_Channel::test_lookup__undeliverable
/home/runner/work/kombu/kombu/.tox/3.10-linux-unit/lib/python3.10/site-packages/_pytest/fixtures.py:917: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
t/unit/transport/virtual/test_base.py::test_Channel::test_lookup__undeliverable is using nose-specific method: teardown(self)
To remove this warning, rename it to teardown_method(self)
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
next(it)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] t/unit/transport/test_etcd.py:10: could not import 'etcd': No module named 'etcd'
SKIPPED [1] t/unit/transport/test_librabbitmq.py:7: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] t/unit/test_connection.py:117: TODO: urllib cannot parse ipv6 urls
SKIPPED [1] t/unit/transport/test_pyro.py:30: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:67: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:89: requires running Pyro nameserver and Kombu Broker
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
=========== 1 failed, 1008 passed, 170 skipped, 2 warnings in 24.03s ======

@auvipy
Copy link
Member Author

auvipy commented Mar 12, 2023

@jaraco sorry for ping! it would be very helpful if you suggest to fix this test assertion! I am not that much familiar with this API's [entry point]

@jaraco
Copy link
Contributor

jaraco commented Mar 12, 2023

I'd be happy to help, but I'm a little confused. Does the assertion happen only on this pull request? I guess so. It's apparently due to the introduction of Python 3.10 to the test suite. I'll take a look.

@auvipy
Copy link
Member Author

auvipy commented Mar 12, 2023

yes it's python 3.10+ only

@jaraco
Copy link
Contributor

jaraco commented Mar 12, 2023

I'm struggling to run the tests. Here's an error I get when running the tests:

 kombu main $ tox -r -e 3.10-unit
ROOT: will run in automatically provisioned tox, host /Users/jaraco/.local/pipx/venvs/tox/bin/python is missing [requires (has)]: tox-docker>=3.0
ROOT: remove tox env folder /Users/jaraco/draft/kombu/.tox/.tox
ROOT: install_deps> python -m pip --disable-pip-version-check install tox 'tox-docker>=3.0'
ROOT: provision> .tox/.tox/bin/python -m tox -r -e 3.10-unit
.pkg: remove tox env folder /Users/jaraco/draft/kombu/.tox/.pkg
3.10-unit: install_deps> python -m pip --disable-pip-version-check install -r /Users/jaraco/draft/kombu/requirements/dev.txt -r /Users/jaraco/draft/kombu/requirements/default.txt -r /Users/jaraco/draft/kombu/requirements/test.txt
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: _optional_hooks> python /Users/jaraco/draft/kombu/.tox/.tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /Users/jaraco/draft/kombu/.tox/.tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /Users/jaraco/draft/kombu/.tox/.tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /Users/jaraco/draft/kombu/.tox/.tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
3.10-unit: install_package_deps> python -m pip --disable-pip-version-check install 'amqp<6.0.0,>=5.1.1' 'cached-property; python_version < "3.8"' 'importlib-metadata>=3.6; python_version < "3.8"' 'typing-extensions; python_version < "3.10"' vine
3.10-unit: install_package> python -m pip --disable-pip-version-check install --force-reinstall --no-deps /Users/jaraco/draft/kombu/.tox/.tmp/package/4/kombu-5.3.0b2.tar.gz
3.10-unit: commands[0]> python -bb -m pytest -rxs -xv --cov=kombu --cov-report=xml --no-cov-on-fail
ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: --cov=kombu --cov-report=xml --no-cov-on-fail
  inifile: /Users/jaraco/draft/kombu/setup.cfg
  rootdir: /Users/jaraco/draft/kombu

3.10-unit: exit 4 (0.22 seconds) /Users/jaraco/draft/kombu> python -bb -m pytest -rxs -xv --cov=kombu --cov-report=xml --no-cov-on-fail pid=48101
.pkg: _exit> python /Users/jaraco/draft/kombu/.tox/.tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  3.10-unit: FAIL code 4 (7.46=setup[7.24]+cmd[0.22] seconds)
  evaluation failed :( (7.89 seconds)

It looks like pytest-cov isn't getting installed.

Aha. Running with -e 3.10-unit-linux seems to pull in the test-ci.txt and other reqs.

@jaraco
Copy link
Contributor

jaraco commented Mar 12, 2023

The problem is that the test suite is mocking importlib_metadata and not returning the interface supplied by Python 3.10's importlib.metadata.entry_points:

(Pdb) entry_points
{'kombu.test': [<Mock id='4397536912'>, <Mock id='4397536864'>]}

@jaraco
Copy link
Contributor

jaraco commented Mar 12, 2023

This entry points test, because it's mocking the functionality of entry_points, is not actually that good of a test. It is checking that the implementation does what it claims to do, but it's not actually testing the underlying expected behavior. I'll send a PR to fix the failing test.

jaraco added a commit to jaraco/kombu that referenced this pull request Mar 12, 2023
jaraco added a commit to jaraco/kombu that referenced this pull request Mar 12, 2023
auvipy pushed a commit that referenced this pull request Mar 12, 2023
@auvipy
Copy link
Member Author

auvipy commented Mar 12, 2023

need to get rid of pytest freezgun wiith https://github.com/pytest-dev/pytest-freezer,, as that is failing with python 3.11

.github/workflows/ci.yaml Outdated Show resolved Hide resolved
@auvipy auvipy marked this pull request as ready for review March 12, 2023 16:48
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants