Skip to content

Consider switching use_server_version default to True #876

Closed

Description

@bcantoni

This is a spin-out of a conversation from #859. Capturing it here for future consideration.

@t8y8 suggestion was to could make use_server_version=True the default on a new client instance, vs today where it's false by default:

def __init__(self, server_address, use_server_version=False):

I had asked what impact would that have on existing clients, i.e. would this be a surprising change perhaps with compatibility issues.

Tyler's feedback:

It shouldn't -- if they're upgrading their server already, they could still do so. They can also still manually set it after the fact and it'll override ServerInfo's call.

I don't think there are any calls that stop working outright between 2.3 and 3.X are there?

The version detection logic works all the way back to 9.0, if it's newer than API version 2.4 it will use ServerInfo but otherwise there's a legacy way to detect version.

The only reason we didn't do it originally is because we didn't want to "issue silent HTTP calls" but I think that's a very small price to pay to get people using the latest version.

They can also explicitly set it to False if for some reason they don't want it to fire off.

Activity

  1. rejuls commented on Jan 10, 2022

    @rejuls

    It would be useful to set the default as true, would have saved me a lot of time trying to figure this out - #853 (comment)

  2. jacalata commented on Feb 10, 2022

    @jacalata
    Contributor

    While doing this, we should fix the code so that determine_latest_version pays attention to any http options passed in, like --no-certcheck or a proxy.

  3. added a commit that references this issue on Jun 24, 2026
    897d088
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions