GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Enable pyupgrade by ulgens · Pull Request #110 · typesense/typesense-python

Conversation

@ulgens

@ulgens ulgens commented Nov 23, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Change Summary

Enables pyupgrade rule set in ruff config.

https://docs.astral.sh/ruff/rules/#pyupgrade-up
https://github.com/asottile/pyupgrade

A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.

Helps to keep the code modern.

Depends on:

  • Specify supported Python versions via trove classifiers #111

PR Checklist

  • I have read and signed the Contributor License Agreement.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ulgens added 2 commits November 23, 2025 22:36
@ulgens
Specify supported Python versions via trove classifiers
737f571
@ulgens
Enable pyupgrade in ruff config
5461c8f
https://docs.astral.sh/ruff/rules/#pyupgrade-up
@ulgens
ulgens marked this pull request as draft November 23, 2025 19:44
@ulgens
Apply pyupgrade fixes
73a6e77
@ulgens
ulgens force-pushed the enable-pyupgrade branch from bf34294 to 73a6e77 Compare November 23, 2025 19:46
@ulgens ulgens mentioned this pull request Nov 23, 2025
Drop support for Python 3.9 (EOL) #112
Open
1 task done
@tharropoulos

tharropoulos commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator

The reason for most of the changes here was that this package supported versions of 3.9 onwards.

There are numerous changes that rely on PEP 695 (type keyword) as well as a number of union changes that use the pipe symbol.

The pipe ones should be fine as long as we deprecate 3.9 usage.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tharropoulos

tharropoulos commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator

Inheriting from object should be left out, that's for sure

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ulgens

ulgens commented Nov 24, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

The reason for most of the changes here was that this package supported versions of 3.9 onwards.

To clarify, that's the reason for all of the changes. Excluding the trove update commit (I will rebase the branch when #111 is merged), the only changes are ruff config update to enable pyupgrade and fixes applied by pyupgrade.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tharropoulos

tharropoulos commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator

Wasn't type introduced in 3.12 though?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ulgens ulgens mentioned this pull request Nov 24, 2025
Testing CI myperfectstay/typesense-python#1
Closed
@ulgens

ulgens commented Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

@tharropoulos

  • The pipe (or) changes are coming from this rule: https://docs.astral.sh/ruff/rules/non-pep604-annotation-union/ It says it's for py310-plus, I'll check why it's applied.
  • type changes are coming https://docs.astral.sh/ruff/rules/non-pep585-annotation/. It's based on https://peps.python.org/pep-0585/, which was targeting Python 3.9
tharropoulos reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ulgens @tharropoulos
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.