GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — subprocess.Popen can pass incomplete environment when posix_spawn is used · Issue #113119 · python/cpython Closed Closed Copy link Labels type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:Subprocess created with The reason is that This can be easily reproduced with import subprocess import sys import os name = "PYTHONTESTVAR" value = "testvalue" code = f'import os; print(repr(os.environ.get({name!r})))' os.putenv(name, value) proc = subprocess.run([sys.executable, '-c', code], check=True, stdout=subprocess.PIPE, text=True, close_fds=False) assert proc.stdout.rstrip() == repr(value) os.unsetenv(name) proc = subprocess.run([sys.executable, '-c', code], check=True, stdout=subprocess.PIPE, text=True, close_fds=False) assert proc.stdout.rstrip() == repr(None) I found it when I patched Python with #113118 (on Solaris, but this is pretty platform independent, I think). CPython versions tested on:3.9, 3.11 Operating systems tested on:Other Linked PRsReacted by Gregory P. Smith, qqwqqw689 and Maximilian Knespel Reacted by Jakub Kulík and qqwqqw689 Activity
MetadataMetadataAssigneesLabelstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |