Some tests fail because of wrong rights on /foo
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: openSUSE/Tumbleweed (Linux)
-
Poetry version: 1.0.0b8
Issue
Plenty of tests fail because of the traceback similar to this one (from ):
[ 88s] ____________________________ test_add_no_constraint ____________________________
[ 88s]
[ 88s] app = <tests.console.conftest.Application object at 0x7fd532dff4a8>
[ 88s] repo = <tests.console.conftest.Repository object at 0x7fd532b587b8>
[ 88s] installer = <poetry.installation.noop_installer.NoopInstaller object at 0x7fd532bc1470>
[ 88s]
[ 88s] def test_add_no_constraint(app, repo, installer):
[ 88s] command = app.find("add")
[ 88s] tester = CommandTester(command)
[ 88s]
[ 88s] repo.add_package(get_package("cachy", "0.1.0"))
[ 88s] repo.add_package(get_package("cachy", "0.2.0"))
[ 88s]
[ 88s] > tester.execute("cachy")
[ 88s]
[ 88s] tests/console/commands/test_add.py:19:
[ 88s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 88s] /usr/lib/python3.7/site-packages/cleo/testers/command_tester.py:61: in execute
[ 88s] self._status_code = command.run(args, self._io)
[ 88s] /usr/lib/python3.7/site-packages/clikit/api/command/command.py:116: in run
[ 88s] return self.handle(self.parse(args), io)
[ 88s] /usr/lib/python3.7/site-packages/clikit/api/command/command.py:120: in handle
[ 88s] status_code = self._do_handle(args, io)
[ 88s] /usr/lib/python3.7/site-packages/clikit/api/command/command.py:163: in _do_handle
[ 88s] self._dispatcher.dispatch(PRE_HANDLE, event)
[ 88s] /usr/lib/python3.7/site-packages/clikit/api/event/event_dispatcher.py:22: in dispatch
[ 88s] self._do_dispatch(listeners, event_name, event)
[ 88s] /usr/lib/python3.7/site-packages/clikit/api/event/event_dispatcher.py:89: in _do_dispatch
[ 88s] listener(event, event_name, self)
[ 88s] poetry/console/config/application_config.py:86: in set_env
[ 88s] env = env_manager.create_venv(io)
[ 88s] poetry/utils/env.py:587: in create_venv
[ 88s] self.build_venv(str(venv), executable=executable)
[ 88s] poetry/utils/env.py:647: in build_venv
[ 88s] build(path)
[ 88s] /usr/lib64/python3.7/venv/__init__.py:60: in create
[ 88s] context = self.ensure_directories(env_dir)
[ 88s] /usr/lib64/python3.7/venv/__init__.py:107: in ensure_directories
[ 88s] create_if_needed(env_dir)
[ 88s] /usr/lib64/python3.7/venv/__init__.py:96: in create_if_needed
[ 88s] os.makedirs(d)
[ 88s] /usr/lib64/python3.7/os.py:211: in makedirs
[ 88s] makedirs(head, exist_ok=exist_ok)
[ 88s] /usr/lib64/python3.7/os.py:211: in makedirs
[ 88s] makedirs(head, exist_ok=exist_ok)
[ 88s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 88s]
[ 88s] name = '/foo', mode = 511, exist_ok = False
[ 88s]
[ 88s] def makedirs(name, mode=0o777, exist_ok=False):
[ 88s] """makedirs(name [, mode=0o777][, exist_ok=False])
[ 88s]
[ 88s] Super-mkdir; create a leaf directory and all intermediate ones. Works like
[ 88s] mkdir, except that any intermediate path segment (not just the rightmost)
[ 88s] will be created if it does not exist. If the target directory already
[ 88s] exists, raise an OSError if exist_ok is False. Otherwise no exception is
[ 88s] raised. This is recursive.
[ 88s]
[ 88s] """
[ 88s] head, tail = path.split(name)
[ 88s] if not tail:
[ 88s] head, tail = path.split(head)
[ 88s] if head and tail and not path.exists(head):
[ 88s] try:
[ 88s] makedirs(head, exist_ok=exist_ok)
[ 88s] except FileExistsError:
[ 88s] # Defeats race condition when another thread created the path
[ 88s] pass
[ 88s] cdir = curdir
[ 88s] if isinstance(tail, bytes):
[ 88s] cdir = bytes(curdir, 'ASCII')
[ 88s] if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists
[ 88s] return
[ 88s] try:
[ 88s] > mkdir(name, mode)
[ 88s] E PermissionError: [Errno 13] Permission denied: '/foo'
[ 88s]
[ 88s] /usr/lib64/python3.7/os.py:221: PermissionError
Issue Analytics
- State:
- Created 4 years ago
- Comments:52 (12 by maintainers)
Top Results From Across the Web
Warning: Food Allergy Blood Tests Sometimes Unreliable
“The differences we saw in sensitivity and accuracy are clearly a red flag because reliance on results may lead to a wrong diagnosis,”...
Read more >The myth of IgG food panel testing | AAAAI
This test, offered by various companies, reports IgG levels to multiple foods (usually 90 to 100 foods with a single panel test) claiming...
Read more >The Flaws and Human Harms of Animal Experimentation - NCBI
The main causes of failure are lack of effectiveness and safety problems that were not predicted by animal tests.
Read more >10 Dangerous Food Safety Mistakes | CDC
Protect your family from food poisoning by avoiding these common food safety mistakes.
Read more >Skin Prick Tests - FoodAllergy.org
SPTs seldom produce “false negatives” (erroneous results indicating that you are not allergic to a food, even though you really are). Negative results...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From the package maintainers’ point of view running the test suite using the system interpreter (and not in the virtual environment) is exactly what you want to do. This way you can test whether the software behaves correctly under the exact Python version that is currently packaged with all needed dependencies (that often have some downstream patches).
Eli by using arguments like
--system-site-packages
and--without-pip
is effectively trying to create a virtual environment that behaves like there was none.Why is this bug report closed just because some unrelated bug mentioned 6 comments in happens to be resolved?
The error seems to have moved around a bit, but I still cannot package poetry due to: