René's URL Explorer Experiment


Title: Replace `compiler::source` module with `ruff_source_file` by ShaharNaveh · Pull Request #6016 · RustPython/RustPython · GitHub

Open Graph Title: Replace `compiler::source` module with `ruff_source_file` by ShaharNaveh · Pull Request #6016 · RustPython/RustPython

X Title: Replace `compiler::source` module with `ruff_source_file` by ShaharNaveh · Pull Request #6016 · RustPython/RustPython

Description: I saw that compiler/source was mainly re-exporting items from ruff_source_file, so I replaced it with the upstream ruff_source_file::SourceFile which is a bit better implementation of what we have currently as it's uses Arc internally so it's practically free to clone & replaces the need for a dedicated SourceCodeOwned as SourceFile is already owned. This PR contains a lot of noise as I renamed: source_code -> source_file SourceCode -> SourceFile SourceCodeOwned -> SourceFile Feel free to close this PR if this is an unwanted change. Summary by CodeRabbit Refactor Unified the handling of source code representation across the compiler and VM by replacing the previous type with a new, consistent type throughout all relevant modules and interfaces. Updated numerous method and function signatures to accept the new source type, improving maintainability and consistency. Deprecated and removed references to legacy source handling components. Adjusted dependencies to reflect the new approach and removed obsolete packages. Chores Reformatted configuration files and cleaned up commented-out or unused dependencies.

Open Graph Description: I saw that compiler/source was mainly re-exporting items from ruff_source_file, so I replaced it with the upstream ruff_source_file::SourceFile which is a bit better implementation of what we have ...

X Description: I saw that compiler/source was mainly re-exporting items from ruff_source_file, so I replaced it with the upstream ruff_source_file::SourceFile which is a bit better implementation of what we have ...

