René's URL Explorer Experiment


Title: test_pyrepl doesn't ignore PYTHONSTARTUP · Issue #121271 · python/cpython · GitHub

Open Graph Title: test_pyrepl doesn't ignore PYTHONSTARTUP · Issue #121271 · python/cpython

X Title: test_pyrepl doesn't ignore PYTHONSTARTUP · Issue #121271 · python/cpython

Description: Bug report Bug description: test_pyrepl starts a new Python process in order to test repl output, but it does not correctly isolate the interpreter from user-set environment variables that will affect the output, like PYTHONPATH and PYTH...

Open Graph Description: Bug report Bug description: test_pyrepl starts a new Python process in order to test repl output, but it does not correctly isolate the interpreter from user-set environment variables that will aff...

X Description: Bug report Bug description: test_pyrepl starts a new Python process in order to test repl output, but it does not correctly isolate the interpreter from user-set environment variables that will aff...

Opengraph URL: https://github.com/python/cpython/issues/121271

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_pyrepl doesn't ignore PYTHONSTARTUP","articleBody":"# Bug report\n\n### Bug description:\n\ntest_pyrepl starts a new Python process in order to test repl output, but it does not correctly isolate the interpreter from user-set environment variables that will affect the output, like PYTHONPATH and PYTHONSTARTUP. All other places in the testsuite that run python do so with `-I` or `-E` to avoid this problem.\n\n```\n% cat $PYTHONSTARTUP\n#!/usr/bin/env python\n\nfrom __future__ import division\n\nimport readline\nimport rlcompleter\n\nreadline.parse_and_bind('tab: complete')\n% ./python -m test test_pyrepl -u all\nUsing random seed: 1113277385\n0:00:00 load avg: 0.17 Run 1 test sequentially in a single process\n0:00:00 load avg: 0.17 [1/1] test_pyrepl\ntest test_pyrepl failed -- Traceback (most recent call last):\n  File \"Lib/test/support/__init__.py\", line 2622, in wrapper\n    return func(*args, **kwargs)\n  File \"Lib/test/test_pyrepl/test_pyrepl.py\", line 865, in test_exposed_globals_in_repl\n    self.assertTrue(case1 or case2 or case3 or case4, output)\n    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: False is not true : sorted(dir())\nexit\n\nPython 3.14.0a0 (heads/main-dirty:1dc9a4f6b2, Jul  2 2024, 16:58:02) [GCC 12.2.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\n\n>>>\n>>> s\n>>> so\n>>> sor\n>>> sort\n>>> sorte\n\n>>> sorted\n\n>>> sorted(\n>>> sorted(d\n>>> sorted(di\n>>> sorted(dir\n>>> sorted(dir(\n>>> sorted(dir()\n>>> sorted(dir())\n\n\n['__annotations__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'division', 'readline', 'rlcompleter']\n\n\n>>>\n>>> e\n>>> ex\n\n>>> exi\n>>> exit\n\n\n\ntest_pyrepl failed (1 failure)\n\n== Tests result: FAILURE ==\n\n1 test failed:\n    test_pyrepl\n\nTotal duration: 2.6 sec\nTotal tests: run=117 failures=1 skipped=1\nTotal test files: run=1/1 failed=1\nResult: FAILURE\n\n\n### CPython versions tested on:\n\n3.13, CPython main branch\n\n### Operating systems tested on:\n\nLinux","author":{"url":"https://github.com/Yhg1s","@type":"Person","name":"Yhg1s"},"datePublished":"2024-07-02T15:13:23Z","url":"https://github.com/python/cpython/issues/121271"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:42e17501-f634-b5fc-ec9b-30c4454c8b7f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9A68:323204:1AAD75F:2324BB0:6B021B76
html-safe-nonced32105acdc2f542b2fb91f36dac185019d0eedfe6a19ee7e2b58fd1cf05b803b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTY4OjMyMzIwNDoxQUFENzVGOjIzMjRCQjA6NkIwMjFCNzYiLCJ2aXNpdG9yX2lkIjoiNTcyNzgxOTQ4OTI2MTc4ODAyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac96092ea1e6e719de4c05b8859d84df3a3902c16f60c1618be07569e9f4748816
hovercard-subject-tagissue:2386527494
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/121271/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2373a89980fd2e1146a0a2b37092525f187240f3d2b1e269c45957ab0ce818ad/python/cpython/issues/121271
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2373a89980fd2e1146a0a2b37092525f187240f3d2b1e269c45957ab0ce818ad/python/cpython/issues/121271
og:image:altBug report Bug description: test_pyrepl starts a new Python process in order to test repl output, but it does not correctly isolate the interpreter from user-set environment variables that will aff...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameYhg1s
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/121271#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F121271
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F121271
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/121271
Reloadhttps://github.com/python/cpython/issues/121271
Reloadhttps://github.com/python/cpython/issues/121271
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/121271
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/121271
test_pyrepl doesn't ignore PYTHONSTARTUPhttps://github.com/python/cpython/issues/121271#top
https://github.com/ambv
https://github.com/pablogsal
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/Yhg1s
Yhg1shttps://github.com/Yhg1s
on Jul 2, 2024https://github.com/python/cpython/issues/121271#issue-2386527494
Yhg1shttps://github.com/Yhg1s
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
on Jul 2, 2024https://github.com/python/cpython/issues/121271#event-13367882895
Yhg1shttps://github.com/Yhg1s
ambvhttps://github.com/ambv
pablogsalhttps://github.com/pablogsal
on Jul 2, 2024https://github.com/python/cpython/issues/121271#event-13367883105
https://github.com/skirpichev
skirpichevhttps://github.com/skirpichev
on Jul 2, 2024https://github.com/python/cpython/issues/121271#issuecomment-2203529285
#121259https://github.com/python/cpython/pull/121259
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Jul 8, 2024https://github.com/python/cpython/issues/121271#issuecomment-2213383294
6239d41https://github.com/python/cpython/commit/6239d41527d5977aa5d44e4b894d719bc045860e
vstinnerhttps://github.com/vstinner
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 8, 2024https://github.com/python/cpython/issues/121271#event-13420111740
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/121271
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/121271
ambvhttps://github.com/ambv
pablogsalhttps://github.com/pablogsal
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.