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

Certain PEP 440 version specifiers are evaluated by the shell #6

Closed
trinitronx opened this issue Aug 10, 2023 · 0 comments
Closed

Certain PEP 440 version specifiers are evaluated by the shell #6

trinitronx opened this issue Aug 10, 2023 · 0 comments

Comments

@trinitronx
Copy link
Contributor

When passing tox-version or tox-gh-actions-version, certain PEP 440 version specifiers will cause unintended behavior:

  • >= specifier causes shell redirection:

    $ python -m pip install tox>=3 tox-gh-actions
    $ ls -l 
    total 92
    -rw-r--r-- 1 exampleuser exampleuser  2306 Aug 10 03:23 '=3'   <<- Accidental STDOUT redirected to file
    -rw-r--r-- 1 exampleuser exampleuser  6596 Aug 10 01:06  CONTRIBUTING.md
    -rw-r--r-- 1 exampleuser exampleuser 34563 Aug  8 20:04  LICENSE.md
    -rw-r--r-- 1 exampleuser exampleuser  4344 Aug 10 02:45  pyproject.toml
    [...SNIP...]
    
    $ cat '=3'
    
    Expand for cat '=3' file contents (pip output)

      Collecting tox
        Obtaining dependency information for tox from https://files.pythonhosted.org/packages/74/d4/72eae1bb8b99658e527b35c95a2068b4e78ee591db4353fbae918c1c2f6e/tox-4.7.0-py3-none-any.whl.metadata
        Using cached tox-4.7.0-py3-none-any.whl.metadata (5.1 kB)
      Collecting tox-gh-actions
        Obtaining dependency information for tox-gh-actions from https://files.pythonhosted.org/packages/25/7a/bf58404d3d1e566fac4d1cc3c3db67ee4193847da07a46c914b9447e31cd/tox_gh_actions-3.1.3-py2.py3-none-any.whl.metadata
        Using cached tox_gh_actions-3.1.3-py2.py3-none-any.whl.metadata (11 kB)
      Requirement already satisfied: cachetools>=5.3.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (5.3.1)
      Requirement already satisfied: chardet>=5.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (5.2.0)
      Requirement already satisfied: colorama>=0.4.6 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (0.4.6)
      Requirement already satisfied: filelock>=3.12.2 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (3.12.2)
      Requirement already satisfied: packaging>=23.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (23.1)
      Requirement already satisfied: platformdirs>=3.9.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (3.10.0)
      Requirement already satisfied: pluggy>=1.2 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (1.2.0)
      Requirement already satisfied: pyproject-api>=1.5.3 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (1.5.3)
      Requirement already satisfied: virtualenv>=20.24.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (20.24.2)
      Requirement already satisfied: distlib<1,>=0.3.7 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from virtualenv>=20.24.1->tox) (0.3.7)
      Using cached tox-4.7.0-py3-none-any.whl (152 kB)
      Using cached tox_gh_actions-3.1.3-py2.py3-none-any.whl (9.8 kB)
      Installing collected packages: tox, tox-gh-actions
      Successfully installed tox-4.7.0 tox-gh-actions-3.      Collecting tox
        Obtaining dependency information for tox from https://files.pythonhosted.org/packages/74/d4/72eae1bb8b99658e527b35c95a2068b4e78ee591db4353fbae918c1c2f6e/tox-4.7.0-py3-none-any.whl.metadata
        Using cached tox-4.7.0-py3-none-any.whl.metadata (5.1 kB)
      Collecting tox-gh-actions
        Obtaining dependency information for tox-gh-actions from https://files.pythonhosted.org/packages/25/7a/bf58404d3d1e566fac4d1cc3c3db67ee4193847da07a46c914b9447e31cd/tox_gh_actions-3.1.3-py2.py3-none-any.whl.metadata
        Using cached tox_gh_actions-3.1.3-py2.py3-none-any.whl.metadata (11 kB)
      Requirement already satisfied: cachetools>=5.3.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (5.3.1)
      Requirement already satisfied: chardet>=5.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (5.2.0)
      Requirement already satisfied: colorama>=0.4.6 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (0.4.6)
      Requirement already satisfied: filelock>=3.12.2 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (3.12.2)
      Requirement already satisfied: packaging>=23.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (23.1)
      Requirement already satisfied: platformdirs>=3.9.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (3.10.0)
      Requirement already satisfied: pluggy>=1.2 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (1.2.0)
      Requirement already satisfied: pyproject-api>=1.5.3 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (1.5.3)
      Requirement already satisfied: virtualenv>=20.24.1 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from tox) (20.24.2)
      Requirement already satisfied: distlib<1,>=0.3.7 in /home/exampleuser/.virtualenvs/waybar-check-gmail/lib/python3.11/site-packages (from virtualenv>=20.24.1->tox) (0.3.7)
      Using cached tox-4.7.0-py3-none-any.whl (152 kB)
      Using cached tox_gh_actions-3.1.3-py2.py3-none-any.whl (9.8 kB)
      Installing collected packages: tox, tox-gh-actions
      Successfully installed tox-4.7.0 tox-gh-actions-3.1.31.3
    

The issue seems to be caused by missing quotes for the shell command here

trinitronx added a commit to LyraPhase/waybar-check-gmail that referenced this issue Aug 10, 2023
@ymyzk ymyzk closed this as completed in b2f02ff Aug 17, 2023
ymyzk added a commit that referenced this issue Aug 17, 2023
Fix pip install shell quoting - fixes #6
trinitronx added a commit to LyraPhase/waybar-check-gmail that referenced this issue Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant