Skip to content

Commit f1b35e8

Browse files
Add typing_extensions as a dependency.
1 parent 3b10860 commit f1b35e8

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

doc/src/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Common Changes
3838
#) Fixed bug when attempting to execute an empty statement
3939
(`issue 525 <https://github.com/oracle/python-oracledb/issues/525>`__).
4040
#) API documentation is now generated from the source code.
41+
#) Internal change: typing_extensions is now a dependency.
4142

4243

4344
oracledb `3.3.0 <https://github.com/oracle/python-oracledb/compare/v3.2.0...v3.3.0>`__ (July 2025)

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ classifiers = [
3434
"Topic :: Database",
3535
]
3636
requires-python = ">=3.9"
37-
dependencies = ["cryptography>=3.2.1"]
37+
dependencies = [
38+
"cryptography>=3.2.1",
39+
"typing_extensions>=4.14.0",
40+
]
3841
dynamic = ["version"]
3942

4043
[project.readme]

src/oracledb/soda.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
# -----------------------------------------------------------------------------
3131

3232
from typing import Any, Optional, Union
33+
from typing_extensions import Self
3334
import json
3435

3536
from . import errors
@@ -519,7 +520,7 @@ def count(self) -> int:
519520
"""
520521
return self._collection._impl.get_count(self)
521522

522-
def fetchArraySize(self, value: int) -> "SodaOperation":
523+
def fetchArraySize(self, value: int) -> Self:
523524
"""
524525
This is a tuning method to specify the number of documents that are
525526
internally fetched in batches by calls to
@@ -543,7 +544,7 @@ def fetchArraySize(self, value: int) -> "SodaOperation":
543544
self._fetch_array_size = value
544545
return self
545546

546-
def filter(self, value: Union[dict, str]) -> "SodaOperation":
547+
def filter(self, value: Union[dict, str]) -> Self:
547548
"""
548549
Sets a filter specification for complex document queries and ordering
549550
of JSON documents. Filter specifications must be provided as a
@@ -585,7 +586,7 @@ def getOne(self) -> Union["SodaDocument", None]:
585586
if doc_impl is not None:
586587
return SodaDocument._from_impl(doc_impl)
587588

588-
def hint(self, value: str) -> "SodaOperation":
589+
def hint(self, value: str) -> Self:
589590
"""
590591
Specifies a hint that will be provided to the SODA operation when it is
591592
performed. This is expected to be a string in the same format as SQL
@@ -603,7 +604,7 @@ def hint(self, value: str) -> "SodaOperation":
603604
self._hint = value
604605
return self
605606

606-
def lock(self) -> "SodaOperation":
607+
def lock(self) -> Self:
607608
"""
608609
Specifies whether the documents fetched from the collection should be
609610
locked (equivalent to SQL "select for update"). Use of this method
@@ -628,7 +629,7 @@ def lock(self) -> "SodaOperation":
628629
self._lock = True
629630
return self
630631

631-
def key(self, value: str) -> "SodaOperation":
632+
def key(self, value: str) -> Self:
632633
"""
633634
Specifies that the document with the specified key should be returned.
634635
This causes any previous calls made to this method and
@@ -643,7 +644,7 @@ def key(self, value: str) -> "SodaOperation":
643644
self._keys = None
644645
return self
645646

646-
def keys(self, value: list) -> "SodaOperation":
647+
def keys(self, value: list) -> Self:
647648
"""
648649
Specifies that documents that match the keys found in the supplied
649650
sequence should be returned. This causes any previous calls made to
@@ -660,7 +661,7 @@ def keys(self, value: list) -> "SodaOperation":
660661
self._key = None
661662
return self
662663

663-
def limit(self, value: int) -> "SodaOperation":
664+
def limit(self, value: int) -> Self:
664665
"""
665666
Specifies that only the specified number of documents should be
666667
returned. This method is only usable for read operations such as
@@ -711,7 +712,7 @@ def replaceOneAndGet(self, doc: Any) -> "SodaDocument":
711712
)
712713
return SodaDocument._from_impl(return_doc_impl)
713714

714-
def skip(self, value: int) -> "SodaOperation":
715+
def skip(self, value: int) -> Self:
715716
"""
716717
Specifies the number of documents that match the other criteria that
717718
will be skipped. This method is only usable for read operations such as
@@ -727,7 +728,7 @@ def skip(self, value: int) -> "SodaOperation":
727728
self._skip = value
728729
return self
729730

730-
def version(self, value: str) -> "SodaOperation":
731+
def version(self, value: str) -> Self:
731732
"""
732733
Specifies that documents with the specified version should be returned.
733734
Typically this is used with :meth:`~SodaOperation.key()` to implement

0 commit comments

Comments
 (0)