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 12 commits into from Dec 26, 2022

Override toxworkdir with --workdir. #2776

merged 12 commits into from Dec 26, 2022


Copy link

@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/ 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 ="c", "-k", "toxworkdir", "--core", "--workdir", work_dir_flag)
Copy link

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
Copy link
Contributor Author

q0w commented Dec 26, 2022

Can we use the primary key for this instead?


Copy link
Contributor Author

q0w commented Dec 26, 2022

@gaborbernat should work_dir end with .tox?

Copy link

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

src/tox/config/ 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/ Outdated Show resolved Hide resolved
@gaborbernat gaborbernat merged commit bf87bea into tox-dev:main Dec 26, 2022
26 checks passed
@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]( | dev | patch | `4.0.16` ->
`4.0.17` | `4.2.6` (+12) |


### Release Notes


### [`v4.0.17`](


#### What's Changed

- Suppress a report output when verbosity = 0. by
[@&#8203;q0w]( in
- Fix --sdistonly behaviour by [@&#8203;q0w](
- Override toxworkdir with --workdir. by
[@&#8203;q0w]( in

#### New Contributors

- [@&#8203;q0w]( made their first contribution

**Full Changelog**:



### 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


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


Co-authored-by: descope[bot] <descope[bot]>
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\\", line 45, in _evaluate
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\", line 248, in setup
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\python\\", line 106, in _setup_env
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\python\\", line 198, in _setup_env
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\python\\", line 205, in ensure_python_env
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\tox\\tox_env\\python\\virtual_env\\", line 129, in create_python_env
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\run\\", line 42, in run
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\run\\", line 49, in _create
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\create\\", line 153, in run
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\create\\via_global_ref\\builtin\\", line 89, in create, self.symlinks)
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\create\\via_global_ref\\builtin\\", line 151, in run
    method(self.src, dest)
  File "D:\\jenkins\\workspace\\pyscaffoldext-mything_master\\.tox\\test-windows\\lib\\site-packages\\virtualenv\\util\\path\\", 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\\", line 23, in ensure_safe_to_do
  File "C:\\Python38\\lib\\", line 1324, in unlink
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
None yet

Successfully merging this pull request may close these issues.

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