Title: test_bdb is sensitive to sys.meta_path manipulation · Issue #93951 · python/cpython · GitHub
Open Graph Title: test_bdb is sensitive to sys.meta_path manipulation · Issue #93951 · python/cpython
X Title: test_bdb is sensitive to sys.meta_path manipulation · Issue #93951 · python/cpython
Description: Here's a repro not involving Setuptools showing how test_bdb is sensitive to sys.meta_path manipulation: FROM jaraco/multipy-tox RUN apt install -y libarchive-tools RUN apt install -y build-essential gdb lcov pkg-config libbz2-dev libffi...
Open Graph Description: Here's a repro not involving Setuptools showing how test_bdb is sensitive to sys.meta_path manipulation: FROM jaraco/multipy-tox RUN apt install -y libarchive-tools RUN apt install -y build-essenti...
X Description: Here's a repro not involving Setuptools showing how test_bdb is sensitive to sys.meta_path manipulation: FROM jaraco/multipy-tox RUN apt install -y libarchive-tools RUN apt install -y build-ess...
Opengraph URL: https://github.com/python/cpython/issues/93951
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_bdb is sensitive to sys.meta_path manipulation","articleBody":"Here's a repro not involving Setuptools showing how `test_bdb` is sensitive to `sys.meta_path` manipulation:\r\n\r\n```\r\nFROM jaraco/multipy-tox\r\n\r\nRUN apt install -y libarchive-tools\r\nRUN apt install -y build-essential gdb lcov pkg-config libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev lzma lzma-dev tk-dev uuid-dev zlib1g-dev\r\nRUN wget -O - https://github.com/python/cpython/archive/refs/heads/3.9.zip | bsdtar -xf -\r\nWORKDIR cpython-3.9\r\nRUN sh ./configure --prefix /opt/python\r\nRUN make install\r\nWORKDIR /\r\nRUN /opt/python/bin/python3 -m pip install --upgrade pip\r\nRUN /opt/python/bin/python3 -m pip uninstall -y setuptools\r\nRUN echo \"import sys; sys.meta_path.insert(0, type('NullFinder', (), dict(find_spec=lambda *args: None))())\" \u003e /opt/python/lib/python3.9/site-packages/null-finder.pth\r\nCMD /opt/python/bin/python3 -m test_bdb\r\n```\r\n\r\nIt fails with a similar error:\r\n\r\n```\r\nAssertionError: Wrong event type at expect_set item 2, got 'call'\r\n Expected: ('line', 3, 'tfunc_import')\r\n Got: ('call', 1, '\u003clambda\u003e'), ('quit',),\r\n```\r\n\r\n_Originally posted by @jaraco in https://github.com/python/cpython/issues/91169#issuecomment-1158978878_","author":{"url":"https://github.com/jaraco","@type":"Person","name":"jaraco"},"datePublished":"2022-06-17T15:22:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/93951/cpython/issues/93951"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fe1e903f-c6af-e623-6d56-fede29b42764 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B23C:1F441:19430E:2235ED:696967EB |
| html-safe-nonce | daeee8adcdae0c7b95627c3277da2cc1a1816fe0eea053aa22ff453f5911d14e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjNDOjFGNDQxOjE5NDMwRToyMjM1RUQ6Njk2OTY3RUIiLCJ2aXNpdG9yX2lkIjoiMTk0MDk4NTc2MjUyNTMwODkwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1f3f38c4392372c6b82c858a43ab6341a107e6bcf56e7f3ac0705e70e7dffb18 |
| hovercard-subject-tag | issue:1275160821 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/93951/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e254e9fb99caa58c651c2e1a0877bfc0928c18e10fa31dee279565ab4b99a925/python/cpython/issues/93951 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e254e9fb99caa58c651c2e1a0877bfc0928c18e10fa31dee279565ab4b99a925/python/cpython/issues/93951 |
| og:image:alt | Here's a repro not involving Setuptools showing how test_bdb is sensitive to sys.meta_path manipulation: FROM jaraco/multipy-tox RUN apt install -y libarchive-tools RUN apt install -y build-essenti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jaraco |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width