Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905226 - dev-python/pipenv-2022.12.19: ebuild sed command contains typo, "ruaml" instead of "ruamel"
Summary: dev-python/pipenv-2022.12.19: ebuild sed command contains typo, "ruaml" inste...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OzTiram
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-28 10:30 UTC by dave.eckold
Modified: 2023-05-13 07:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixed ebuild (pipenv-2022.12.19-r1.ebuild,4.26 KB, text/plain)
2023-04-28 10:32 UTC, dave.eckold
Details
patch (pipenv-2022.12.19.patch,1.29 KB, patch)
2023-05-02 08:21 UTC, dave.eckold
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dave.eckold 2023-04-28 10:30:45 UTC
The ebuild for pipenv contains the following sed command in lines 98-100:

```
# remove python ruaml yaml
	sed --in-place -e "s/from pipenv\.vendor\.ruamel\.yaml import YAML/from ruaml\.yaml import YAML/g" pipenv/patched/safety/util.py || die "Failed sed in ruaml-yaml"
	sed --in-place -e "s/from pipenv\.vendor\.ruamel\.yaml\.error import MarkedYAMLError/from ruaml\.yaml\.error import MarkedYAMLError/g" pipenv/patched/safety/util.py || die "Failed sed in ruamel-yaml"
```

This command inserts a `from ruaml...` statement, but the package is `ruamel`, leading to a "No module named ruaml" error when running the pipenv check command.



Reproducible: Always

Steps to Reproduce:
1.run pipenv check
2.
3.
Actual Results:  
$ pipenv check
Checking PEP 508 requirements...
Passed!
Checking installed packages for vulnerabilities...
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/pipenv", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pipenv/cli/options.py", line 57, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pipenv/cli/command.py", line 510, in check
    do_check(
  File "/usr/lib/python3.11/site-packages/pipenv/core.py", line 3018, in do_check
    from pipenv.patched.safety.cli import cli
  File "/usr/lib/python3.11/site-packages/pipenv/patched/safety/cli.py", line 12, in <module>
    from pipenv.patched.safety import safety
  File "/usr/lib/python3.11/site-packages/pipenv/patched/safety/safety.py", line 21, in <module>
    from .util import RequirementFile, read_requirements, Package, build_telemetry_data, sync_safety_context, SafetyContext, \
  File "/usr/lib/python3.11/site-packages/pipenv/patched/safety/util.py", line 17, in <module>
    from ruaml.yaml import YAML
ModuleNotFoundError: No module named 'ruaml'

Expected Results:  
$ pipenv check
Checking PEP 508 requirements...
Passed!
Checking installed packages for vulnerabilities...
+=================================================================================================================================+ 

                               /$$$$$$            /$$
                              /$$__  $$          | $$
           /$$$$$$$  /$$$$$$ | $$  \__//$$$$$$  /$$$$$$   /$$   /$$
          /$$_____/ |____  $$| $$$$   /$$__  $$|_  $$_/  | $$  | $$
         |  $$$$$$   /$$$$$$$| $$_/  | $$$$$$$$  | $$    | $$  | $$
          \____  $$ /$$__  $$| $$    | $$_____/  | $$ /$$| $$  | $$
          /$$$$$$$/|  $$$$$$$| $$    |  $$$$$$$  |  $$$$/|  $$$$$$$
         |_______/  \_______/|__/     \_______/   \___/   \____  $$
                                                          /$$  | $$
                                                         |  $$$$$$/
  by pyup.io                                              \______/

+=================================================================================================================================+ 

 REPORT 

  Safety v2.3.2 is scanning for Vulnerabilities...
  Scanning dependencies in your files:

  -> /tmp/scratch-2FaiAiZL_r8o0r7c_requirements.txt

  Found and scanned 47 packages
  Timestamp 2023-04-28 11:27:38
  0 vulnerabilities found
  0 vulnerabilities ignored
+=================================================================================================================================+ 

 No known security vulnerabilities found. 

+=================================================================================================================================
Comment 1 dave.eckold 2023-04-28 10:32:31 UTC
Created attachment 860881 [details]
Fixed ebuild

Changing the sed commands to replace the typo with `ruamel` fixes pipenv check.
Comment 2 dave.eckold 2023-05-02 08:21:41 UTC
Created attachment 861032 [details, diff]
patch

Fixed ebuild but in the form of a patch.
Comment 3 OzTiram 2023-05-04 09:02:53 UTC
This should be fixed by:
https://github.com/gentoo/gentoo/pull/30866
Comment 4 Joonas Niilola gentoo-dev 2023-05-13 07:29:14 UTC
b49ac8b31d3d99cad724b7ca4d756de8373d3740