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

(Pipfile|Lockfile).load does not fail if the schema does not match plette model. #182

Closed
kairichard opened this issue Aug 8, 2019 · 0 comments · Fixed by #193
Closed
Labels
bug Something isn't working in progress

Comments

@kairichard
Copy link

In the docs there is the following example:

from requirementslib import Pipfile
pf = Pipfile.load('/home/hawk/git/pypa-pipenv')

consider a Pipfile that has the name missing from [[source]] which in plette is required https://github.com/sarugaku/plette/blob/master/src/plette/models/sources.py#L14

The pf now is basically unusable because it is allowed to fail silently see https://github.com/sarugaku/requirementslib/blob/master/src/requirementslib/models/pipfile.py#L265 w/o being able to control that behavior.

I have two questions about this:

  • why allow loading when the schema does not match?
  • it this the same validation that is applied by pipenv?
@techalchemy techalchemy added bug Something isn't working in progress labels Nov 23, 2019
techalchemy added a commit that referenced this issue Nov 23, 2019
- Point at new version of `pip-shims`
- Cut functionality over to rely on shimmed functions where possible
  - This includes in particular the resolver and finder access
- Update compatibility of VCS access
- Fixes #191
- Fix now-broken usage of `Link` objects (fixes #190)
- Fix test failures due to changes in the `pyparsing` api (fixes #181)
- Fix `Pipfile` loader by removing now-unneeded validation and relying
  on `plette` (fixes #182, fixes #189)
- Remove `plette` monkeypatches
- Fix failed attempts to call `.lower()` on the `validate_ssl` field in
  the `[[source]]` section of a `Pipfile` by casting it as a string
  (fixes #183)
- Fix failed calls to `Lockfile.as_requirements()` caused by attempting
  to set a property on an `InstallRequirement` that is no longer valid
  (fixes #188)
- Added support for hiding tokens even without separate user/password
  strings when they appear in a URL provided for a package (fixes #192)

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this issue Nov 23, 2019
- Point at new version of `pip-shims`
- Cut functionality over to rely on shimmed functions where possible
  - This includes in particular the resolver and finder access
- Update compatibility of VCS access
- Fixes #191
- Fix now-broken usage of `Link` objects (fixes #190)
- Fix test failures due to changes in the `pyparsing` api (fixes #181)
- Fix `Pipfile` loader by removing now-unneeded validation and relying
  on `plette` (fixes #182, fixes #189)
- Remove `plette` monkeypatches
- Fix failed attempts to call `.lower()` on the `validate_ssl` field in
  the `[[source]]` section of a `Pipfile` by casting it as a string
  (fixes #183)
- Fix failed calls to `Lockfile.as_requirements()` caused by attempting
  to set a property on an `InstallRequirement` that is no longer valid
  (fixes #188)
- Added support for hiding tokens even without separate user/password
  strings when they appear in a URL provided for a package (fixes #192)

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this issue Mar 31, 2020
- Point at new version of `pip-shims`
- Cut functionality over to rely on shimmed functions where possible
  - This includes in particular the resolver and finder access
- Update compatibility of VCS access
- Fixes #191
- Fix now-broken usage of `Link` objects (fixes #190)
- Fix test failures due to changes in the `pyparsing` api (fixes #181)
- Fix `Pipfile` loader by removing now-unneeded validation and relying
  on `plette` (fixes #182, fixes #189)
- Remove `plette` monkeypatches
- Fix failed attempts to call `.lower()` on the `validate_ssl` field in
  the `[[source]]` section of a `Pipfile` by casting it as a string
  (fixes #183)
- Fix failed calls to `Lockfile.as_requirements()` caused by attempting
  to set a property on an `InstallRequirement` that is no longer valid
  (fixes #188)
- Added support for hiding tokens even without separate user/password
  strings when they appear in a URL provided for a package (fixes #192)

Signed-off-by: Dan Ryan <dan@danryan.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants