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

Broken safety in release 2022.11.23 #5491

Closed
rofafor opened this issue Nov 23, 2022 · 5 comments
Closed

Broken safety in release 2022.11.23 #5491

rofafor opened this issue Nov 23, 2022 · 5 comments
Labels
PR: merged The PR related to this issue has been merged. Type: Bug 🐛 This issue is a bug.

Comments

@rofafor
Copy link

rofafor commented Nov 23, 2022

Issue description

Bundled safety is missing VERSION file:
https://github.com/pypa/pipenv/actions/runs/3532314366/jobs/5926514290#step:8:725
https://github.com/pypa/pipenv/blob/v2022.11.23/pipenv/patched/safety/__init__.py

Expected result

pipenv check works without errors

Actual result

% pipenv --version
pipenv, version 2022.11.23

% pipenv check
Traceback (most recent call last):
  File "/xxx/bin/pipenv", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/cli/options.py", line 57, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/xxx/lib/python3.11/site-packages/pipenv/cli/command.py", line 510, in check
    do_check(
  File "/xxx/lib/python3.11/site-packages/pipenv/core.py", line 2985, in do_check
    from pipenv.patched.safety.cli import cli
  File "/xxx/lib/python3.11/site-packages/pipenv/patched/safety/__init__.py", line 10, in <module>
    with open(os.path.join(ROOT, 'VERSION')) as version_file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/xxx/lib/python3.11/site-packages/pipenv/patched/safety/VERSION'

Steps to replicate

Install and run check command

@matteius
Copy link
Member

matteius commented Nov 23, 2022

@rofafor The file is checked in already -- I am not sure what would cause it to not be included in the wheel?
https://github.com/pypa/pipenv/blob/v2022.11.23/pipenv/patched/safety/VERSION

The command definitely works when pipenv is installed editable.

@rofafor
Copy link
Author

rofafor commented Nov 23, 2022

@yeisonvargasf
Copy link
Contributor

Thank you @rofafor; I think the same; the issue is in the package_data.

@matteius could you try to create a wheel locally with the following:

    package_data={
        "": ["LICENSE", "NOTICES"],
        "pipenv.patched.safety": [
            "VERSION",
            "safety-policy-template.yml"
        ],
        "pipenv.patched.pip._vendor.certifi": ["*.pem"],
        "pipenv.patched.pip._vendor.requests": ["*.pem"],
        "pipenv.patched.pip._vendor.distlib._backport": ["sysconfig.cfg"],
        "pipenv.patched.pip._vendor.distlib": [
            "t32.exe",
            "t64.exe",
            "w32.exe",
            "w64.exe",
        ],
    }

@matteius
Copy link
Member

This is fixed in main, expect a follow-up release 2022.11.24 within the next day (unless this Covid booster I got this AM knocks me out), but soon.

@matteius matteius added Type: Bug 🐛 This issue is a bug. PR: merged The PR related to this issue has been merged. and removed triage labels Nov 23, 2022
@matteius
Copy link
Member

Ok sorry about that -- there was still an issue with the wheel not including the rumael vendoring. I just verified that new release 2022.11.25 does in fact include the required ruamel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged The PR related to this issue has been merged. Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants