feature: split and install dependencies if a comma-space is in the deps line. #2507
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)
in message body
<issue number>.<type>.rst
for example (588.bugfix.rst)<type>
is must be one ofbugfix
,feature
,deprecation
,breaking
,doc
,misc
-- by :user:`<your username>`.
CONTRIBUTORS
(preserving alphabetical order)