]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
docs: add news entry and docs about numpy scalars support
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 9 Jan 2023 08:30:41 +0000 (08:30 +0000)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 5 Aug 2023 14:21:30 +0000 (15:21 +0100)
docs/basic/adapt.rst
docs/conf.py
docs/news.rst

index 069af7cfc71d662b47ad2d3b70958f7bd5eb2327..91e8e6409571fb4b279562e4b840709f515981fd 100644 (file)
@@ -34,6 +34,9 @@ Python `bool` values `!True` and `!False` are converted to the equivalent
 
 .. __: https://www.postgresql.org/docs/current/datatype-boolean.html
 
+.. versionchanged:: 3.2
+    `numpy.bool_` values can be dumped too.
+
 
 .. index::
     single: Adaptation; numbers
@@ -73,6 +76,13 @@ promoted to the larger Python counterpart.
     an adapter to :ref:`cast PostgreSQL numeric to Python float
     <adapt-example-float>`. This of course may imply a loss of precision.
 
+.. versionchanged:: 3.2
+
+   NumPy integer__ and `floating point`__ values can be dumped too.
+
+.. __: https://numpy.org/doc/stable/reference/arrays.scalars.html#integer-types
+.. __: https://numpy.org/doc/stable/reference/arrays.scalars.html#floating-point-types
+
 
 .. index::
     pair: Strings; Adaptation
index 4677385ef07e9135dd7d80c67cb9751e80b9ad21..cafcb5e60a7c61754ae624816585b2a1978cfe2a 100644 (file)
@@ -100,6 +100,7 @@ default_role = "obj"
 intersphinx_mapping = {
     "py": ("https://docs.python.org/3", None),
     "pg2": ("https://www.psycopg.org/docs/", None),
+    "numpy": ("https://numpy.org/doc/stable/", None),
 }
 
 autodoc_member_order = "bysource"
index 7d5e2e9c02672d3f70821af71dd4b875316d3765..b306f6e39d6e1164aab322e6ed069e6208a02d1d 100644 (file)
@@ -13,6 +13,8 @@ Future releases
 Psycopg 3.2 (unreleased)
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
+- Add support for integer, floating point, boolean `NumPy scalar types`__
+  (:ticket:`#332`).
 - Add support for libpq functions to close prepared statements and portals
   introduced in libpq v17 (:ticket:`#603`).
 - Disable receiving more than one result on the same cursor in pipeline mode,
@@ -21,6 +23,8 @@ Psycopg 3.2 (unreleased)
   The `Cursor` now only preserves the results set of the last
   `~Cursor.execute()`, consistently with non-pipeline mode.
 
+.. __: https://numpy.org/doc/stable/reference/arrays.scalars.html#built-in-scalar-types
+
 
 Current release
 ---------------