René's URL Explorer Experiment


Title: [FSSDK-13482] Fix Arnica findings: setup.py exec and http session mount by esrakartalOpt · Pull Request #529 · optimizely/python-sdk · GitHub

Open Graph Title: [FSSDK-13482] Fix Arnica findings: setup.py exec and http session mount by esrakartalOpt · Pull Request #529 · optimizely/python-sdk

X Title: [FSSDK-13482] Fix Arnica findings: setup.py exec and http session mount by esrakartalOpt · Pull Request #529 · optimizely/python-sdk

Description: Summary setup.py: read the package version by parsing the version_info tuple literal from optimizely/version.py (regex plus ast.literal_eval) instead of calling exec() on the file (Arnica "Exec detected" finding). It raises a clear error if version_info is not found. python setup.py --version still prints 5.8.0. Add optimizely/helpers/retry_session.py with create_retry_session(...), and use it in event_dispatcher.py and config_manager.py (two places). This replaces three copies of the same retry session setup, including the session.mount('http://', adapter) call that Arnica flags as "Request session with HTTP", with one documented call. Behavior is unchanged: the same retry adapter is still registered for both https:// and http://, and retries stays Optional[int] as before. The http:// mount is kept on purpose. The SDK defaults are all https://, but users can configure a custom http:// datafile URL or event endpoint (for example an internal proxy or a local test server), and dropping the mount would silently remove retries for them. Registering an adapter does not send anything over http://. The call carries a bare nosemgrep comment, because the full rule id does not fit in the repo's 120 character line limit. If Arnica does not honor it, dismiss the finding there with the reason above. Remove the now-unused requests import from event_dispatcher.py. CI: drop Python 3.9 from the test matrix in python.yml. Python 3.9 reached end of life in October 2025, and setup-python no longer finds a 3.9 build on ubuntu-latest (now Ubuntu 26.04), so test (3.9) failed before running any tests. This was a pre-existing failure on master, not caused by the other changes. Test plan python -m pytest tests: 1047 passed ruff check . and mypy . --exclude "tests/testapp" and mypy . --exclude "tests/" --strict: all pass Added tests/helpers_tests/test_retry_session.py: the helper returns a session with the retry adapter (retries, backoff factor and status codes) on both https:// and http:// python setup.py --version prints 5.8.0, same as optimizely.version.__version__ Issues FSSDK-13482 🤖 Generated with Claude Code

