wbapi-async 0.7.3__tar.gz → 0.7.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbapi-async
3
- Version: 0.7.3
3
+ Version: 0.7.4
4
4
  Summary: Asynchronous client for Wildberries API
5
5
  Project-URL: Documentation, https://serdukow.github.io/wbapi-async/
6
6
  Project-URL: Repository, https://github.com/serdukow/wbapi-async
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "wbapi-async"
7
- version = "0.7.3"
7
+ version = "0.7.4"
8
8
  description = "Asynchronous client for Wildberries API"
9
9
  authors = [
10
10
  { name = "Andrei Serdiukov", email = "asyncdf@gmail.com" },
@@ -543,9 +543,16 @@ class MethodDispatcher:
543
543
  *,
544
544
  params: dict[str, Any] | None = None,
545
545
  json: Any | None = None,
546
- unofficial: bool = False,
546
+ no_auth: bool = False,
547
547
  ) -> Any:
548
- if not unofficial:
548
+ from urllib.parse import urlparse
549
+
550
+ if not no_auth and path.startswith(("https://", "http://")):
551
+ no_auth = urlparse(path).netloc in _EXTRA_ALLOWED_HOSTS
552
+
553
+ if no_auth:
554
+ self._session.headers.authorization = None
555
+ else:
549
556
  self._session.headers.set_token(self._token)
550
557
  url = resolve_url(path)
551
558
  limiter = _get_limiter(path)
File without changes
File without changes
File without changes