Skip to content

Document the overwrite constructor keyword - #429

Merged
hobu merged 1 commit into
Toblerity:mainfrom
KennyMcSimpson:docs/overwrite-keyword
Nov 11, 2026
Merged

hobu merged 1 commit into
Toblerity:mainfrom
KennyMcSimpson:docs/overwrite-keyword

Conversation

@KennyMcSimpson

Copy link
Copy Markdown
Contributor

The file serialization tutorial tells readers to control replacement through Property.overwrite, but Index sets that property from its overwrite keyword argument when storage already exists. Document the keyword in the constructor and property reference, and use it in the tutorial.

The executable examples show that reopening preserves entries by default, overwrite=True creates an empty index, and the empty index remains empty after closing and reopening. Close the tutorial's disk indexes before cleaning up their temporary directories so the examples also work on Windows.

Validation on Windows with libspatialindex 2.1.0:

  • Full source tests and documentation doctests with warnings treated as errors: 73 passed, 1 expected failure on both Python 3.10.22 and 3.13.0.
  • All eight configured pre-commit checks pass, including Ruff, mypy and codespell.
  • Sphinx HTML build passes with warnings treated as errors.

The executable Python code is unchanged; the two changes in rtree/index.py are docstrings.

AI assistance was used to investigate, implement, test and prepare this pull request.

Refs #157.

@hobu
hobu merged commit 72d4f67 into Toblerity:main Nov 11, 2026
2 checks passed
@sgillies

sgillies commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

@hobu Rtree should not accept contributions like this. It makes a mockery of open source. In @KennyMcSimpson's profile, I see 122 PRs in 96 projects on October 3.

@KennyMcSimpson

Copy link
Copy Markdown
Contributor Author

@hobu this project should not accept contributions like this. It makes a mockery of open source. In @KennyMcSimpson's profile, I see 122 PRs in 96 projects on October 3.

I'm sorry. I'm a student that time who new to open source field, but I should have approached this more thoughtfully. I do this bcs I heard that Claude has a policy where you can qualify for access to the model if you make enough open-source contributions.So I put that goal ahead of contributing responsibly. That was disrespectful to the community and maintainers' time.

I won't do that again. In the future, I'll take the time to understand each project's needs and expectations and submit changes I understand. I contribute in the community through useful contributions, rather than chasing rewards. Thank you for calling this out and apologize again

ORZ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants