Skip to content

fix(realtime): port main's changes to v3 - #1798

Merged
spydon merged 9 commits into
v3from
v3-sync/08-realtime
Oct 28, 2026
Merged

spydon merged 9 commits into
v3from
v3-sync/08-realtime

Conversation

@spydon

@spydon spydon commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Cherry-picks main's realtime commits onto v3's overhauled client.

  • Skipped 8c1a914 (join_ref on every event): v3 already does this and has its own test_join_ref.py.
  • Skipped da3a353 (restart timeout after resending a push): v3 has no Push class.
  • Skipped 198396d (client timeout for join and leave pushes): v3 has no Push class. subscribe() and unsubscribe() wait for the reply, and callers bound them with asyncio.wait_for.
  • Skipped eae2838 ("*" broadcast listeners, ignoring case): v3 has no broadcast callbacks. channel.messages yields every broadcast without filtering by event.

Review fixes

  • The server does not reply to access_token, so set_auth() sends it without waiting. The test mock no longer acks it, and the rejoin test leaves before joining again.
  • joined is derived from state, and unsubscribe() delivers a close message to the messages iterator.
  • channel() warns when it ignores different options for an existing topic, and remove_channel() only unsubscribes the channel it is given.
  • remove_all_channels() can run twice, a closed connection backs off before reconnecting, and endpoint_url() uses normalize_url().
  • The same channel object can be resubscribed after unsubscribe(). subscribe() registers it again, clears stale messages and no longer writes the token into shared options.
  • unsubscribe() delivers exactly one close message.
  • automatically_reconnect() applies the backoff and max_retries to dropped connections too, resets the count after a minute of healthy connection, and reconnects on asyncio.TimeoutError on Python 3.10.
  • Failures while unsubscribing all channels or sending a new token are logged instead of left unretrieved.
  • The whole README now documents the v3 API.

Commits

Stack

This replaces #1789: main's changes since 6f522d3 are cherry-picked onto v3 one package at a time, so each part can be reviewed on its own. Merge from the bottom up.

  1. chore: sync CI, dependency and tooling changes from main #1791
  2. fix: v3 fixes found while syncing main #1792
  3. fix(supabase): sync client options fix from main and make storage list_v2 folder keys optional #1793
  4. fix(functions): port main's changes to v3 #1794
  5. fix(auth): port main's changes to v3 #1795
  6. fix(postgrest): port main's changes to v3 #1796
  7. fix(storage): port main's changes to v3 #1797
  8. fix(realtime): port main's changes to v3 #1798 (this PR)
  9. chore: sync sdk-compliance.yaml with the v3 public API #1790

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Capability matrix drift detected