Open Graph Description: Summary setup.py: read the package version by parsing the version_info tuple literal from optimizely/version.py (regex plus ast.literal_eval) instead of calling exec() on the file (Arnica "Ex...

X Description: Summary setup.py: read the package version by parsing the version_info tuple literal from optimizely/version.py (regex plus ast.literal_eval) instead of calling exec() on the file (Arnica &quo...

Opengraph URL: https://github.com/optimizely/python-sdk/pull/529

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b390026e-8a49-9ecd-634b-db939e66e341
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDEF8:3284B6:94BE2C:CC4E01:6B044F88
html-safe-noncea6f5ea4070cf213fb3f88e7829ccb8516d624ec3806deaedc25fb7f096ad52cc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUY4OjMyODRCNjo5NEJFMkM6Q0M0RTAxOjZCMDQ0Rjg4IiwidmlzaXRvcl9pZCI6IjkyMDIzMTk4ODcwODE2ODg5NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4f3d24c6c691a31f9c484d2fb52e930f7117fca7eece00f51178870cdc3442c5
hovercard-subject-tagpull_request:5419344676
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/optimizely/python-sdk/pull/529/files
twitter:imagehttps://avatars.githubusercontent.com/u/102107327?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/102107327?s=400&v=4
og:image:altSummary setup.py: read the package version by parsing the version_info tuple literal from optimizely/version.py (regex plus ast.literal_eval) instead of calling exec() on the file (Arnica "Ex...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/optimizely/python-sdk git https://github.com/optimizely/python-sdk.git
octolytics-dimension-user_id1274132
octolytics-dimension-user_loginoptimizely
octolytics-dimension-repository_id64881795
octolytics-dimension-repository_nwooptimizely/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id64881795
octolytics-dimension-repository_network_root_nwooptimizely/python-sdk
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release059f24c781e3a0d7df3f27a97da0e93fab06ae39
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/optimizely/python-sdk/pull/529/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Foptimizely%2Fpython-sdk%2Fpull%2F529%2Ffiles
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%2Foptimizely%2Fpython-sdk%2Fpull%2F529%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=optimizely%2Fpython-sdk
Reloadhttps://github.com/optimizely/python-sdk/pull/529/files
Reloadhttps://github.com/optimizely/python-sdk/pull/529/files
Reloadhttps://github.com/optimizely/python-sdk/pull/529/files
optimizelyhttps://github.com/optimizely
python-sdkhttps://github.com/optimizely/python-sdk
Codehttps://github.com/optimizely/python-sdk
Issues1 (1)https://github.com/optimizely/python-sdk/issues
Pull requests7 (7)https://github.com/optimizely/python-sdk/pulls
Actionshttps://github.com/optimizely/python-sdk/actions
Projectshttps://github.com/optimizely/python-sdk/projects
Security and qualityhttps://github.com/optimizely/python-sdk/security
Insightshttps://github.com/optimizely/python-sdk/insights
Sign up for GitHub https://github.com/signup?return_to=%2Foptimizely%2Fpython-sdk%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Foptimizely%2Fpython-sdk%2Fissues%2Fnew%2Fchoose
Esra Kartal (esrakartalOpt)https://github.com/esrakartalOpt
masterhttps://github.com/optimizely/python-sdk/tree/master
fssdk-13482-fix-arnica-findingshttps://github.com/optimizely/python-sdk/tree/fssdk-13482-fix-arnica-findings
Conversation 0 https://github.com/optimizely/python-sdk/pull/529
Commits 3 https://github.com/optimizely/python-sdk/pull/529/commits
Checks 14 https://github.com/optimizely/python-sdk/pull/529/checks
Files changed https://github.com/optimizely/python-sdk/pull/529/files
Please reload this pagehttps://github.com/optimizely/python-sdk/pull/529/files
[FSSDK-13482] Fix Arnica findings: setup.py exec and http session mount https://github.com/optimizely/python-sdk/pull/529/files#top
Show all changes 3 commits https://github.com/optimizely/python-sdk/pull/529/files
07cfa9f [FSSDK-13482] Fix Arnica findings: setup.py exec and http session mount esrakartalOpt Nov 20, 2026 https://github.com/optimizely/python-sdk/pull/529/commits/07cfa9f0cd535bcea35a41176242fc40336385fa
cd9fb2f [FSSDK-13482] Fix mypy: allow Optional retries in create_retry_session esrakartalOpt Nov 20, 2026 https://github.com/optimizely/python-sdk/pull/529/commits/cd9fb2f2eab9804e4b212317097b7258d438aab8
86cebbb [FSSDK-13482] Drop Python 3.9 from the CI test matrix esrakartalOpt Nov 20, 2026 https://github.com/optimizely/python-sdk/pull/529/commits/86cebbb2bc520d6e2d2940fa531f9c2098e95d23
Clear filters https://github.com/optimizely/python-sdk/pull/529/files
Please reload this pagehttps://github.com/optimizely/python-sdk/pull/529/files
Please reload this pagehttps://github.com/optimizely/python-sdk/pull/529/files
python.yml https://github.com/optimizely/python-sdk/pull/529/files#diff-092659a9bd0068791326fb1d08f005532e5aeb983b999a7bd32c51deee0a71d5
config_manager.py https://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
event_dispatcher.py https://github.com/optimizely/python-sdk/pull/529/files#diff-5ac5cb854bbaa67c241cf27ef90c8ad1fb21fb9873a9f26c1687c925a97271b2
retry_session.py https://github.com/optimizely/python-sdk/pull/529/files#diff-2ccea9d9b650787d57bf69d94a90ca035c055fd8f85eabbe1a98efd922154470
setup.py https://github.com/optimizely/python-sdk/pull/529/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7
test_retry_session.py https://github.com/optimizely/python-sdk/pull/529/files#diff-8698250c225c0726a19d6d109a401b855dc194fab57e5f7ca431807584e99868
.github/workflows/python.ymlhttps://github.com/optimizely/python-sdk/pull/529/files#diff-092659a9bd0068791326fb1d08f005532e5aeb983b999a7bd32c51deee0a71d5
View file https://github.com/optimizely/python-sdk/blob/86cebbb2bc520d6e2d2940fa531f9c2098e95d23/.github/workflows/python.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/optimizely/python-sdk/pull/529/{{ revealButtonHref }}
https://github.com/optimizely/python-sdk/pull/529/files#diff-092659a9bd0068791326fb1d08f005532e5aeb983b999a7bd32c51deee0a71d5
https://github.com/optimizely/python-sdk/pull/529/files#diff-092659a9bd0068791326fb1d08f005532e5aeb983b999a7bd32c51deee0a71d5
optimizely/config_manager.pyhttps://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
View file https://github.com/optimizely/python-sdk/blob/86cebbb2bc520d6e2d2940fa531f9c2098e95d23/optimizely/config_manager.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/optimizely/python-sdk/pull/529/{{ revealButtonHref }}
https://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
https://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
https://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
https://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
https://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
https://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
https://github.com/optimizely/python-sdk/pull/529/files#diff-ce33771c38124033cd0e4e3f889baa756b2c34a0f0977c121e10af81a7fb43b2
optimizely/event_dispatcher.pyhttps://github.com/optimizely/python-sdk/pull/529/files#diff-5ac5cb854bbaa67c241cf27ef90c8ad1fb21fb9873a9f26c1687c925a97271b2
View file https://github.com/optimizely/python-sdk/blob/86cebbb2bc520d6e2d2940fa531f9c2098e95d23/optimizely/event_dispatcher.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/optimizely/python-sdk/pull/529/{{ revealButtonHref }}
https://github.com/optimizely/python-sdk/pull/529/files#diff-5ac5cb854bbaa67c241cf27ef90c8ad1fb21fb9873a9f26c1687c925a97271b2
https://github.com/optimizely/python-sdk/pull/529/files#diff-5ac5cb854bbaa67c241cf27ef90c8ad1fb21fb9873a9f26c1687c925a97271b2
https://github.com/optimizely/python-sdk/pull/529/files#diff-5ac5cb854bbaa67c241cf27ef90c8ad1fb21fb9873a9f26c1687c925a97271b2
optimizely/helpers/retry_session.pyhttps://github.com/optimizely/python-sdk/pull/529/files#diff-2ccea9d9b650787d57bf69d94a90ca035c055fd8f85eabbe1a98efd922154470
View file https://github.com/optimizely/python-sdk/blob/86cebbb2bc520d6e2d2940fa531f9c2098e95d23/optimizely/helpers/retry_session.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/optimizely/python-sdk/pull/529/{{ revealButtonHref }}
setup.pyhttps://github.com/optimizely/python-sdk/pull/529/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7
View file https://github.com/optimizely/python-sdk/blob/86cebbb2bc520d6e2d2940fa531f9c2098e95d23/setup.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/optimizely/python-sdk/pull/529/{{ revealButtonHref }}
https://github.com/optimizely/python-sdk/pull/529/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7
tests/helpers_tests/test_retry_session.pyhttps://github.com/optimizely/python-sdk/pull/529/files#diff-8698250c225c0726a19d6d109a401b855dc194fab57e5f7ca431807584e99868
View file https://github.com/optimizely/python-sdk/blob/86cebbb2bc520d6e2d2940fa531f9c2098e95d23/tests/helpers_tests/test_retry_session.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/optimizely/python-sdk/pull/529/{{ revealButtonHref }}
Please reload this pagehttps://github.com/optimizely/python-sdk/pull/529/files
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.