René's URL Explorer Experiment


Title: Using custom db_class alters global state and subsequent uses fail for db_class=None · Issue #2 · apache/casbin-python-sqlalchemy-adapter · GitHub

Open Graph Title: Using custom db_class alters global state and subsequent uses fail for db_class=None · Issue #2 · apache/casbin-python-sqlalchemy-adapter

X Title: Using custom db_class alters global state and subsequent uses fail for db_class=None · Issue #2 · apache/casbin-python-sqlalchemy-adapter

Description: See comments in the code below: import casbin_sqlalchemy_adapter import sqlalchemy from sqlalchemy import Column, Integer, String ENGINE = sqlalchemy.create_engine("foo") CUSTOM_SCHEMA = "custom_schema" class Base(sqlalchemy.orm.Declarat...

Open Graph Description: See comments in the code below: import casbin_sqlalchemy_adapter import sqlalchemy from sqlalchemy import Column, Integer, String ENGINE = sqlalchemy.create_engine("foo") CUSTOM_SCHEMA = "custom_sc...

X Description: See comments in the code below: import casbin_sqlalchemy_adapter import sqlalchemy from sqlalchemy import Column, Integer, String ENGINE = sqlalchemy.create_engine("foo") CUSTOM_SCHEMA = ...

Opengraph URL: https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using custom db_class alters global state and subsequent uses fail for db_class=None","articleBody":"See comments in the code below:\n\n```py\nimport casbin_sqlalchemy_adapter\nimport sqlalchemy\nfrom sqlalchemy import Column, Integer, String\n\nENGINE = sqlalchemy.create_engine(\"foo\")\n\nCUSTOM_SCHEMA = \"custom_schema\"\n\n\nclass Base(sqlalchemy.orm.DeclarativeBase):\n    pass\n\n\nclass CustomCasbinRule(Base):\n    \"\"\"Class we use instead of casbin_sqlalchemy_adapter.CasbinRule, so we can set the right metadata.\"\"\"\n\n    __tablename__ = \"casbin_rule_abc\"\n\n    metadata = sqlalchemy.MetaData(schema=CUSTOM_SCHEMA)\n\n    id = Column(Integer, primary_key=True)\n    ptype = Column(String(255))\n    v0 = Column(String(255))\n    v1 = Column(String(255))\n    v2 = Column(String(255))\n    v3 = Column(String(255))\n    v4 = Column(String(255))\n    v5 = Column(String(255))\n\n    def __str__(self):\n        arr = [str(self.ptype)]\n        for v in (self.v0, self.v1, self.v2, self.v3, self.v4, self.v5):\n            if v is None:\n                break\n            arr.append(str(v))\n        return \", \".join(arr)\n\n    def __repr__(self):\n        return f'\u003cCustomCasbinRule {self.id}: \"{self}\">'\n\n\ncasbin_sqlalchemy_adapter.Adapter(ENGINE, db_class=CustomCasbinRule)\n\n# At this point the `casbin_sqlalchemy_adapter.Base.metadata` is altered, and following code will create\n# the table in \"custom_schema\" as well, which is unexpected and can cause issues.\n\ncasbin_sqlalchemy_adapter.Adapter(ENGINE)\n```\n\n@mick-graft","author":{"url":"https://github.com/hsluoyz","@type":"Person","name":"hsluoyz"},"datePublished":"2025-08-09T08:48:40Z","url":"https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2"}

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:c886c67e-af14-1e89-c811-0268cbef150a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB61A:C4ED3:1CEBD8:269C74:6B04B3D3
html-safe-nonce1e2541a625a8b87a2b43d94b42fbf2748a63b1e71b9f730ec2479ee84b8060ff
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjFBOkM0RUQzOjFDRUJEODoyNjlDNzQ6NkIwNEIzRDMiLCJ2aXNpdG9yX2lkIjoiMTYzMTQ2MjE1NDAyMjcyODY1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca622323947c092950449df5c5548d29d570060eeb2f7eaf21545a1481c64d505
hovercard-subject-tagissue:3306117378
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/apache/casbin-python-sqlalchemy-adapter/2/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dcfa3ceb85ae29339774b7f948d60d8726748bcd2bb2fd11d34ac1f2c0818574/apache/casbin-python-sqlalchemy-adapter/issues/2
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dcfa3ceb85ae29339774b7f948d60d8726748bcd2bb2fd11d34ac1f2c0818574/apache/casbin-python-sqlalchemy-adapter/issues/2
og:image:altSee comments in the code below: import casbin_sqlalchemy_adapter import sqlalchemy from sqlalchemy import Column, Integer, String ENGINE = sqlalchemy.create_engine("foo") CUSTOM_SCHEMA = "custom_sc...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehsluoyz
hostnamegithub.com
expected-hostnamegithub.com
None378bd702ac792b3550e484ad39d9a898fcd25bb52ba6962b0c9cc457c1ea71c7
turbo-cache-controlno-preview
go-importgithub.com/apache/casbin-python-sqlalchemy-adapter git https://github.com/apache/casbin-python-sqlalchemy-adapter.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id878922594
octolytics-dimension-repository_nwoapache/casbin-python-sqlalchemy-adapter
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id878922594
octolytics-dimension-repository_network_root_nwoapache/casbin-python-sqlalchemy-adapter
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
releaseb032e77f1ea437ede6c115446a0a467709b468e7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcasbin-python-sqlalchemy-adapter%2Fissues%2F2
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%2Fapache%2Fcasbin-python-sqlalchemy-adapter%2Fissues%2F2
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=apache%2Fcasbin-python-sqlalchemy-adapter
Reloadhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2
Reloadhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2
Reloadhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2
apachehttps://github.com/apache
casbin-python-sqlalchemy-adapterhttps://github.com/apache/casbin-python-sqlalchemy-adapter
Codehttps://github.com/apache/casbin-python-sqlalchemy-adapter
Issueshttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues
Pull requests1 (1)https://github.com/apache/casbin-python-sqlalchemy-adapter/pulls
Actionshttps://github.com/apache/casbin-python-sqlalchemy-adapter/actions
Projectshttps://github.com/apache/casbin-python-sqlalchemy-adapter/projects
Security and qualityhttps://github.com/apache/casbin-python-sqlalchemy-adapter/security
Insightshttps://github.com/apache/casbin-python-sqlalchemy-adapter/insights
https://github.com/apache/casbin-python-sqlalchemy-adapter
New issuehttps://github.com/login?return_to=https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2
New issuehttps://github.com/login?return_to=https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2
#8https://github.com/apache/casbin-python-sqlalchemy-adapter/pull/8
Using custom db_class alters global state and subsequent uses fail for db_class=Nonehttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#top
#8https://github.com/apache/casbin-python-sqlalchemy-adapter/pull/8
https://github.com/hsluoyz
enhancementhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues?q=state%3Aopen%20label%3A%22enhancement%22
releasedhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues?q=state%3Aopen%20label%3A%22released%22
https://github.com/hsluoyz
hsluoyzhttps://github.com/hsluoyz
on Aug 9, 2025https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#issue-3306117378
apachehttps://github.com/apache
wf-yamadayhttps://github.com/wf-yamaday
on Aug 27, 2025https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#event-19372059340
hsluoyzhttps://github.com/hsluoyz
on Aug 29, 2025https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#event-19410808805
hsluoyzhttps://github.com/hsluoyz
enhancementhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues?q=state%3Aopen%20label%3A%22enhancement%22
on Aug 29, 2025https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#event-19410809680
hsluoyzhttps://github.com/hsluoyz
completedhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#8https://github.com/apache/casbin-python-sqlalchemy-adapter/pull/8
on Aug 29, 2025https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#event-19410814486
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Aug 29, 2025https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#issuecomment-3236879329
GitHub Actionshttps://help.github.com/en/actions
GitHub releasehttps://github.com/officialpycasbin/sqlalchemy-adapter/releases/tag/v1.7.0
semantic-releasehttps://github.com/semantic-release/semantic-release
github-actionshttps://github.com/apps/github-actions
releasedhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues?q=state%3Aopen%20label%3A%22released%22
on Aug 29, 2025https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2#event-19410839520
Sign up for freehttps://github.com/signup?return_to=https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2
Sign in to commenthttps://github.com/login?return_to=https://github.com/apache/casbin-python-sqlalchemy-adapter/issues/2
hsluoyzhttps://github.com/hsluoyz
enhancementhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues?q=state%3Aopen%20label%3A%22enhancement%22
releasedhttps://github.com/apache/casbin-python-sqlalchemy-adapter/issues?q=state%3Aopen%20label%3A%22released%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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.