The following capabilities are marked implemented in the matrix but could not be found in python:

  • auth.sign_in.sign_up → expected symbol: AsyncGoTrueClient.sign_up
  • auth.sign_in.sign_up → expected symbol: SyncGoTrueClient.sign_up
  • auth.sign_in.sign_in_with_password → expected symbol: AsyncGoTrueClient.sign_in_with_password
  • auth.sign_in.sign_in_with_password → expected symbol: SyncGoTrueClient.sign_in_with_password
  • auth.sign_in.sign_in_with_oauth → expected symbol: AsyncGoTrueClient.sign_in_with_oauth
  • auth.sign_in.sign_in_with_oauth → expected symbol: SyncGoTrueClient.sign_in_with_oauth
  • auth.sign_in.sign_in_with_otp → expected symbol: AsyncGoTrueClient.sign_in_with_otp
  • auth.sign_in.sign_in_with_otp → expected symbol: SyncGoTrueClient.sign_in_with_otp
  • auth.sign_in.sign_in_with_id_token → expected symbol: AsyncGoTrueClient.sign_in_with_id_token
  • auth.sign_in.sign_in_with_id_token → expected symbol: SyncGoTrueClient.sign_in_with_id_token
  • auth.sign_in.sign_in_anonymously → expected symbol: AsyncGoTrueClient.sign_in_anonymously
  • auth.sign_in.sign_in_anonymously → expected symbol: SyncGoTrueClient.sign_in_anonymously
  • auth.sign_in.verify_otp → expected symbol: AsyncGoTrueClient.verify_otp
  • auth.sign_in.verify_otp → expected symbol: SyncGoTrueClient.verify_otp
  • auth.sign_in.resend_confirmation → expected symbol: AsyncGoTrueClient.resend
  • auth.sign_in.resend_confirmation → expected symbol: SyncGoTrueClient.resend
  • auth.sign_in.reauthenticate → expected symbol: AsyncGoTrueClient.reauthenticate
  • auth.sign_in.reauthenticate → expected symbol: SyncGoTrueClient.reauthenticate
  • auth.session.get_session → expected symbol: AsyncGoTrueClient.get_session
  • auth.session.get_session → expected symbol: SyncGoTrueClient.get_session
  • auth.session.get_user → expected symbol: AsyncGoTrueClient.get_user
  • auth.session.get_user → expected symbol: SyncGoTrueClient.get_user
  • auth.session.get_claims → expected symbol: AsyncGoTrueClient.get_claims
  • auth.session.get_claims → expected symbol: SyncGoTrueClient.get_claims
  • auth.session.refresh_session → expected symbol: AsyncGoTrueClient.refresh_session
  • auth.session.refresh_session → expected symbol: SyncGoTrueClient.refresh_session
  • auth.session.set_session → expected symbol: AsyncGoTrueClient.set_session
  • auth.session.set_session → expected symbol: SyncGoTrueClient.set_session
  • auth.session.sign_out → expected symbol: AsyncGoTrueClient.sign_out
  • auth.session.sign_out → expected symbol: SyncGoTrueClient.sign_out
  • auth.session.update_user → expected symbol: AsyncGoTrueClient.update_user
  • auth.session.update_user → expected symbol: SyncGoTrueClient.update_user
  • auth.session.subscribe_auth_events → expected symbol: AsyncGoTrueClient.on_auth_state_change
  • auth.session.subscribe_auth_events → expected symbol: SyncGoTrueClient.on_auth_state_change
  • auth.identities.link_identity → expected symbol: AsyncGoTrueClient.link_identity
  • auth.identities.link_identity → expected symbol: SyncGoTrueClient.link_identity
  • auth.identities.unlink_identity → expected symbol: AsyncGoTrueClient.unlink_identity
  • auth.identities.unlink_identity → expected symbol: SyncGoTrueClient.unlink_identity
  • auth.identities.list_identities → expected symbol: AsyncGoTrueClient.get_user_identities
  • auth.identities.list_identities → expected symbol: SyncGoTrueClient.get_user_identities
  • auth.mfa.enroll → expected symbol: AsyncGoTrueMFAAPI.enroll
  • auth.mfa.enroll → expected symbol: SyncGoTrueMFAAPI.enroll
  • auth.mfa.challenge → expected symbol: AsyncGoTrueMFAAPI.challenge
  • auth.mfa.challenge → expected symbol: SyncGoTrueMFAAPI.challenge
  • auth.mfa.verify → expected symbol: AsyncGoTrueMFAAPI.verify
  • auth.mfa.verify → expected symbol: SyncGoTrueMFAAPI.verify
  • auth.mfa.unenroll → expected symbol: AsyncGoTrueMFAAPI.unenroll
  • auth.mfa.unenroll → expected symbol: SyncGoTrueMFAAPI.unenroll
  • auth.mfa.challenge_and_verify → expected symbol: AsyncGoTrueMFAAPI.challenge_and_verify
  • auth.mfa.challenge_and_verify → expected symbol: SyncGoTrueMFAAPI.challenge_and_verify
  • auth.mfa.list_factors → expected symbol: AsyncGoTrueMFAAPI.list_factors
  • auth.mfa.list_factors → expected symbol: SyncGoTrueMFAAPI.list_factors
  • auth.mfa.get_authenticator_assurance_level → expected symbol: AsyncGoTrueMFAAPI.get_authenticator_assurance_level
  • auth.mfa.get_authenticator_assurance_level → expected symbol: SyncGoTrueMFAAPI.get_authenticator_assurance_level
  • auth.admin.create_user → expected symbol: AsyncGoTrueAdminAPI.create_user
  • auth.admin.create_user → expected symbol: SyncGoTrueAdminAPI.create_user
  • auth.admin.delete_user → expected symbol: AsyncGoTrueAdminAPI.delete_user
  • auth.admin.delete_user → expected symbol: SyncGoTrueAdminAPI.delete_user
  • auth.admin.update_user → expected symbol: AsyncGoTrueAdminAPI.update_user_by_id
  • auth.admin.update_user → expected symbol: SyncGoTrueAdminAPI.update_user_by_id
  • auth.admin.get_user → expected symbol: AsyncGoTrueAdminAPI.get_user_by_id
  • auth.admin.get_user → expected symbol: SyncGoTrueAdminAPI.get_user_by_id
  • auth.admin.list_users → expected symbol: AsyncGoTrueAdminAPI.list_users
  • auth.admin.list_users → expected symbol: SyncGoTrueAdminAPI.list_users
  • auth.admin.invite_user → expected symbol: AsyncGoTrueAdminAPI.invite_user_by_email
  • auth.admin.invite_user → expected symbol: SyncGoTrueAdminAPI.invite_user_by_email
  • auth.admin.sign_out → expected symbol: AsyncGoTrueAdminAPI.sign_out
  • auth.admin.sign_out → expected symbol: SyncGoTrueAdminAPI.sign_out
  • auth.admin.generate_link → expected symbol: AsyncGoTrueAdminAPI.generate_link
  • auth.admin.generate_link → expected symbol: SyncGoTrueAdminAPI.generate_link
  • auth.admin.list_mfa_factors → expected symbol: AsyncGoTrueAdminMFAAPI.list_factors
  • auth.admin.list_mfa_factors → expected symbol: SyncGoTrueAdminMFAAPI.list_factors
  • auth.admin.delete_mfa_factor → expected symbol: AsyncGoTrueAdminMFAAPI.delete_factor
  • auth.admin.delete_mfa_factor → expected symbol: SyncGoTrueAdminMFAAPI.delete_factor
  • auth.oauth_admin.create_client → expected symbol: AsyncGoTrueAdminOAuthAPI.create_client
  • auth.oauth_admin.create_client → expected symbol: SyncGoTrueAdminOAuthAPI.create_client
  • auth.oauth_admin.delete_client → expected symbol: AsyncGoTrueAdminOAuthAPI.delete_client
  • auth.oauth_admin.delete_client → expected symbol: SyncGoTrueAdminOAuthAPI.delete_client
  • auth.oauth_admin.get_client → expected symbol: AsyncGoTrueAdminOAuthAPI.get_client
  • auth.oauth_admin.get_client → expected symbol: SyncGoTrueAdminOAuthAPI.get_client
  • auth.oauth_admin.list_clients → expected symbol: AsyncGoTrueAdminOAuthAPI.list_clients
  • auth.oauth_admin.list_clients → expected symbol: SyncGoTrueAdminOAuthAPI.list_clients
  • auth.oauth_admin.regenerate_client_secret → expected symbol: AsyncGoTrueAdminOAuthAPI.regenerate_client_secret
  • auth.oauth_admin.regenerate_client_secret → expected symbol: SyncGoTrueAdminOAuthAPI.regenerate_client_secret
  • auth.oauth_admin.update_client → expected symbol: AsyncGoTrueAdminOAuthAPI.update_client
  • auth.oauth_admin.update_client → expected symbol: SyncGoTrueAdminOAuthAPI.update_client
  • database.query.from_table → expected symbol: AsyncPostgrestClient.from_
  • database.query.from_table → expected symbol: AsyncPostgrestClient.table
  • database.query.from_table → expected symbol: SyncPostgrestClient.from_
  • database.query.from_table → expected symbol: SyncPostgrestClient.table
  • database.query.select → expected symbol: AsyncRequestBuilder.select
  • database.query.select → expected symbol: SyncRequestBuilder.select
  • database.query.rpc → expected symbol: AsyncPostgrestClient.rpc
  • database.query.rpc → expected symbol: SyncPostgrestClient.rpc
  • database.mutate.insert → expected symbol: AsyncRequestBuilder.insert
  • database.mutate.insert → expected symbol: SyncRequestBuilder.insert
  • database.mutate.update → expected symbol: AsyncRequestBuilder.update
  • database.mutate.update → expected symbol: SyncRequestBuilder.update
  • database.mutate.upsert → expected symbol: AsyncRequestBuilder.upsert
  • database.mutate.upsert → expected symbol: SyncRequestBuilder.upsert
  • database.mutate.delete → expected symbol: AsyncRequestBuilder.delete
  • database.mutate.delete → expected symbol: SyncRequestBuilder.delete
  • database.using_modifiers.single_row → expected symbol: AsyncSelectRequestBuilder.single
  • database.using_modifiers.single_row → expected symbol: SyncSelectRequestBuilder.single
  • database.using_modifiers.maybe_single_row → expected symbol: AsyncSelectRequestBuilder.maybe_single
  • database.using_modifiers.maybe_single_row → expected symbol: SyncSelectRequestBuilder.maybe_single
  • database.using_modifiers.format_csv → expected symbol: AsyncSelectRequestBuilder.csv
  • database.using_modifiers.format_csv → expected symbol: SyncSelectRequestBuilder.csv
  • database.using_modifiers.explain → expected symbol: AsyncSelectRequestBuilder.explain
  • database.using_modifiers.explain → expected symbol: SyncSelectRequestBuilder.explain
  • database.configuration.auto_retry → expected symbol: AsyncSelectRequestBuilder.retry
  • database.configuration.auto_retry → expected symbol: SyncSelectRequestBuilder.retry
  • functions.invocation.invoke → expected symbol: AsyncFunctionsClient.invoke
  • functions.invocation.invoke → expected symbol: SyncFunctionsClient.invoke
  • functions.invocation.set_auth_token → expected symbol: AsyncFunctionsClient.set_auth
  • functions.invocation.set_auth_token → expected symbol: SyncFunctionsClient.set_auth
  • realtime.client.connect → expected symbol: AsyncRealtimeClient.connect
  • realtime.client.connect → expected symbol: SyncRealtimeClient.connect
  • realtime.client.disconnect → expected symbol: AsyncRealtimeClient.disconnect
  • realtime.client.disconnect → expected symbol: SyncRealtimeClient.disconnect
  • realtime.client.get_channels → expected symbol: AsyncRealtimeClient.get_channels
  • realtime.client.get_channels → expected symbol: SyncRealtimeClient.get_channels
  • realtime.client.remove_channel → expected symbol: AsyncRealtimeClient.remove_channel
  • realtime.client.remove_channel → expected symbol: SyncRealtimeClient.remove_channel
  • realtime.client.remove_all_channels → expected symbol: AsyncRealtimeClient.remove_all_channels
  • realtime.client.remove_all_channels → expected symbol: SyncRealtimeClient.remove_all_channels
  • realtime.client.set_auth_token → expected symbol: AsyncRealtimeClient.set_auth
  • realtime.client.set_auth_token → expected symbol: SyncRealtimeClient.set_auth
  • realtime.client.channel → expected symbol: AsyncRealtimeClient.channel
  • realtime.client.channel → expected symbol: SyncRealtimeClient.channel
  • realtime.channel.subscribe → expected symbol: AsyncRealtimeChannel.subscribe
  • realtime.channel.subscribe → expected symbol: SyncRealtimeChannel.subscribe
  • realtime.channel.unsubscribe → expected symbol: AsyncRealtimeChannel.unsubscribe
  • realtime.channel.unsubscribe → expected symbol: SyncRealtimeChannel.unsubscribe
  • realtime.channel.broadcast → expected symbol: AsyncRealtimeChannel.send_broadcast
  • realtime.channel.broadcast → expected symbol: SyncRealtimeChannel.send_broadcast
  • realtime.subscriptions.broadcast → expected symbol: AsyncRealtimeChannel.on_broadcast
  • realtime.subscriptions.broadcast → expected symbol: SyncRealtimeChannel.on_broadcast
  • realtime.subscriptions.postgres_changes → expected symbol: AsyncRealtimeChannel.on_postgres_changes
  • realtime.subscriptions.postgres_changes → expected symbol: SyncRealtimeChannel.on_postgres_changes
  • realtime.subscriptions.subscribe_presence → expected symbol: AsyncRealtimeChannel.on_presence_change
  • realtime.subscriptions.subscribe_presence → expected symbol: SyncRealtimeChannel.on_presence_change
  • realtime.presence.track → expected symbol: AsyncRealtimeChannel.track
  • realtime.presence.track → expected symbol: SyncRealtimeChannel.track
  • realtime.presence.untrack → expected symbol: AsyncRealtimeChannel.untrack
  • realtime.presence.untrack → expected symbol: SyncRealtimeChannel.untrack
  • realtime.presence.presence_state → expected symbol: AsyncRealtimeChannel.presences
  • realtime.presence.presence_state → expected symbol: SyncRealtimeChannel.presences
  • storage.file_buckets.create_file_bucket → expected symbol: AsyncStorageBucketAPI.create_bucket
  • storage.file_buckets.create_file_bucket → expected symbol: SyncStorageBucketAPI.create_bucket
  • storage.file_buckets.get_bucket → expected symbol: AsyncStorageBucketAPI.get_bucket
  • storage.file_buckets.get_bucket → expected symbol: SyncStorageBucketAPI.get_bucket
  • storage.file_buckets.list_file_buckets → expected symbol: AsyncStorageBucketAPI.list_buckets
  • storage.file_buckets.list_file_buckets → expected symbol: SyncStorageBucketAPI.list_buckets
  • storage.file_buckets.update_bucket → expected symbol: AsyncStorageBucketAPI.update_bucket
  • storage.file_buckets.update_bucket → expected symbol: SyncStorageBucketAPI.update_bucket
  • storage.file_buckets.delete_file_bucket → expected symbol: AsyncStorageBucketAPI.delete_bucket
  • storage.file_buckets.delete_file_bucket → expected symbol: SyncStorageBucketAPI.delete_bucket
  • storage.file_buckets.empty_bucket → expected symbol: AsyncStorageBucketAPI.empty_bucket
  • storage.file_buckets.empty_bucket → expected symbol: SyncStorageBucketAPI.empty_bucket
  • storage.file_buckets.upload → expected symbol: AsyncBucketActionsMixin.upload
  • storage.file_buckets.upload → expected symbol: SyncBucketActionsMixin.upload
  • storage.file_buckets.download → expected symbol: AsyncBucketActionsMixin.download
  • storage.file_buckets.download → expected symbol: SyncBucketActionsMixin.download
  • storage.file_buckets.list_files → expected symbol: AsyncBucketActionsMixin.list
  • storage.file_buckets.list_files → expected symbol: SyncBucketActionsMixin.list
  • storage.file_buckets.list_files → expected symbol: AsyncBucketActionsMixin.list_v2
  • storage.file_buckets.list_files → expected symbol: SyncBucketActionsMixin.list_v2
  • storage.file_buckets.move → expected symbol: AsyncBucketActionsMixin.move
  • storage.file_buckets.move → expected symbol: SyncBucketActionsMixin.move
  • storage.file_buckets.copy → expected symbol: AsyncBucketActionsMixin.copy
  • storage.file_buckets.copy → expected symbol: SyncBucketActionsMixin.copy
  • storage.file_buckets.remove → expected symbol: AsyncBucketActionsMixin.remove
  • storage.file_buckets.remove → expected symbol: SyncBucketActionsMixin.remove
  • storage.file_buckets.get_public_url → expected symbol: AsyncBucketActionsMixin.get_public_url
  • storage.file_buckets.get_public_url → expected symbol: SyncBucketActionsMixin.get_public_url
  • storage.file_buckets.create_signed_url → expected symbol: AsyncBucketActionsMixin.create_signed_url
  • storage.file_buckets.create_signed_url → expected symbol: SyncBucketActionsMixin.create_signed_url
  • storage.file_buckets.create_signed_urls → expected symbol: AsyncBucketActionsMixin.create_signed_urls
  • storage.file_buckets.create_signed_urls → expected symbol: SyncBucketActionsMixin.create_signed_urls
  • storage.file_buckets.create_signed_upload_url → expected symbol: AsyncBucketActionsMixin.create_signed_upload_url
  • storage.file_buckets.create_signed_upload_url → expected symbol: SyncBucketActionsMixin.create_signed_upload_url
  • storage.file_buckets.upload_with_signed_url → expected symbol: AsyncBucketActionsMixin.upload_to_signed_url
  • storage.file_buckets.upload_with_signed_url → expected symbol: SyncBucketActionsMixin.upload_to_signed_url
  • storage.file_buckets.update_file → expected symbol: AsyncBucketActionsMixin.update
  • storage.file_buckets.update_file → expected symbol: SyncBucketActionsMixin.update
  • storage.file_buckets.file_exists → expected symbol: AsyncBucketActionsMixin.exists
  • storage.file_buckets.file_exists → expected symbol: SyncBucketActionsMixin.exists
  • storage.file_buckets.file_info → expected symbol: AsyncBucketActionsMixin.info
  • storage.file_buckets.file_info → expected symbol: SyncBucketActionsMixin.info
  • storage.file_buckets.download_with_transform → expected symbol: AsyncBucketActionsMixin.create_signed_url
  • storage.file_buckets.download_with_transform → expected symbol: SyncBucketActionsMixin.create_signed_url
  • storage.file_buckets.upload_with_metadata → expected symbol: AsyncBucketActionsMixin.upload
  • storage.file_buckets.upload_with_metadata → expected symbol: SyncBucketActionsMixin.upload
  • storage.file_buckets.url_cache_nonce → expected symbol: AsyncBucketActionsMixin.download
  • storage.file_buckets.url_cache_nonce → expected symbol: SyncBucketActionsMixin.download
  • storage.vector_buckets.create_vector_bucket → expected symbol: AsyncStorageVectorsClient.create_bucket
  • storage.vector_buckets.create_vector_bucket → expected symbol: SyncStorageVectorsClient.create_bucket
  • storage.vector_buckets.list_vector_buckets → expected symbol: AsyncStorageVectorsClient.list_buckets
  • storage.vector_buckets.list_vector_buckets → expected symbol: SyncStorageVectorsClient.list_buckets
  • storage.vector_buckets.delete_vector_bucket → expected symbol: AsyncStorageVectorsClient.delete_bucket
  • storage.vector_buckets.delete_vector_bucket → expected symbol: SyncStorageVectorsClient.delete_bucket
  • storage.vector_buckets.access_vector_index → expected symbol: AsyncStorageClient.vectors
  • storage.vector_buckets.access_vector_index → expected symbol: AsyncStorageVectorsClient.from_
  • storage.vector_buckets.access_vector_index → expected symbol: AsyncVectorBucketScope.index
  • storage.vector_buckets.access_vector_index → expected symbol: SyncStorageClient.vectors
  • storage.vector_buckets.access_vector_index → expected symbol: SyncStorageVectorsClient.from_
  • storage.vector_buckets.access_vector_index → expected symbol: SyncVectorBucketScope.index
  • storage.vector_buckets.create_index → expected symbol: AsyncVectorBucketScope.create_index
  • storage.vector_buckets.create_index → expected symbol: SyncVectorBucketScope.create_index
  • storage.vector_buckets.delete_index → expected symbol: AsyncVectorBucketScope.delete_index
  • storage.vector_buckets.delete_index → expected symbol: SyncVectorBucketScope.delete_index
  • storage.vector_buckets.get_index → expected symbol: AsyncVectorBucketScope.get_index
  • storage.vector_buckets.get_index → expected symbol: SyncVectorBucketScope.get_index
  • storage.vector_buckets.list_indexes → expected symbol: AsyncVectorBucketScope.list_indexes
  • storage.vector_buckets.list_indexes → expected symbol: SyncVectorBucketScope.list_indexes
  • storage.vector_buckets.put_vectors → expected symbol: AsyncVectorIndexScope.put
  • storage.vector_buckets.put_vectors → expected symbol: SyncVectorIndexScope.put
  • storage.vector_buckets.get_vectors → expected symbol: AsyncVectorIndexScope.get
  • storage.vector_buckets.get_vectors → expected symbol: SyncVectorIndexScope.get
  • storage.vector_buckets.delete_vectors → expected symbol: AsyncVectorIndexScope.delete
  • storage.vector_buckets.delete_vectors → expected symbol: SyncVectorIndexScope.delete
  • storage.vector_buckets.list_vectors → expected symbol: AsyncVectorIndexScope.list
  • storage.vector_buckets.list_vectors → expected symbol: SyncVectorIndexScope.list
  • storage.vector_buckets.query_vectors → expected symbol: AsyncVectorIndexScope.query
  • storage.vector_buckets.query_vectors → expected symbol: SyncVectorIndexScope.query
  • storage.vector_buckets.parallel_scan → expected symbol: AsyncVectorIndexScope.list
  • storage.vector_buckets.parallel_scan → expected symbol: SyncVectorIndexScope.list
  • storage.analytics.create_analytics_bucket → expected symbol: AsyncStorageAnalyticsClient.create
  • storage.analytics.create_analytics_bucket → expected symbol: SyncStorageAnalyticsClient.create
  • storage.analytics.list_analytics_buckets → expected symbol: AsyncStorageAnalyticsClient.list
  • storage.analytics.list_analytics_buckets → expected symbol: SyncStorageAnalyticsClient.list
  • storage.analytics.delete_analytics_bucket → expected symbol: AsyncStorageAnalyticsClient.delete
  • storage.analytics.delete_analytics_bucket → expected symbol: SyncStorageAnalyticsClient.delete
  • storage.analytics.access_catalog → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.access_catalog → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.create_namespace → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.create_namespace → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.list_namespaces → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.list_namespaces → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.delete_namespace → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.delete_namespace → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.load_namespace_metadata → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.load_namespace_metadata → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.namespace_exists → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.namespace_exists → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.update_namespace_properties → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.update_namespace_properties → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.create_table → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.create_table → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.list_tables → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.list_tables → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.load_table → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.load_table → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.update_table → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.update_table → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.rename_table → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.rename_table → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.delete_table → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.delete_table → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.register_table → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.register_table → expected symbol: SyncStorageAnalyticsClient.catalog
  • storage.analytics.table_exists → expected symbol: AsyncStorageAnalyticsClient.catalog
  • storage.analytics.table_exists → expected symbol: SyncStorageAnalyticsClient.catalog

