@@ -103,7 +103,7 @@ def test_client_init():
103103 assert isinstance (client ._client , QdrantLocal )
104104 assert client ._client .location == tmpdir + "/test.db"
105105
106- client = QdrantClient ()
106+ client = QdrantClient (check_compatibility = False )
107107 assert isinstance (client ._client , QdrantRemote )
108108 assert client ._client .rest_uri == "http://localhost:6333"
109109
@@ -113,96 +113,103 @@ def test_client_init():
113113 client = QdrantClient (check_compatibility = False )
114114 assert isinstance (client ._client , QdrantRemote )
115115
116- client = QdrantClient (prefer_grpc = True )
116+ client = QdrantClient (prefer_grpc = True , check_compatibility = False )
117117 assert isinstance (client ._client , QdrantRemote )
118118
119- client = QdrantClient (https = True )
119+ client = QdrantClient (https = True , check_compatibility = False )
120120 assert isinstance (client ._client , QdrantRemote )
121121 assert client ._client .rest_uri == "https://localhost:6333"
122122
123- client = QdrantClient (https = True , port = 7333 )
123+ client = QdrantClient (https = True , port = 7333 , check_compatibility = False )
124124 assert isinstance (client ._client , QdrantRemote )
125125 assert client ._client .rest_uri == "https://localhost:7333"
126126
127- client = QdrantClient (host = "hidden_port_addr.com" , prefix = "custom" )
127+ client = QdrantClient (host = "hidden_port_addr.com" , prefix = "custom" , check_compatibility = False )
128128 assert isinstance (client ._client , QdrantRemote )
129129 assert client ._client .rest_uri == "http://hidden_port_addr.com:6333/custom"
130130
131- client = QdrantClient (host = "hidden_port_addr.com" , port = None )
131+ client = QdrantClient (host = "hidden_port_addr.com" , port = None , check_compatibility = False )
132132 assert isinstance (client ._client , QdrantRemote )
133133 assert client ._client .rest_uri == "http://hidden_port_addr.com"
134134
135135 client = QdrantClient (
136136 host = "hidden_port_addr.com" ,
137137 port = None ,
138138 prefix = "custom" ,
139+ check_compatibility = False ,
139140 )
140141 assert isinstance (client ._client , QdrantRemote )
141142 assert client ._client .rest_uri == "http://hidden_port_addr.com/custom"
142143
143- client = QdrantClient ("http://hidden_port_addr.com" , port = None )
144+ client = QdrantClient ("http://hidden_port_addr.com" , port = None , check_compatibility = False )
144145 assert isinstance (client ._client , QdrantRemote )
145146 assert client ._client .rest_uri == "http://hidden_port_addr.com"
146147
147148 # url takes precedence over port, which has default value for a backward compatibility
148- client = QdrantClient (url = "http://localhost:6333" , port = 7333 )
149+ client = QdrantClient (url = "http://localhost:6333" , port = 7333 , check_compatibility = False )
149150 assert isinstance (client ._client , QdrantRemote )
150151 assert client ._client .rest_uri == "http://localhost:6333"
151152
152- client = QdrantClient (url = "http://localhost:6333" , prefix = "custom" )
153+ client = QdrantClient (url = "http://localhost:6333" , prefix = "custom" , check_compatibility = False )
153154 assert isinstance (client ._client , QdrantRemote )
154155 assert client ._client .rest_uri == "http://localhost:6333/custom"
155156
156157 for prefix in ("api/v1" , "/api/v1" ):
157- client = QdrantClient (url = "http://localhost:6333" , prefix = prefix )
158+ client = QdrantClient (
159+ url = "http://localhost:6333" , prefix = prefix , check_compatibility = False
160+ )
158161 assert (
159162 isinstance (client ._client , QdrantRemote )
160163 and client ._client .rest_uri == "http://localhost:6333/api/v1"
161164 )
162165
163- client = QdrantClient (host = "localhost" , prefix = prefix )
166+ client = QdrantClient (host = "localhost" , prefix = prefix , check_compatibility = False )
164167 assert (
165168 isinstance (client ._client , QdrantRemote )
166169 and client ._client .rest_uri == "http://localhost:6333/api/v1"
167170 )
168171
169172 for prefix in ("api/v1/" , "/api/v1/" ):
170- client = QdrantClient (url = "http://localhost:6333" , prefix = prefix )
173+ client = QdrantClient (
174+ url = "http://localhost:6333" , prefix = prefix , check_compatibility = False
175+ )
171176 assert (
172177 isinstance (client ._client , QdrantRemote )
173178 and client ._client .rest_uri == "http://localhost:6333/api/v1/"
174179 )
175180
176- client = QdrantClient (host = "localhost" , prefix = prefix )
181+ client = QdrantClient (host = "localhost" , prefix = prefix , check_compatibility = False )
177182 assert (
178183 isinstance (client ._client , QdrantRemote )
179184 and client ._client .rest_uri == "http://localhost:6333/api/v1/"
180185 )
181186
182- client = QdrantClient (url = "http://localhost:6333/custom" )
187+ client = QdrantClient (url = "http://localhost:6333/custom" , check_compatibility = False )
183188 assert isinstance (client ._client , QdrantRemote )
184189 assert client ._client .rest_uri == "http://localhost:6333/custom"
185190 assert client ._client ._prefix == "/custom"
186191
187- client = QdrantClient ("my-domain.com" )
192+ client = QdrantClient ("my-domain.com" , check_compatibility = False )
188193 assert isinstance (client ._client , QdrantRemote )
189194 assert client ._client .rest_uri == "http://my-domain.com:6333"
190195
191- client = QdrantClient ("my-domain.com:80" )
196+ client = QdrantClient ("my-domain.com:80" , check_compatibility = False )
192197 assert isinstance (client ._client , QdrantRemote )
193198 assert client ._client .rest_uri == "http://my-domain.com:80"
194199
195200 with pytest .raises (ValueError ):
196- QdrantClient (url = "http://localhost:6333" , host = "localhost" )
201+ QdrantClient (url = "http://localhost:6333" , host = "localhost" , check_compatibility = False )
197202
198203 with pytest .raises (ValueError ):
199- QdrantClient (url = "http://localhost:6333/origin" , prefix = "custom" )
204+ QdrantClient (
205+ url = "http://localhost:6333/origin" , prefix = "custom" , check_compatibility = False
206+ )
200207
201- client = QdrantClient ("127.0.0.1:6333" )
208+ client = QdrantClient ("127.0.0.1:6333" , check_compatibility = False )
202209 assert isinstance (client ._client , QdrantRemote )
203210 assert client ._client .rest_uri == "http://127.0.0.1:6333"
204211
205- client = QdrantClient ("localhost:6333" )
212+ client = QdrantClient ("localhost:6333" , check_compatibility = False )
206213 assert isinstance (client ._client , QdrantRemote )
207214 assert client ._client .rest_uri == "http://localhost:6333"
208215
@@ -225,7 +232,10 @@ def test_client_init():
225232 QdrantClient (** params )
226233
227234 client = QdrantClient (
228- url = "http://localhost:6333" , prefix = "custom" , metadata = {"some-rest-meta" : "some-value" }
235+ url = "http://localhost:6333" ,
236+ prefix = "custom" ,
237+ metadata = {"some-rest-meta" : "some-value" },
238+ check_compatibility = False ,
229239 )
230240 assert client .init_options ["url" ] == "http://localhost:6333"
231241 assert client .init_options ["prefix" ] == "custom"
0 commit comments