Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ LESSONS.push({
diagram: true, // a picture such as a folder tree; nothing to run

// Real code from another project instead of a program. rs must be exactly those lines (checked against GitHub);
// py only has to parse, unless you also give out:
// py only has to parse, unless you also give out. Also list it, with its license text, in THIRD_PARTY_NOTICES:
excerpt: { repo: 'astral-sh/uv', commit: '<full 40-character SHA>', path: 'crates/x/src/lib.rs', from: 10, to: 30 },
}],
quiz: [
Expand Down
92 changes: 92 additions & 0 deletions THIRD_PARTY_NOTICES
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Third-party notices

Lesson 28 (lessons/28-tours.js) quotes short excerpts from the projects below,
unchanged, each pinned to one commit. Their license notices follow, copied
unchanged from the LICENSE file at that commit.

--------------------------------------------------------------------------------
uv - https://github.com/astral-sh/uv
Commit: 57f7f6835992a7403512ce71d32b7cf7a45510dd
Files: crates/uv-normalize/src/lib.rs (lines 26-63),
crates/uv-python-types/src/implementation.rs (lines 106-122)
License: uv is dual-licensed MIT OR Apache-2.0; these excerpts are used under
the MIT license (LICENSE-MIT):

MIT License

Copyright (c) 2025 Astral Software Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------------------------------------------------------------------------
ruff - https://github.com/astral-sh/ruff
Commit: 0222c19dd8e0c9a927f2e47bf3774a108431da25
File: crates/ruff_python_stdlib/src/identifiers.rs (lines 54-77)
License: MIT (LICENSE, ruff's own notice):

MIT License

Copyright (c) 2022 Charles Marsh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------------------------------------------------------------------------
pydantic-core - https://github.com/pydantic/pydantic-core
Commit: 383eb95a19433754c0cecf7025b50c26b6d97a36
Files: src/input/shared.rs (lines 25-45),
src/recursion_guard.rs (lines 28-58)
License: MIT (LICENSE):

The MIT License (MIT)

Copyright (c) 2022 Samuel Colvin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
Made by <a href="https://romanzdk.com" target="_blank" rel="noopener">Roman Žydyk</a> ·
<a href="https://github.com/romanzdk/rust-for-pythonistas" target="_blank" rel="noopener">Source on GitHub</a> ·
<a href="https://github.com/romanzdk/rust-for-pythonistas/issues/new/choose" target="_blank" rel="noopener">Report a mistake</a> ·
MIT license
MIT license<br>
Run sends your code to the <a href="https://play.rust-lang.org" target="_blank" rel="noopener">Rust Playground</a> (play.rust-lang.org) to compile and run it.
Page views are counted with <a href="https://www.goatcounter.com" target="_blank" rel="noopener">GoatCounter</a>, without cookies.
</footer>

<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha384-F/bZzf7p3Joyp5psL90p/p89AZJsndkSoGwRpXcZhleCWhd8SnRuoYo4d0yirjJp" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
Expand Down
5 changes: 3 additions & 2 deletions lessons/28-tours.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ LESSONS.push({
<ul>
<li><a href="https://github.com/astral-sh/uv" target="_blank" rel="noopener">uv</a>, the package manager
(<a href="https://github.com/astral-sh/uv/blob/57f7f6835992a7403512ce71d32b7cf7a45510dd/LICENSE-MIT" target="_blank" rel="noopener">MIT</a>
or <a href="https://github.com/astral-sh/uv/blob/57f7f6835992a7403512ce71d32b7cf7a45510dd/LICENSE-APACHE" target="_blank" rel="noopener">Apache-2.0</a> license),</li>
or <a href="https://github.com/astral-sh/uv/blob/57f7f6835992a7403512ce71d32b7cf7a45510dd/LICENSE-APACHE" target="_blank" rel="noopener">Apache-2.0</a> license, © Astral Software Inc.),</li>
<li><a href="https://github.com/astral-sh/ruff" target="_blank" rel="noopener">ruff</a>, the linter
(<a href="https://github.com/astral-sh/ruff/blob/0222c19dd8e0c9a927f2e47bf3774a108431da25/LICENSE" target="_blank" rel="noopener">MIT</a> license),</li>
(<a href="https://github.com/astral-sh/ruff/blob/0222c19dd8e0c9a927f2e47bf3774a108431da25/LICENSE" target="_blank" rel="noopener">MIT</a> license, © Charles Marsh),</li>
<li><a href="https://github.com/pydantic/pydantic-core" target="_blank" rel="noopener">pydantic-core</a>, the engine
inside pydantic (<a href="https://github.com/pydantic/pydantic-core/blob/383eb95a19433754c0cecf7025b50c26b6d97a36/LICENSE" target="_blank" rel="noopener">MIT</a>
license, © Samuel Colvin).</li>
</ul>
<p>The full license texts are in <a href="https://github.com/romanzdk/rust-for-pythonistas/blob/main/THIRD_PARTY_NOTICES" target="_blank" rel="noopener">THIRD_PARTY_NOTICES</a>.</p>
<p>Each excerpt is pinned to one commit, and <b>View on GitHub</b> opens exactly those lines, so you can scroll
around and see the rest of the file. Next to it is the Python you would write for the same job. You won't know
every name, and that's normal in real code: read the shape, use the hover notes, and guess the rest from the names.</p>`,
Expand Down
Loading