The following capabilities are marked implemented in python but have no registered symbols to verify:

  • auth.session.auto_refresh (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.cross_client_token_sync (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.oauth_flow_type (no symbols list — cannot confirm implementation exists)
  • client.session_management.custom_storage (no symbols list — cannot confirm implementation exists)
  • client.session_management.persist_session (no symbols list — cannot confirm implementation exists)
  • client.request_configuration.custom_http_client (no symbols list — cannot confirm implementation exists)
  • client.request_configuration.global_headers (no symbols list — cannot confirm implementation exists)
  • database.mutate.select_after_mutation (no symbols list — cannot confirm implementation exists)
  • database.mutate.bulk_rows_with_differing_fields (no symbols list — cannot confirm implementation exists)
  • database.mutate.count (no symbols list — cannot confirm implementation exists)
  • database.mutate.missing_defaults (no symbols list — cannot confirm implementation exists)
  • database.using_filters.eq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.neq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike (no symbols list — cannot confirm implementation exists)
  • database.using_filters.is (no symbols list — cannot confirm implementation exists)
  • database.using_filters.in (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contains (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contained_by (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_adjacent (no symbols list — cannot confirm implementation exists)
  • database.using_filters.overlaps (no symbols list — cannot confirm implementation exists)
  • database.using_filters.text_search (no symbols list — cannot confirm implementation exists)
  • database.using_filters.match (no symbols list — cannot confirm implementation exists)
  • database.using_filters.not (no symbols list — cannot confirm implementation exists)
  • database.using_filters.or (no symbols list — cannot confirm implementation exists)
  • database.using_filters.raw (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex_icase (no symbols list — cannot confirm implementation exists)
  • database.using_filters.not_in (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.order (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.limit (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.range (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.request_cancellation (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.relationship_embed (no symbols list — cannot confirm implementation exists)
  • database.configuration.request_timeout (no symbols list — cannot confirm implementation exists)
  • functions.invocation.method_override (no symbols list — cannot confirm implementation exists)
  • functions.invocation.region_selection (no symbols list — cannot confirm implementation exists)
  • functions.invocation.request_cancellation (no symbols list — cannot confirm implementation exists)
  • functions.invocation.timeout (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.postgres_changes_filter (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.private_channel (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_self (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_replay (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.postgres_changes_multiple_filters (no symbols list — cannot confirm implementation exists)
  • realtime.presence.presence_key (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.heartbeat_interval (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.access_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.request_cancellation (no symbols list — cannot confirm implementation exists)

These may have been renamed, removed, or never registered. Please update the capability matrix.
See: https://github.com/supabase/sdk/blob/main/packages/capability-matrix/docs/capability-matrix.md

@grdsdev grdsdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review notes below. Three findings are on lines outside the diff, so they are here:

client.py:287 — a second remove_all_channels() raises ValueError. unsubscribe() now removes the channel from self.channels. A second call (or a call with no channels) builds an empty task list, and asyncio.wait([]) raises ValueError: Set of Tasks/Futures is empty. Before this PR, the second call only resent leave. set_auth already guards this case with if tasks:.

client.py:135 — ConnectionClosed skips the backoff. The 60 s cap applies only to the TimeoutError/OSError path. except websockets.ConnectionClosed: continue reconnects at once, and retries resets on each successful connect. If the server accepts and then closes at once (bad apikey, overload), the client spins in a tight connect/close loop. Suggest that this path also goes through exponential_delay.

client.py:354 — endpoint_url() repeats the old query logic. It still uses with_query(**self.url.query, vsn=VSN), the pattern this PR replaced in normalize_url. Nothing in src calls it. Suggest deleting it, or making it call normalize_url(self.url, self.last_token).

Comment thread src/realtime/src/realtime/channel.py Resolved
Comment thread src/realtime/src/realtime/channel.py Resolved
Comment thread src/realtime/src/realtime/channel.py Resolved
Comment thread src/realtime/src/realtime/client.py Resolved
Comment thread src/realtime/src/realtime/client.py Resolved
Comment thread src/realtime/README.md Resolved
Comment thread src/realtime/tests/test_connection.py Resolved
@spydon
spydon force-pushed the v3-sync/08-realtime branch from de2c215 to ba1a9de Compare October 21, 2026 07:13
@spydon
spydon force-pushed the v3-sync/08-realtime branch from ba1a9de to 59efdb1 Compare October 21, 2026 07:46
@spydon
spydon force-pushed the v3-sync/08-realtime branch from 59efdb1 to afc0afe Compare October 22, 2026 07:49
@spydon
spydon force-pushed the v3-sync/08-realtime branch 2 times, most recently from 079980b to d4624e0 Compare October 26, 2026 13:45
@spydon
spydon force-pushed the v3-sync/08-realtime branch from d4624e0 to 5ec771c Compare October 26, 2026 14:08
@spydon
spydon removed this pull request from stack #1799 October 26, 2026 15:40
@spydon
spydon added this pull request to stack #1841 October 26, 2026 15:40
@spydon
spydon removed this pull request from stack #1841 October 26, 2026 15:42
@spydon
spydon added this pull request to stack #1842 October 26, 2026 15:42
@spydon
spydon force-pushed the v3-sync/08-realtime branch from cabd69e to a5f04cf Compare October 27, 2026 16:48
@spydon
spydon force-pushed the v3-sync/08-realtime branch 3 times, most recently from 6541e1d to fe04801 Compare October 27, 2026 17:14
@spydon
spydon force-pushed the v3-sync/08-realtime branch from fe04801 to 9f5e02a Compare October 27, 2026 17:16
@spydon
spydon force-pushed the v3-sync/08-realtime branch 3 times, most recently from 33db9d8 to 9efaadd Compare October 27, 2026 19:48
@spydon
spydon force-pushed the v3-sync/08-realtime branch from 9efaadd to a14928d Compare October 28, 2026 08:30
Base automatically changed from v3-sync/07-storage to v3 October 28, 2026 08:51
filipecabaco and others added 9 commits October 28, 2026 09:51
…treams on leave

The server does not reply to access_token, so set_auth() now sends it without waiting and the test mock no longer acks it. joined is derived from state, unsubscribe() delivers a close message to the messages iterator, channel() warns when it ignores different options, remove_channel() only unsubscribes the given channel, remove_all_channels() can run twice, a closed connection backs off before reconnecting, endpoint_url() uses normalize_url(), and the README examples added here use the v3 API.
…on reconnect

subscribe() registers the channel again and clears stale messages, so the same object can be resubscribed after unsubscribe(), and it no longer writes the token into shared options. unsubscribe() deregisters before leaving, so the iterator gets one close message instead of two. automatically_reconnect() applies the backoff and max_retries to closed connections as well, resets the retry count only after a connection has been healthy for a minute, and also reconnects on asyncio.TimeoutError, which differs from TimeoutError on Python 3.10. Failures while unsubscribing all channels or sending a new token are logged instead of left unretrieved, and the README documents the v3 API throughout.
joined is now a property derived from the channel state, so it is a public symbol of RealtimeChannel.
@spydon
spydon force-pushed the v3-sync/08-realtime branch from a14928d to 89a38b6 Compare October 28, 2026 08:51
@spydon
spydon merged commit 145597d into v3 Oct 28, 2026
36 checks passed
@spydon
spydon deleted the v3-sync/08-realtime branch October 28, 2026 08:59
spydon added a commit that referenced this pull request Nov 3, 2026
## Why

Concurrent initial channel subscriptions can open two WebSockets on one
client. The second assignment loses the first socket, which remains
alive after `close()`.

Closes #1852.

## What changed

- Serialize the opening handshake and recheck the connection under a
lazy client lock.
- Add a real localhost WebSocket regression for concurrent
subscriptions, a sequential control, cancellation, and failed-handshake
retry.

## Scope

This covers initial connection ownership in the current Realtime API.
Reconnect policy and the v3 lifecycle rewrite in #1798 remain separate.
Legacy
[realtime-py#290](supabase/realtime-py#290)
handles background-task cancellation rather than duplicate handshakes.

## Tradeoffs

Create the lock inside `connect()` so clients constructed before
`asyncio.run()` work on Python 3.9. Keep buffered-send setup outside the
lock because it can trigger a reconnect.

## Blast radius

Only the async Realtime client changes. No public signatures,
dependencies, or retry settings change.

## Verification

- New tests on untouched upstream fail twice with two sockets and one
orphan. The fix passes all four tests, including on Python 3.9. The
public wire reproduction now reports one socket and none after close.
- No-service package selection passes 28 tests. Existing AsyncPush
teardown diagnostics also occur on upstream. Mypy, Ruff, format, `make
ruff`, wheel and sdist build, and `git diff --check` pass.
- Full Supabase service tests are unverified. Isolated CLI startup fails
before services start because Docker image blobs return input/output
errors.

AI-assisted contribution. Reproductions and checks were run locally.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Concurrent connection attempts now share a single WebSocket
connection, preventing duplicate connections during startup.
* Cancelling a waiting connection attempt no longer interrupts the
connection in progress. Failed handshakes can be retried, and connection
attempts remain reliable across event loops.
* **Tests**
* Added coverage for concurrent startup, cancellation, retry after a
failed handshake, and connections across separate event loops.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Lukas Klingsbo <[email protected]>
spydon added a commit that referenced this pull request Nov 17, 2026
…ssions (#2114)

Step 5 of SDK-2765, port of supabase-flutter #1797 and #1798. Closes
SDK-2988.

- `json_text()`, `json_text_at()`, `json_object()`, `json_object_at()`
on JSON columns return a `JsonPath`, which filters, orders and has
`is_null()`. Operands of a `->` path are sent as JSON.
- `cast(sql_type, value_type)`, `sum()`, `avg()`, `min()`, `max()`,
`count()` and `DerivedExpression.count_all()` return a select-only
`DerivedExpression`, so filtering or ordering on one is a type error. A
cast of a cast and an aggregate of an aggregate raise `ValueError`.
- `select_only()` takes any `Expression`. JSON paths and derived
expressions are aliased to their own expression (shortened past 63 bytes
like Dart) and `PartialRow` reads them by `response_key`.
`min()`/`max()` decode as the column, `sum()` without its `Field`
constraints, `avg()` as `Decimal` over `Decimal`.
- The select list cleaner no longer strips whitespace after an escaped
quote inside a quoted alias.
- Test stack enables `db_aggregates_enabled`. Integration tests cover
each new expression.
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.

5 participants