René's URL Explorer Experiment


Title: RequestsHTTPTransport does not set headers on session like AIOHTTPTransport does · Issue #613 · graphql-python/gql · GitHub

Open Graph Title: RequestsHTTPTransport does not set headers on session like AIOHTTPTransport does · Issue #613 · graphql-python/gql

X Title: RequestsHTTPTransport does not set headers on session like AIOHTTPTransport does · Issue #613 · graphql-python/gql

Description: Describe the bug When creating a transport = RequestsHTTPTransport with specific headers, transport.session.headers doesn't match what was given to the constructor (and is in transport.headers`) This is at odd with the behaviour of AIOHT...

Open Graph Description: Describe the bug When creating a transport = RequestsHTTPTransport with specific headers, transport.session.headers doesn't match what was given to the constructor (and is in transport.headers`) Th...

X Description: Describe the bug When creating a transport = RequestsHTTPTransport with specific headers, transport.session.headers doesn't match what was given to the constructor (and is in transport.headers`...

Opengraph URL: https://github.com/graphql-python/gql/issues/613

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RequestsHTTPTransport does not set headers on session like AIOHTTPTransport does","articleBody":"**Describe the bug**\nWhen creating a `transport = RequestsHTTPTransport` with specific headers, `transport.session.headers` doesn't match what was given to the constructor (`and is in `transport.headers`)\n\nThis is at odd with the behaviour of `AIOHTTPTransport`, where we get `transport.session.headers == transport.headers`\n\n**To Reproduce**\nSteps to reproduce the behavior:\n\n```\nimport pytest\n\nfrom gql.transport.requests import RequestsHTTPTransport\nfrom gql.transport.aiohttp import AIOHTTPTransport\n\n@pytest.mark.asyncio\nasync def test_aio_http_transport_session():\n    transport = AIOHTTPTransport(\"url\", headers={\"test\": \"header\"})\n    await transport.connect()\n    assert transport.headers == transport.session.headers\n\n\ndef test_requests_http_transport_session():\n    transport = RequestsHTTPTransport(\"url\", headers={\"test\": \"header\"})\n    transport.connect()\n    assert transport.headers == transport.session.headers\n```\n\n```\n$ uv run pytest -k test_gql -v                130 ↵   ✹ ✭ issue202/rest-client-headers\n================================================= test session starts =================================================\nplatform linux -- Python 3.12.11, pytest-9.1.1, pluggy-1.6.0 -- /home/shtrom/work/simple-github/.venv/bin/python3\ncachedir: .pytest_cache\nrootdir: /home/shtrom/work/simple-github\nconfigfile: pyproject.toml\nplugins: anyio-4.14.2, responses-0.6.0, aioresponses-0.3.0, mock-3.15.1, asyncio-1.4.0\nasyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function\ncollected 34 items / 32 deselected / 2 selected\n\ntest/test_gql.py::test_aio_http_transport_session PASSED                                                        [ 50%]\ntest/test_gql.py::test_requests_http_transport_session FAILED                                                   [100%]\n\n====================================================== FAILURES =======================================================\n________________________________________ test_requests_http_transport_session _________________________________________\n\n    def test_requests_http_transport_session():\n        transport = RequestsHTTPTransport(\"url\", headers={\"test\": \"header\"})\n        transport.connect()\n>       assert transport.headers == transport.session.headers\nE       AssertionError: assert {'test': 'header'} == {'User-Agent'... 'keep-alive'}\nE\nE         Left contains 1 more item:\nE         {'test': 'header'}\nE         Right contains 4 more items:\nE         {'Accept': '*/*',\nE          'Accept-Encoding': 'gzip, deflate, br, zstd',\nE          'Connection': 'keep-alive',...\nE\nE         ...Full output truncated (7 lines hidden), use '-vv' to show\n\ntest/test_gql.py:17: AssertionError\n=============================================== short test summary info ===============================================\nFAILED test/test_gql.py::test_requests_http_transport_session - AssertionError: assert {'test': 'header'} == {'User-Agent'... 'keep-alive'}\n===================================== 1 failed, 1 passed, 32 deselected in 0.10s ======================================\n```\n\n\n**Expected behavior**\n`transport.session.headers == transport.headers` for `RequestHTTPTransport`, same as `AIOHTTPTransport` already does.\n\n**System info (please complete the following information):**\n - OS: Linux x86_64, Ubuntu 26.04\n - Python version: 3.14.4\n - gql version: 4.0\n - graphql-core version: 3.2.11\n","author":{"url":"https://github.com/shtrom","@type":"Person","name":"shtrom"},"datePublished":"2026-08-25T05:13:22Z","url":"https://github.com/graphql-python/gql/issues/613"}

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:77c7a3bb-4252-78ac-3587-4333fdaccf05
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8E68:1A4D8A:2348C4:2D507D:6AFF9558
html-safe-noncefbddd61743661b06052fe5b71ebac6a3482e98204b9d46b296d23e45ebdc4478
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTY4OjFBNEQ4QToyMzQ4QzQ6MkQ1MDdEOjZBRkY5NTU4IiwidmlzaXRvcl9pZCI6IjE1NjY5NjcyOTczMTMwNTE5OTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac69d5fd736d41772019e8b50e72608f9eebc22f94a7fc1e698e9ceb64ebeb769d
hovercard-subject-tagissue:5242312451
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/graphql-python/gql/613/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9da2c72d2cc6db0d095341be67b83a5ac2f13652cd5c69f583fd4a02f7c56128/graphql-python/gql/issues/613
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9da2c72d2cc6db0d095341be67b83a5ac2f13652cd5c69f583fd4a02f7c56128/graphql-python/gql/issues/613
og:image:altDescribe the bug When creating a transport = RequestsHTTPTransport with specific headers, transport.session.headers doesn't match what was given to the constructor (and is in transport.headers`) Th...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameshtrom
hostnamegithub.com
expected-hostnamegithub.com
None2c75d045e8c84b51e2ac680086a6dd1eeaf2bc15b82137d22ee5106835d6256c
turbo-cache-controlno-preview
go-importgithub.com/graphql-python/gql git https://github.com/graphql-python/gql.git
octolytics-dimension-user_id15002022
octolytics-dimension-user_logingraphql-python
octolytics-dimension-repository_id62077169
octolytics-dimension-repository_nwographql-python/gql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id62077169
octolytics-dimension-repository_network_root_nwographql-python/gql
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
release525b66d22c4f7e6bb8b62934bec198964f7e8b93
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/graphql-python/gql/issues/613#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-python%2Fgql%2Fissues%2F613
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%2Fgraphql-python%2Fgql%2Fissues%2F613
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=graphql-python%2Fgql
Reloadhttps://github.com/graphql-python/gql/issues/613
Reloadhttps://github.com/graphql-python/gql/issues/613
Reloadhttps://github.com/graphql-python/gql/issues/613
graphql-pythonhttps://github.com/graphql-python
gqlhttps://github.com/graphql-python/gql
Codehttps://github.com/graphql-python/gql
Issues5 (5)https://github.com/graphql-python/gql/issues
Pull requests1 (1)https://github.com/graphql-python/gql/pulls
Actionshttps://github.com/graphql-python/gql/actions
Projectshttps://github.com/graphql-python/gql/projects
Security and qualityhttps://github.com/graphql-python/gql/security
Insightshttps://github.com/graphql-python/gql/insights
https://github.com/graphql-python/gql
New issuehttps://github.com/login?return_to=https://github.com/graphql-python/gql/issues/613
New issuehttps://github.com/login?return_to=https://github.com/graphql-python/gql/issues/613
#614https://github.com/graphql-python/gql/pull/614
RequestsHTTPTransport does not set headers on session like AIOHTTPTransport doeshttps://github.com/graphql-python/gql/issues/613#top
#614https://github.com/graphql-python/gql/pull/614
https://github.com/shtrom
shtromhttps://github.com/shtrom
on Aug 25, 2026https://github.com/graphql-python/gql/issues/613#issue-5242312451
shtromhttps://github.com/shtrom
on Aug 25, 2026https://github.com/graphql-python/gql/issues/613#event-29956079136
SyncClient: update session with transport's headershttps://github.com/shtrom/simple-github/commit/4a82554ef27820edd9a57acba9cfe42a1a3420d5
4a82554https://github.com/shtrom/simple-github/commit/4a82554ef27820edd9a57acba9cfe42a1a3420d5
SyncClient: update session with transport's headershttps://github.com/shtrom/simple-github/commit/9f64417ca1f20aed1861cc58083652a07cf96ef4
9f64417https://github.com/shtrom/simple-github/commit/9f64417ca1f20aed1861cc58083652a07cf96ef4
https://github.com/leszekhanusz
leszekhanuszhttps://github.com/leszekhanusz
on Aug 26, 2026https://github.com/graphql-python/gql/issues/613#issuecomment-5418792319
#614https://github.com/graphql-python/gql/pull/614
https://github.com/shtrom
shtromhttps://github.com/shtrom
on Aug 26, 2026https://github.com/graphql-python/gql/issues/613#issuecomment-5421690074
Eijebonghttps://github.com/Eijebong
on Sep 2, 2026https://github.com/graphql-python/gql/issues/613#event-30426189065
fix(client): retain auth headers on the sync REST session (#203)https://github.com/mozilla-releng/simple-github/commit/9905ad80aca1ae8326b290cc799a637e561e9381
#203https://github.com/mozilla-releng/simple-github/pull/203
9905ad8https://github.com/mozilla-releng/simple-github/commit/9905ad80aca1ae8326b290cc799a637e561e9381
Sign up for freehttps://github.com/signup?return_to=https://github.com/graphql-python/gql/issues/613
Sign in to commenthttps://github.com/login?return_to=https://github.com/graphql-python/gql/issues/613
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.