Closed s-weigand closed 2 years ago
This isn't a bug with setup-cfg-fmt but a bug in all python versions< 3.9 or released before 2021-12-16. If the requirement uses an URL for example
setup-cfg-fmt
qtsass@https://github.com/spyder-ide/qtsass/archive/refs/heads/master.zip ;python_version >= '3.10'
It needs a space before the ; or it will cause a parsing error
;
InvalidRequirement: Parse error at "">= '3.10"": Expected string_end
This makes setup-cfg-fmt unusable for projects which have to use an URL in their requirements.
https://github.com/asottile/setup-cfg-fmt/blob/d3e358c2db3d8e480b207a098ade06ee2381e3f5/setup_cfg_fmt.py#L236
This change should fix the issue.
- return f'{normalized};{envs}' + return f'{normalized} ;{envs}'
Since nearly all python versions are affected it would be nice if setup-cfg-fmt would implement this workaround.
urls aren't intended to be supported (they kinda break the packaging system) so I'd rather leave this "as intended"
This isn't a bug with
setup-cfg-fmt
but a bug in all python versions< 3.9 or released before 2021-12-16. If the requirement uses an URL for exampleIt needs a space before the
;
or it will cause a parsing errorThis makes
setup-cfg-fmt
unusable for projects which have to use an URL in their requirements.https://github.com/asottile/setup-cfg-fmt/blob/d3e358c2db3d8e480b207a098ade06ee2381e3f5/setup_cfg_fmt.py#L236
This change should fix the issue.
Since nearly all python versions are affected it would be nice if
setup-cfg-fmt
would implement this workaround.