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

Passa lock fails due to KeyError #67

Open
frostming opened this issue Sep 30, 2019 · 1 comment
Open

Passa lock fails due to KeyError #67

frostming opened this issue Sep 30, 2019 · 1 comment

Comments

@frostming
Copy link
Member

Run passa lock on the add_test_frost branch.

Traceback (most recent call last):
  File "C:\Users\frostming\.virtualenvs\passa-ZPGQzv6O\Scripts\passa-script.py", line 11, in <module>
    load_entry_point('passa', 'console_scripts', 'passa')()
  File "d:\workspace\passa\src\passa\cli\__init__.py", line 47, in main
    result = f(options)
  File "d:\workspace\passa\src\passa\cli\lock.py", line 14, in run
    return lock(project=options.project)
  File "d:\workspace\passa\src\passa\actions\lock.py", line 12, in lock
    success = lock(locker)
  File "d:\workspace\passa\src\passa\operations\lock.py", line 13, in lock
    locker.lock()
  File "d:\workspace\passa\src\passa\models\lockers.py", line 158, in lock
    provider.collected_requires_pythons,
  File "d:\workspace\passa\src\passa\models\metadata.py", line 210, in set_metadata
    dependencies, pythons, copy.deepcopy(traces),
  File "d:\workspace\passa\src\passa\models\metadata.py", line 161, in _calculate_metasets_mapping
    dependencies, pythons, key, trace, all_metasets,
  File "d:\workspace\passa\src\passa\models\metadata.py", line 140, in _build_metasets
    python = pythons[key]
KeyError: 'plette[validation]'
@frostming
Copy link
Member Author

def strip_extras(requirement):
# type: (Requirement) -> Requirement
"""Returns a new requirement object with extras removed.
"""
line = requirement.as_line()
new = type(requirement).from_line(line)
new.extras = None
return new

This is because Requirement.from_line() hits the LRU cache and didn't create a new instance, which results in unexpectedly stripping the extras from the original requirement.

frostming pushed a commit that referenced this issue Sep 30, 2019
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

No branches or pull requests

1 participant