Opengraph URL: https://github.com/RustPython/RustPython/pull/6016

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e0c1bb94-89eb-c17b-585d-e60b09654aeb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCCAC:154180:108C5F9:15B0EB3:696B0E8E
html-safe-nonce09b45a9130eee10a93f77e71dd29a75894845104bc95ace7d83f7c6220cf5d7e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0FDOjE1NDE4MDoxMDhDNUY5OjE1QjBFQjM6Njk2QjBFOEUiLCJ2aXNpdG9yX2lkIjoiMzE1NjY5OTQxNDEyMTg3NzEzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7e5da89299c7550c03231bf30ec3c41e42b1e152ec47d262dfad94c130d99852
hovercard-subject-tagpull_request:2683258526
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/RustPython/RustPython/pull/6016/files
twitter:imagehttps://avatars.githubusercontent.com/u/50263213?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/50263213?s=400&v=4
og:image:altI saw that compiler/source was mainly re-exporting items from ruff_source_file, so I replaced it with the upstream ruff_source_file::SourceFile which is a bit better implementation of what we have ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
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
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/6016/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F6016%2Ffiles
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://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F6016%2Ffiles
Sign up https://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=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/6016/files
Reloadhttps://github.com/RustPython/RustPython/pull/6016/files
Reloadhttps://github.com/RustPython/RustPython/pull/6016/files
RustPython https://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Notifications https://github.com/login?return_to=%2FRustPython%2FRustPython
Fork 1.4k https://github.com/login?return_to=%2FRustPython%2FRustPython
Star 21.7k https://github.com/login?return_to=%2FRustPython%2FRustPython
Code https://github.com/RustPython/RustPython
Issues 278 https://github.com/RustPython/RustPython/issues
Pull requests 92 https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects 0 https://github.com/RustPython/RustPython/projects
Wiki https://github.com/RustPython/RustPython/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/RustPython/RustPython/security
Please reload this pagehttps://github.com/RustPython/RustPython/pull/6016/files
Insights https://github.com/RustPython/RustPython/pulse
Code https://github.com/RustPython/RustPython
Issues https://github.com/RustPython/RustPython/issues
Pull requests https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Wiki https://github.com/RustPython/RustPython/wiki
Security https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
ShaharNaveh:replace-compile-source-w-ruffhttps://github.com/ShaharNaveh/RustPython/tree/replace-compile-source-w-ruff
Conversation 11 https://github.com/RustPython/RustPython/pull/6016
Commits 5 https://github.com/RustPython/RustPython/pull/6016/commits
Checks 11 https://github.com/RustPython/RustPython/pull/6016/checks
Files changed https://github.com/RustPython/RustPython/pull/6016/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/6016/files
Replace compiler::source module with ruff_source_file https://github.com/RustPython/RustPython/pull/6016/files#top
Show all changes 5 commits https://github.com/RustPython/RustPython/pull/6016/files
1ff541b Replace `compiler::source`` with ruff ShaharNaveh Jul 21, 2025 https://github.com/RustPython/RustPython/pull/6016/commits/1ff541b70c4864b9d7a1054d6892d573a6c48a1b
7f2620b Require `ruff_source_file` ShaharNaveh Jul 21, 2025 https://github.com/RustPython/RustPython/pull/6016/commits/7f2620b35d76e90164d945556adaa860c5dba25c
af382dd Fix for windows ShaharNaveh Jul 21, 2025 https://github.com/RustPython/RustPython/pull/6016/commits/af382ddf1fea267538c9724e57a9f15b0e695b92
d82ede7 Restore `compiler::source` ShaharNaveh Jul 22, 2025 https://github.com/RustPython/RustPython/pull/6016/commits/d82ede7f9f332638d7c4627cbddc3f059ad4f960
776e57e Deprecate `compiler::source` ShaharNaveh Jul 22, 2025 https://github.com/RustPython/RustPython/pull/6016/commits/776e57ea78cb2d7c3edae77e25d300ba973e8fad
Clear filters https://github.com/RustPython/RustPython/pull/6016/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/6016/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/6016/files
Cargo.lock https://github.com/RustPython/RustPython/pull/6016/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87e
Cargo.toml https://github.com/RustPython/RustPython/pull/6016/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
Cargo.toml https://github.com/RustPython/RustPython/pull/6016/files#diff-796ab7fd340d0d3e7801305b447dffe906b54a4d293fc1261a279ab8c9419ab5
Cargo.toml https://github.com/RustPython/RustPython/pull/6016/files#diff-07aa07907e0f3f0b64f8191706633d0e5d147505b1310c8e7fc08ffc1f465ea4
compile.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-d25ba64ade9a22e41075dadb2be789665671a50c036292ccb7f35de6e6daf3ee
symboltable.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-0ff4f3651150c379cb2198523dc703fdcf3d7ada2c3fe59fe282583341bf1e3c
unparse.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-4216a83477fbb2c5b381441309ae4dae04c27da4302cb04864d68f535d91379a
Cargo.toml https://github.com/RustPython/RustPython/pull/6016/files#diff-cab034b0abe78e37ad25fcece1e2cfb4fb87650de41778a48dfebe8025e85f1b
lib.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-d971f44fc02e4f0d23841872c6fd4a20b77fcb70597dca2d75744d5b2ba9eacf
Cargo.toml https://github.com/RustPython/RustPython/pull/6016/files#diff-98def556b29f953c96db531b74917518dd012025da819292b7d0a956710c2d2d
code.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-1236cfa2f45b6172de508e6e5843d72910d547c3043c267440a50d6592ada06b
traceback.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-d7e600e384601727cc75caef580d0574090a16614f93a095a3503962f8c25b7a
compiler.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-2e0be389b2abe63b783928884f04b27bdf551d27f9f10a6a5e768b6aba71414e
frame.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-b12bfe4c8654c4d3a81839ecf8fe1e9f41a1bac245ef944a0e3d8639a252ad15
lib.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-76838f6ab6fdbcf4f9cc064b8ca4707ab930c026067eb62ae888def5752a06ba
ast.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-0ee894dbbcdb6ce502edbb58fa1bb5c4ef677cb96aee4406d29b2b54b667753d
argument.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-d1b56beb7ab3176820e54991dedcd28ce26162dbb4319a1961f879de83f444f8
basic.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-8ffa1257c6aa46f26495665ec927f14d2cda34cc8d50cc6b4722a14cabbf8ce2
constant.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-9ec6f06d40810de8f4bfc3c4367001299f112b288d1410ffb0441ea589ae7c88
elif_else_clause.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-6e0f2a624680c8f7c21487735a3c694d32f545ec46ca4427f957a0294b7575c0
exception.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-6bbc36c45f387a24b9367955f06a5b97982ba6ae0958f4ac27df325aad8a6666
expression.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-54ebd9d2071956cc072dc8337ee0c5b3e2224671d6e8c843e72e23bf41f55ae2
module.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-5a3742284a298c01fce41ed10bf3e531284c4e395dc09bb900ba803453536d41
node.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-ee24cf02d7cc24b9c0ce41fe0de5bce989471fdd5dfce567453cc4aea9107f13
operator.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-cd965d839a3cf0eb0f0d7aece220b315711daaf67e1c4dc689d0dbf6f8beeb7c
other.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-c4ec32bd10b24622f6d40cf2bb7c019e180453e841dccf24864e83fc4859d974
parameter.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-ef51188bea0a48ccc8f5fb3a3140bd8f9a79165c30ea6cec971a56499c189ffa
pattern.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-04306043ccdda24e0685c2a1519e3840b74ebfb212f7726bd616a245693293ba
statement.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-b73c49e5f277b9a0a9446bbb5c857cd95c234738bd13856d161c87df9a55dd2c
string.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-4a5312466fb5953fe52c5705c69ec8448249f3399391fc17ecc669a4987b30ac
type_ignore.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-d9363f40e2400ba25cb4aa8cc20116f5a7d54167225a1c6eb0568a776b3fa0ff
type_parameters.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-0224930ea4abe4344b7140054ceb665303b85c710d20f454b7e6caeb8bd2e005
vm_new.rs https://github.com/RustPython/RustPython/pull/6016/files#diff-c069a57d40adace4080ea2945fbb7e20e743fb5046da64bfb27ab5aa1fea668c
Cargo.lockhttps://github.com/RustPython/RustPython/pull/6016/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87e
View file https://github.com/ShaharNaveh/RustPython/blob/776e57ea78cb2d7c3edae77e25d300ba973e8fad/Cargo.lock
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/RustPython/RustPython/pull/6016/files
Cargo.tomlhttps://github.com/RustPython/RustPython/pull/6016/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
View file https://github.com/ShaharNaveh/RustPython/blob/776e57ea78cb2d7c3edae77e25d300ba973e8fad/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/6016/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/6016/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
https://github.com/RustPython/RustPython/pull/6016/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
https://github.com/RustPython/RustPython/pull/6016/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
compiler/Cargo.tomlhttps://github.com/RustPython/RustPython/pull/6016/files#diff-796ab7fd340d0d3e7801305b447dffe906b54a4d293fc1261a279ab8c9419ab5
View file https://github.com/ShaharNaveh/RustPython/blob/776e57ea78cb2d7c3edae77e25d300ba973e8fad/compiler/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/6016/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/6016/files#diff-796ab7fd340d0d3e7801305b447dffe906b54a4d293fc1261a279ab8c9419ab5
https://github.com/RustPython/RustPython/pull/6016/files#diff-796ab7fd340d0d3e7801305b447dffe906b54a4d293fc1261a279ab8c9419ab5
compiler/codegen/Cargo.tomlhttps://github.com/RustPython/RustPython/pull/6016/files#diff-07aa07907e0f3f0b64f8191706633d0e5d147505b1310c8e7fc08ffc1f465ea4
View file https://github.com/ShaharNaveh/RustPython/blob/776e57ea78cb2d7c3edae77e25d300ba973e8fad/compiler/codegen/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/6016/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/6016/files#diff-07aa07907e0f3f0b64f8191706633d0e5d147505b1310c8e7fc08ffc1f465ea4
https://github.com/RustPython/RustPython/pull/6016/files#diff-07aa07907e0f3f0b64f8191706633d0e5d147505b1310c8e7fc08ffc1f465ea4
Please reload this pagehttps://github.com/RustPython/RustPython/pull/6016/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/6016/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

Viewport: width=device-width


URLs of crawlers that visited me.