sonatype-nexus-community/jake

[BUG] PyYAML is somehow hardcoded to PyYAML<6.0.0,>=5.4.1

DmytroLitvinov opened this issue ยท 7 comments

Describe the bug
I have requirements.in and requirements-dev.in files where I track my dependencies via pip-tools.
I added jake into requirements-dev.in file and when I tried to compile requirements via pip-compile --upgrade && pip-compile requirements-dev.in -o requirements-dev.txt --upgrade I got next error:

Could not find a version that matches pyyaml<6.0.0,==6.0,>=5.1,>=5.4.1 (from -r requirements.txt (line 611))
Tried: 3.10, 3.10, 3.11, 3.11, 3.12, 3.12, 3.13, 5.1, 5.1.1, 5.1.2, 5.2, 5.3, 5.3.1, 5.4, 5.4, 5.4.1, 5.4.1, 6.0, 6.0
Skipped pre-versions: 3.13b1, 3.13rc1, 4.2b1, 4.2b2, 4.2b4, 5.1b1, 5.1b3, 5.1b5, 5.2b1, 5.3b1, 5.4b1, 5.4b1, 5.4b2, 5.4b2, 6.0b1, 6.0b1
There are incompatible versions in the resolved dependencies:
pyyaml==6.0 (from -r requirements.txt (line 611))
PyYAML<6.0.0,>=5.4.1 (from jake==1.1.3->-r requirements-dev.in (line 21))
PyYAML>=5.1 (from uvicorn[standard]==0.15.0->-r requirements.txt (line 728))
pyyaml>=5.1 (from pre-commit==2.15.0->-r requirements-dev.in (line 16))

Expected behavior
The PyYAML version 6.0 should be installed.

Desktop (please complete the following information):

  • OS: Ubuntu v20
  • Python Version: 3.8.10
  • Version 1.1.3

Sounds like this is expected behaviour.
Could we upgrade the required version of PyYAML?

Hi @DmytroLitvinov - thanks for the report. We've actually opened #73 to cover loosening how we've declared our dependencies which should make jake more consumable.

We'll cover this in #73.

Hi @DmytroLitvinov - we've just published jake v1.2.2 which I hope resolves your issue. Could you kindly confirm?

Hi @madpah ,

Yes, it works, but I have another problem when I tried to run jake ddt CLI command.
Should I create a new issue for that or you can answer here?

Here is a traceback of issue:

 ~/data/work/SoftFormance/gryps-project โ”‚ on master !1 โ–“โ–’โ–‘ jake ddt                                                                                                                  โ–‘โ–’โ–“ โœ” โ”‚ gryps-project ๎˜ผ  โ”‚ 2.6.6 ๎ก‡  โ”‚ at 12:55:03 
                   ___           ___           ___     
       ___        /  /\         /  /\         /  /\    
      /__/\      /  /::\       /  /:/        /  /::\   
      \__\:\    /  /:/\:\     /  /:/        /  /:/\:\  
  ___ /  /::\  /  /::\ \:\   /  /::\____   /  /::\ \:\ 
 /__/\  /:/\/ /__/:/\:\_\:\ /__/:/\:::::\ /__/:/\:\ \:\
 \  \:\/:/~~  \__\/  \:\/:/ \__\/~|:|~~~~ \  \:\ \:\_\/
  \  \::/          \__\::/     |  |:|      \  \:\ \:\  
   \__\/           /  /:/      |  |:|       \  \:\_\/  
                  /__/:/       |__|:|        \  \:\    
                  \__\/         \__\|         \__\/    

                                                  
            /)                     /)             
        _/_(/    _     _  __   _  (/_   _         
 o   o  (__/ )__(/_   /_)_/ (_(_(_/(___(/_ o   o  
                                                  
                                                  

Jake Version: 1.2.2
Put your Python dependencies in a chokehold

๐Ÿ Collected 335 packages from your environment โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 100% -:--:--
Querying OSS Index for details on your packages โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”  30% -:--:--
Sanity checking...                              โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”   0% -:--:--
Traceback (most recent call last):
  File "/home/dmytro/.virtualenvs/gryps-project/bin/jake", line 8, in <module>
    sys.exit(main())
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/jake/app.py", line 124, in main
    JakeCmd().execute()
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/jake/app.py", line 70, in execute
    exit_code: int = command.execute(arguments=self._arguments)
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/jake/command/__init__.py", line 33, in execute
    return self.handle_args()
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/jake/command/oss.py", line 76, in handle_args
    oss_index_results = oss.get_component_report(
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/ossindex/ossindex.py", line 59, in get_component_report
    return self._get_results(packages=packages)
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/ossindex/ossindex.py", line 146, in _get_results
    results = results + self._make_oss_index_component_report_call(packages=chunk)
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/ossindex/ossindex.py", line 163, in _make_oss_index_component_report_call
    self._upsert_cache_with_oss_index_responses(oss_components=results)
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/ossindex/ossindex.py", line 187, in _upsert_cache_with_oss_index_responses
    self._cache_database.update({
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/tinydb/table.py", line 369, in update
    self._update_table(updater)
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/tinydb/table.py", line 709, in _update_table
    updater(table)
  File "/home/dmytro/.virtualenvs/gryps-project/lib/python3.8/site-packages/tinydb/table.py", line 361, in updater
    if _cond(table[doc_id]):
TypeError: 'int' object is not callable

@DmytroLitvinov this looks like an issue with the database tinydb that is used to cache responses from OSS Index.

Can you try adding the flag --clear-cache which will avoid the caching and see if that helps?

@madpah , thanks. It works right now.

Raised a separate issue to track the bugginess of OSS Index response caching.