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

CEKit Incompatibility with Packaging 22.0 #830

Closed
lampajr opened this issue Dec 15, 2022 · 0 comments · Fixed by #831
Closed

CEKit Incompatibility with Packaging 22.0 #830

lampajr opened this issue Dec 15, 2022 · 0 comments · Fixed by #831
Labels
status/review Sheduled for a review type/bug

Comments

@lampajr
Copy link
Contributor

lampajr commented Dec 15, 2022

Describe the bug

Cekit tool seems to be incompatible with newer 22.x version of packaging.

Running cekit with packaging version 22.x keep throwing the following error:

    from packaging.version import LegacyVersion
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/packaging/version.py)

This incompatibility was introduced with new 22.0 version of packaging [1] due to:

Remove LegacySpecifier and LegacyVersion (issue:`407`)

[1] https://github.com/pypa/packaging/blob/main/CHANGELOG.rst#220---2022-12-07

To reproduce

Install latest version of packaging:

pip install packaging==22.0

Run cekit command, for instance:

cekit --verbose --redhat build docker

Expected behavior
The command should work and the build should start.

Logs

2022-12-15 10:57:59,942 cli.py:422        DEBUG Running version 4.4.0
2022-12-15 10:57:59,942 cli.py:435        DEBUG Configuring CEKit...
2022-12-15 10:57:59,942 tools.py:453        INFO  You are running on known platform: Fedora Linux 36 (Workstation Edition)
2022-12-15 10:57:59,943 builder.py:22         DEBUG Checking CEKit core dependencies...
2022-12-15 10:57:59,943 tools.py:509        DEBUG Checking if 'git' dependency is provided...
2022-12-15 10:57:59,943 tools.py:569        DEBUG CEKit dependency 'git' provided via the '/usr/bin/git' executable.
2022-12-15 10:57:59,943 tools.py:544        DEBUG All dependencies provided!
2022-12-15 10:57:59,943 tools.py:605        WARNING The certifi library (https://certifi.io/) was found, depending on the operating system configuration this may result in certificate validation issues
2022-12-15 10:57:59,943 tools.py:611        WARNING Certificate Authority (CA) bundle in use: '/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/certifi/cacert.pem'
Traceback (most recent call last):
  File "/home/alampare/miniconda3/envs/cekit-4.4/bin/cekit", line 8, in <module>
    sys.exit(cli())
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/cekit/cli.py", line 273, in build_osbs
    run_build(ctx, "osbs")
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/cekit/cli.py", line 402, in run_build
    run_command(ctx, builder_impl)
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/cekit/cli.py", line 366, in run_command
    Cekit(params).run(clazz)
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/cekit/cli.py", line 468, in run
    command.execute()
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/cekit/builder.py", line 55, in execute
    self.prepare()
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/cekit/builder.py", line 85, in prepare
    from cekit.generator.osbs import OSBSGenerator as generator_impl
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/cekit/generator/osbs.py", line 22, in <module>
    from cekit.generator.base import Generator
  File "/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/cekit/generator/base.py", line 14, in <module>
    from packaging.version import LegacyVersion
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/home/alampare/miniconda3/envs/cekit-4.4/lib/python3.10/site-packages/packaging/version.py)

Environment information:

  • Operating system
  • CEKit version: issue reproduced with both 4.x and 3.x versions, in particular used 4.4.0 and 3.13.0

Additional context
Add any other context about the problem here.

@lampajr lampajr added status/review Sheduled for a review type/bug labels Dec 15, 2022
@lampajr lampajr changed the title Cekit Incompatibility with Packaging 22.0 CEKit Incompatibility with Packaging 22.0 Dec 15, 2022
@rnc rnc closed this as completed in #831 Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/review Sheduled for a review type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant