René's URL Explorer Experiment


Title: MRO conflict on Set and Comparable · Issue #391 · jython/jython · GitHub

Open Graph Title: MRO conflict on Set and Comparable · Issue #391 · jython/jython

X Title: MRO conflict on Set and Comparable · Issue #391 · jython/jython

Description: I'm trying to use custom class implementing Set and Comparable interface in Jython but have the following error : Exception in thread "main" TypeError: Supertypes that share a modified attribute have an MRO conflict[attribute=__le__, sup...

Open Graph Description: I'm trying to use custom class implementing Set and Comparable interface in Jython but have the following error : Exception in thread "main" TypeError: Supertypes that share a modified attribute ha...

X Description: I'm trying to use custom class implementing Set and Comparable interface in Jython but have the following error : Exception in thread "main" TypeError: Supertypes that share a modifie...

Opengraph URL: https://github.com/jython/jython/issues/391

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MRO conflict on Set and Comparable","articleBody":"I'm trying to use custom class implementing Set and Comparable interface in Jython but have the following error : \n`Exception in thread \"main\" TypeError: Supertypes that share a modified attribute have an MRO conflict[attribute=__le__, supertypes=[\u003ctype 'java.util.Set'\u003e], type=Scratch$MyCollection]`\n\nI am using java temurin 21.0.6 and jython-standalone 2.7.4.\n\nI prepared a simple code example to reproduce : \n\n```java\n    public static void main(String[] args) {\n        try (PythonInterpreter interpreter = new PythonInterpreter()) {\n            interpreter.set(\"c\", new MyCollection());\n        }\n    }\n```\n(Please note that you can just use `Py.java2py(new MyCollection())` and will achieve the same result)\n\nWhere MyCollection is a basic implementation :\n\n```java\n    private static class MyCollection implements Set, Comparable {\n        @Override\n        public int compareTo(@NotNull Object o) {\n            return 0;\n        }\n\n        @Override\n        public int size() {\n            return 0;\n        }\n\n        @Override\n        public boolean isEmpty() {\n            return false;\n        }\n\n        @Override\n        public boolean contains(Object o) {\n            return false;\n        }\n\n        @Override\n        public @NotNull Iterator iterator() {\n            return null;\n        }\n\n        @Override\n        public @NotNull Object[] toArray() {\n            return new Object[0];\n        }\n\n        @Override\n        public boolean add(Object o) {\n            return false;\n        }\n\n        @Override\n        public boolean remove(Object o) {\n            return false;\n        }\n\n        @Override\n        public boolean addAll(@NotNull Collection c) {\n            return false;\n        }\n\n        @Override\n        public void clear() {\n\n        }\n\n        @Override\n        public boolean removeAll(@NotNull Collection c) {\n            return false;\n        }\n\n        @Override\n        public boolean retainAll(@NotNull Collection c) {\n            return false;\n        }\n\n        @Override\n        public boolean containsAll(@NotNull Collection c) {\n            return false;\n        }\n\n        @Override\n        public @NotNull Object[] toArray(@NotNull Object[] a) {\n            return new Object[0];\n        }\n    }\n```\n\nAlso, I tried in previous version 2.7.3 to 2.7.0 this even simpler code and has a similar error yet not the same :\n\n```java\n    public static void main(String[] args) {\n        try (PythonInterpreter interpreter = new PythonInterpreter()) {\n            interpreter.set(\"c\", new TreeSet\u003c\u003e());\n        }\n    }\n```\n\n`Exception in thread \"main\" TypeError: Supertypes that share a modified attribute have an MRO conflict[attribute=remove, supertypes=[\u003ctype 'java.util.SequencedSet'\u003e, \u003ctype 'java.util.Set'\u003e], type=SortedSet]`\n\nI tried to look a bit into it but failed to grasp exactly what is wrong, I feel like the PyJavaType.bases field is the key here, it's an array and from what I see, the order of the element inside it determine if the MRO will crash or not.","author":{"url":"https://github.com/bomboleo","@type":"Person","name":"bomboleo"},"datePublished":"2025-07-16T12:34:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/391/jython/issues/391"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a569f8d3-c726-84c9-9ba7-1241b220e200
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD5DA:DA736:CD317:1199B4:696E6117
html-safe-nonce52c247c72df5b024a06831ad421a4bb5eee16c4281fadd7ba9f0c2b535f840bd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENURBOkRBNzM2OkNEMzE3OjExOTlCNDo2OTZFNjExNyIsInZpc2l0b3JfaWQiOiIxMTI5NDUxMzk1NTkzNjkxNDE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca0a6007cb1f9bbd9c65152fd1ef0ff3d5850ab175dd56443b583ab7d03502aeb
hovercard-subject-tagissue:3235782386
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/jython/jython/391/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bd29999742f89a3890bf065a7849d59d9eb7e0b318aed04b1be5139074fcf6bf/jython/jython/issues/391
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bd29999742f89a3890bf065a7849d59d9eb7e0b318aed04b1be5139074fcf6bf/jython/jython/issues/391
og:image:altI'm trying to use custom class implementing Set and Comparable interface in Jython but have the following error : Exception in thread "main" TypeError: Supertypes that share a modified attribute ha...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebomboleo
hostnamegithub.com
expected-hostnamegithub.com
Nonef68b42d371252b0f236260d6234f4304a806fe5ac43d59faa21fb59d80df103b
turbo-cache-controlno-preview
go-importgithub.com/jython/jython git https://github.com/jython/jython.git
octolytics-dimension-user_id10533356
octolytics-dimension-user_loginjython
octolytics-dimension-repository_id282480317
octolytics-dimension-repository_nwojython/jython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id282480317
octolytics-dimension-repository_network_root_nwojython/jython
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
release6b74bc8dbcd10b5d69fd9ee9d2cfdc8b35e18a4c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/jython/jython/issues/391#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjython%2Fjython%2Fissues%2F391
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjython%2Fjython%2Fissues%2F391
Sign up https://patch-diff.githubusercontent.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=jython%2Fjython
Reloadhttps://patch-diff.githubusercontent.com/jython/jython/issues/391
Reloadhttps://patch-diff.githubusercontent.com/jython/jython/issues/391
Reloadhttps://patch-diff.githubusercontent.com/jython/jython/issues/391
jython https://patch-diff.githubusercontent.com/jython
jythonhttps://patch-diff.githubusercontent.com/jython/jython
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fjython%2Fjython
Fork 225 https://patch-diff.githubusercontent.com/login?return_to=%2Fjython%2Fjython
Star 1.5k https://patch-diff.githubusercontent.com/login?return_to=%2Fjython%2Fjython
Code https://patch-diff.githubusercontent.com/jython/jython
Issues 102 https://patch-diff.githubusercontent.com/jython/jython/issues
Pull requests 6 https://patch-diff.githubusercontent.com/jython/jython/pulls
Actions https://patch-diff.githubusercontent.com/jython/jython/actions
Projects 0 https://patch-diff.githubusercontent.com/jython/jython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/jython/jython/security
Please reload this pagehttps://patch-diff.githubusercontent.com/jython/jython/issues/391
Insights https://patch-diff.githubusercontent.com/jython/jython/pulse
Code https://patch-diff.githubusercontent.com/jython/jython
Issues https://patch-diff.githubusercontent.com/jython/jython/issues
Pull requests https://patch-diff.githubusercontent.com/jython/jython/pulls
Actions https://patch-diff.githubusercontent.com/jython/jython/actions
Projects https://patch-diff.githubusercontent.com/jython/jython/projects
Security https://patch-diff.githubusercontent.com/jython/jython/security
Insights https://patch-diff.githubusercontent.com/jython/jython/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/jython/jython/issues/391
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/jython/jython/issues/391
MRO conflict on Set and Comparablehttps://patch-diff.githubusercontent.com/jython/jython/issues/391#top
https://github.com/bomboleo
https://github.com/bomboleo
bomboleohttps://github.com/bomboleo
on Jul 16, 2025https://github.com/jython/jython/issues/391#issue-3235782386
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.