"sphinx.ext.intersphinx",
"sphinx_autodoc_typehints",
"sql_role",
+ "ticket_role",
"pg3_docs",
"libpq_docs",
]
# PostgreSQL docs version to link libpq functions to
libpq_docs_version = "13"
+
+# Where to point on :ticket: role
+ticket_url = "https://github.com/psycopg/psycopg/issues/%s"
--- /dev/null
+# type: ignore
+"""
+ ticket role
+ ~~~~~~~~~~~
+
+ An interpreted text role to link docs to tickets issues.
+
+ :copyright: Copyright 2013-2021 by Daniele Varrazzo.
+ :copyright: Copyright 2021 The Psycopg Team
+"""
+
+import re
+from docutils import nodes, utils
+from docutils.parsers.rst import roles
+
+
+def ticket_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
+ cfg = inliner.document.settings.env.app.config
+ if cfg.ticket_url is None:
+ msg = inliner.reporter.warning(
+ "ticket not configured: please configure ticket_url in conf.py"
+ )
+ prb = inliner.problematic(rawtext, rawtext, msg)
+ return [prb], [msg]
+
+ rv = [nodes.Text(name + " ")]
+ tokens = re.findall(r"(#?\d+)|([^\d#]+)", text)
+ for ticket, noise in tokens:
+ if ticket:
+ num = int(ticket.replace("#", ""))
+
+ url = cfg.ticket_url % num
+ roles.set_classes(options)
+ node = nodes.reference(
+ ticket, utils.unescape(ticket), refuri=url, **options
+ )
+
+ rv.append(node)
+
+ else:
+ assert noise
+ rv.append(nodes.Text(noise))
+
+ return rv, []
+
+
+def setup(app):
+ app.add_config_value("ticket_url", None, "env")
+ app.add_role("ticket", ticket_role)
+ app.add_role("tickets", ticket_role)
--- /dev/null
+.. index::
+ single: Release notes
+ single: News
+
+Release notes
+=============
+
+Current release
+---------------
+
+psycopg 3.0.b2
+^^^^^^^^^^^^^^
+
+- Add :ref:`adapt-shapely` (:ticket:`#80`).
+- Add `psycopg.pq.__build_version__` constant.
+- Don't use the extended protocol with COPY, (:tickets:`#78, #82`).
+- Add *context* parameter to `~psycopg.Connection.connect()` (:ticket:`#83`).
+
+
+psycopg 3.0.b1
+--------------
+
+- First public release on PyPI.