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

release 0.5.5 breaks requirementslib #58

Open
scarabeusiv opened this issue Jul 23, 2019 · 3 comments
Open

release 0.5.5 breaks requirementslib #58

scarabeusiv opened this issue Jul 23, 2019 · 3 comments

Comments

@scarabeusiv
Copy link

This is exposed by the requirementslib testsuite or in isort:

[  146s] _____________________________ test_pipfile_finder ______________________________
[  146s] 
[  146s] tmpdir = local('/tmp/pytest-of-abuild/pytest-0/test_pipfile_finder0')
[  146s] 
[  146s]     def test_pipfile_finder(tmpdir):
[  146s]         pipfile = tmpdir.join('Pipfile')
[  146s]         pipfile.write(PIPFILE)
[  146s]         si = SortImports(file_contents="")
[  146s]         finder = finders.PipfileFinder(
[  146s]             config=si.config,
[  146s]             sections=si.sections,
[  146s] >           path=str(tmpdir)
[  146s]         )
[  146s] 
[  146s] /home/abuild/rpmbuild/BUILD/isort-4.3.21/test_isort.py:2685: 
[  146s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[  146s] /home/abuild/rpmbuild/BUILD/isort-4.3.21/isort/finders.py:199: in __init__
[  146s]     self.names = self._load_names()
[  146s] /home/abuild/rpmbuild/BUILD/isort-4.3.21/isort/finders.py:221: in _load_names
[  146s]     for name in self._get_names(path):
[  146s] /home/abuild/rpmbuild/BUILD/isort-4.3.21/isort/finders.py:332: in _get_names
[  146s]     for req in project.packages:
[  146s] /usr/lib/python2.7/site-packages/requirementslib/models/pipfile.py:240: in __getattr__
[  146s]     return super(Pipfile, self).__getattribute__(k, *args, **kwargs)
[  146s] /usr/lib/python2.7/site-packages/requirementslib/models/pipfile.py:326: in packages
[  146s]     return self.requirements
[  146s] /usr/lib/python2.7/site-packages/requirementslib/models/pipfile.py:240: in __getattr__
[  146s]     return super(Pipfile, self).__getattribute__(k, *args, **kwargs)
[  146s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[  146s] 
[  146s] self = Pipfile(path=PosixPath('/tmp/pytest-of-abuild/pytest-0/test_pipfile_finder0/Pi...e=None, _pyproject={}, build_system={}, _requirements=[], _dev_requirements=[])
[  146s] 
[  146s]     @property
[  146s]     def requirements(self):
[  146s]         # type: () -> List[Requirement]
[  146s]         if not self._requirements:
[  146s] >           packages = tomlkit_value_to_python(self.pipfile.get("packages", {}))
[  146s] E           AttributeError: 'NoneType' object has no attribute 'get'
[  146s] 
[  146s] /usr/lib/python2.7/site-packages/requirementslib/models/pipfile.py:344: AttributeError

The logic in requirementslib actually looks okayish so I suppose it is an issue inside tomlkit.

@techalchemy
Copy link

I'm in the process of updating requirementslib to handle this issue, I think some of the tomlkit api may have changed but it looks mostly intuitive, I wouldn't worry too much about this

@Secrus
Copy link
Member

Secrus commented Jul 13, 2022

Looks like closing candidate, issue is about python 2.7 and tomlkit no longer supports it.

@SamirPS
Copy link
Contributor

SamirPS commented Aug 8, 2022

This issue is fixed ?

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

4 participants