pyupio / dparse

A parser for Python dependency files
MIT License
61 stars 23 forks source link

Local import YAML instead of top level #53

Closed oz123 closed 2 years ago

oz123 commented 2 years ago

Hi! pipenv maintainer here...

We, @matteius and me, are trying to clean up vendored libraries shipped with pipenv. I noticed that YAML is only used to parse conda files. If you merge in this patch, it would allow us to drop this dependency.

You can also make YAML and optional dependency for your users with:

setup(
 name='dparse',
    version='0.5.2a',
    description="A parser for Python dependency files",
    long_description=readme + '\n\n' + history,
   ...
    extras_require={
        'pipenv':  ["pipenv"],
        'conda': ["yaml"],
    }
)

However, I didn't submit a patch for this just to limit the scope of this PR.

Thank you very much.

codecov[bot] commented 2 years ago

Codecov Report

Merging #53 (5a3ad57) into master (a3d9beb) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
+ Coverage   94.78%   94.80%   +0.01%     
==========================================
  Files          11       11              
  Lines         806      808       +2     
==========================================
+ Hits          764      766       +2     
  Misses         42       42              
Impacted Files Coverage Δ
dparse/parser.py 87.68% <100.00%> (ø)
tests/test_dependencies.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a3d9beb...5a3ad57. Read the comment docs.

oz123 commented 2 years ago

Cool! Thanks for merging. Can you also please tag a release?

yeisonvargasf commented 2 years ago

@oz123 Yes, I'll do that this week. I'm waiting to merge some changes from an advisory, and I'll tag and release it.