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

Override toxworkdir with --workdir. #2776

Merged
merged 12 commits into from Dec 26, 2022
Merged

Override toxworkdir with --workdir. #2776

merged 12 commits into from Dec 26, 2022

Conversation

q0w
Copy link
Contributor

@q0w q0w commented Dec 26, 2022

Thanks for contribution

Closes #2654
Please, make sure you address all the checklists (for details on how see
development documentation)!

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

tests/config/test_sets.py Outdated Show resolved Hide resolved
def test_config_work_dir(tox_project: ToxProjectCreator) -> None:
project = tox_project({"tox.ini": "[tox]\ntoxworkdir=/tmp/foo"})
work_dir_flag = "a"
result = project.run("c", "-k", "toxworkdir", "--core", "--workdir", work_dir_flag)
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the primary key for this instead?

@q0w q0w marked this pull request as draft December 26, 2022 02:24
@q0w
Copy link
Contributor Author

q0w commented Dec 26, 2022

Can we use the primary key for this instead?

how?

@q0w
Copy link
Contributor Author

q0w commented Dec 26, 2022

@gaborbernat should work_dir end with .tox?

@gaborbernat
Copy link
Member

Only by default, if the user sets a dir we should use that.

src/tox/config/sets.py Outdated Show resolved Hide resolved
@q0w q0w marked this pull request as ready for review December 26, 2022 03:01
@q0w q0w requested a review from gaborbernat December 26, 2022 03:02
tests/config/test_sets.py Outdated Show resolved Hide resolved
@gaborbernat gaborbernat merged commit bf87bea into tox-dev:main Dec 26, 2022
@q0w q0w deleted the 2654 branch December 26, 2022 09:48
descope bot added a commit to descope/django-descope that referenced this pull request Jan 9, 2023
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [tox](https://togithub.com/tox-dev/tox) | dev | patch | `4.0.16` ->
`4.0.17` | `4.2.6` (+12) |

---

### Release Notes

<details>
<summary>tox-dev/tox</summary>

### [`v4.0.17`](https://togithub.com/tox-dev/tox/releases/tag/4.0.17)

[Compare
Source](https://togithub.com/tox-dev/tox/compare/4.0.16...4.0.17)

#### What's Changed

- Suppress a report output when verbosity = 0. by
[@&#8203;q0w](https://togithub.com/q0w) in
[tox-dev/tox#2774
- Fix --sdistonly behaviour by [@&#8203;q0w](https://togithub.com/q0w)
in
[tox-dev/tox#2775
- Override toxworkdir with --workdir. by
[@&#8203;q0w](https://togithub.com/q0w) in
[tox-dev/tox#2776

#### New Contributors

- [@&#8203;q0w](https://togithub.com/q0w) made their first contribution
in
[tox-dev/tox#2774

**Full Changelog**:
tox-dev/tox@4.0.16...4.0.17

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC43NC4wIiwidXBkYXRlZEluVmVyIjoiMzQuNzQuMCJ9-->

Co-authored-by: descope[bot] <descope[bot]@users.noreply.github.com>
@markferry
Copy link

markferry commented Jan 18, 2023

I'm not sure how yet but bf87bea reliably breaks our pyscaffoldext-custom-extension using Jenkins on Windows (python 3.8).

I bisected tox all the way back between 4.0.16 (which was good) and latest.
No code changed and no python deps changed apart from tox.

tmpfolder = WindowsPath('C:/Users/zSvcbuildmaster01/AppData/Local/Temp/pytest-of-unknown/pytest-99/test_generated_extension0/tmpqbuyf27f')

...
Error while running command:
['D:\\\\jenkins\\\\workspace\\\\pyscaffoldext-mything_master\\\\.tox\\\\test-windows\\\\Scripts\\\\python.EXE', '-m', 'tox']
{'stderr': -2, 'universal_newlines': True}

test-windows: internal error
Traceback (most recent call last):
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\session\\cmd\\run\\single.py", line 45, in _evaluate
    tox_env.setup()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\api.py", line 248, in setup
    self._setup_env()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\python\\runner.py", line 106, in _setup_env
    super()._setup_env()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\python\\api.py", line 198, in _setup_env
    self.ensure_python_env()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\python\\api.py", line 205, in ensure_python_env
    self.create_python_env()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\python\\virtual_env\\api.py", line 129, in create_python_env
    self.session.run()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\run\\session.py", line 42, in run
    self._create()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\run\\session.py", line 49, in _create
    self.creator.run()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\create\\creator.py", line 153, in run
    self.create()
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\create\\via_global_ref\\builtin\\via_global_self_do.py", line 89, in create
    src.run(self, self.symlinks)
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\create\\via_global_ref\\builtin\\ref.py", line 151, in run
    method(self.src, dest)
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\util\\path\\_sync.py", line 33, in copy
    ensure_safe_to_do(src, dest)
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\util\\path\\_sync.py", line 23, in ensure_safe_to_do
    dest.unlink()
  File "C:\\Python38\\lib\\pathlib.py", line 1324, in unlink
    self._accessor.unlink(self)
PermissionError: [WinError 5] Access is denied: 'D:\\\\jenkins\\\\workspace\\\\pyscaffoldext-mything_master\\\\.tox\\\\test-windows\\\\Scripts\\\\python.exe'
test-windows: FAIL ! in 0.3 seconds

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.

--workdir override not working in tox >=4
3 participants