weixin_39678304
2021-01-07 14:28 阅读 1

Change venv_metadata_inspector to support venv python 3.5+

Changed some syntax in venv_metadata_inspector.py and to support python 3.5+ * Used type comment instead of inline type * Used .format() instead of f-string

Changed help/docs to reflect that venvs support python 3.5+ (not python 3.3+)

Reference: #231

该提问来源于开源项目:pipxproject/pipx

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

6条回答 默认 最新

  • weixin_40004659 weixin_40004659 2021-01-07 14:28

    Can we add python 3.5 to the ci to validate this change?

    点赞 评论 复制链接分享
  • weixin_39678304 weixin_39678304 2021-01-07 14:28

    That's a little bit tricky since pipx itself will run python 3.6+, even though it can create venvs that are python 3.5+.

    点赞 评论 复制链接分享
  • weixin_39907131 weixin_39907131 2021-01-07 14:28

    Can we add python 3.5 to the ci to validate this change?

    We'd need to have two versions of python installed. One for pipx (3.6+) and one for 3.5. Agreed that it is a little tricky.

    We could make a specific test in nox that tests this and only runs something like

    
    pipx install pycowsay --python python3.5
    

    Another easier way to test this with only 3.5 would be to just run venv_metadata_inspector.py and assert that no syntax errors were encountered. It wouldn't be an end-to-end test, but I think it would provide decent coverage if doing the two version test is too difficult.

    fyi if you add a specific keyword followed by an issue number in a pull request, the issue will be automatically closed. It makes the workflow a little easier if you are closing issues out with PRs frequently. https://help.github.com/en/articles/closing-issues-using-keywords#about-issue-references

    点赞 评论 复制链接分享
  • weixin_39678304 weixin_39678304 2021-01-07 14:28

    Sounds good.

    Fixes #231

    点赞 评论 复制链接分享
  • weixin_39907131 weixin_39907131 2021-01-07 14:28

    I added a unit test to install a package with python3.5 if it's available, and to skip it if it's not.

    Based on the output in travis, there are no s's, which means nothing was skipped, which means python3.5 is available in the 3.6/3.7 linux builds (but not Windows). :tada:

    点赞 评论 复制链接分享
  • weixin_39907131 weixin_39907131 2021-01-07 14:28

    Good stuff , merging!

    点赞 评论 复制链接分享

相关推荐