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

feature: split and install dependencies if a comma-space is in the deps line. #2507

Conversation

robblovell
Copy link

@robblovell robblovell commented Sep 27, 2022

Description

Implementation of feature request: #2506

There are two failed tests, one failure I believe is due to this change, the other I believe to be pre-existing.

I have modified the venv.py file's get_resolved_dependencies() function to split the dependency listed if a comma-space exists in the string. I found that comma's only or spaces only failed around 7 tests and given my unfamiliarity with the codebase, I opted for a more stringent syntax.

I believe that a split on a 'comma only' would be more expected. If someone more familiar with the code might understand why a split on a comma only is problematic and could fix the additional tests, then it should probably be implemented with a split on a comma only.

Giving a list on separate lines is also not supported, but additional work could make that possible.

I have added import copy and used copy.copy to clone the dependency and I am unsure if this is problematic for python 2.7.

I am unsure of backward compatibility issues this might introduce given my unfamiliarity with Tox in general and the code base. Please feel free to critique what I have proposed, alternate solutions would be welcome.

Todo's

TODO: Fix 2 failing tests.
TODO: Multi-line dependency spec
TODO: comma only dependency spec.

Contribution checklist:

(also see CONTRIBUTING.rst for details)

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation
  • added relevant issue keyword
    in message body
  • added news fragment in changelog folder
    • fragment name: <issue number>.<type>.rst for example (588.bugfix.rst)
    • <type> is must be one of bugfix, feature, deprecation, breaking, doc, misc
    • if PR has no issue: consider creating one first or change it to the PR number after creating the PR
    • "sign" fragment with -- by :user:`<your username>`.
    • please, use full sentences with correct case and punctuation, for example:
      Fixed an issue with non-ascii contents in doctest text files -- by :user:`superuser`.
    • also see examples
  • added yourself to CONTRIBUTORS (preserving alphabetical order)

@robblovell robblovell changed the title feature: split and install dependencies if a comma-space is in the de… feature: split and install dependencies if a comma-space is in the deps line. Sep 27, 2022
@robblovell robblovell force-pushed the feature/2506-more-than-one-dependency-scoped-deps branch 2 times, most recently from 96252a2 to b3c7954 Compare September 27, 2022 22:37
@robblovell robblovell force-pushed the feature/2506-more-than-one-dependency-scoped-deps branch from afaa222 to af784ff Compare September 27, 2022 22:38
@robblovell robblovell force-pushed the feature/2506-more-than-one-dependency-scoped-deps branch from 2bd9841 to b72b3b9 Compare September 27, 2022 22:42
Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't thinkl this is backwards compatible.

@jugmac00
Copy link
Member

jugmac00 commented Oct 1, 2022

I don't thinkl this is backwards compatible.

I am a bit confused why you did not close this pr - is there anything the op could to make this backwards compatible or what do you expect to happen now?

If there is nothing to do, let's close this pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants