Skip to content

Commit

Permalink
Merge branch 'master' into rm-3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Sep 9, 2020
2 parents a4e0b1d + 171371d commit 1502a2e
Show file tree
Hide file tree
Showing 153 changed files with 1,494 additions and 569 deletions.
11 changes: 4 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,19 @@ environment:

matrix:
# For Python versions available on Appveyor, see
# https://www.appveyor.com/docs/build-environment/
# https://www.appveyor.com/docs/windows-images-software/#python
- {PY_VER: "27", PY_ARCH: "32"}
- {PY_VER: "27", PY_ARCH: "64"}
- {PY_VER: "38", PY_ARCH: "32"}
- {PY_VER: "38", PY_ARCH: "64"}
- {PY_VER: "37", PY_ARCH: "32"}
- {PY_VER: "37", PY_ARCH: "64"}
- {PY_VER: "36", PY_ARCH: "32"}
- {PY_VER: "36", PY_ARCH: "64"}
- {PY_VER: "35", PY_ARCH: "32"}
- {PY_VER: "35", PY_ARCH: "64"}

# not supported by appveyor as of 2019-10-19
# https://www.appveyor.com/docs/windows-images-software/#python
# - {PY_VER: "38", PY_ARCH: "32"}
# - {PY_VER: "38", PY_ARCH: "64"}

OPENSSL_VERSION: "1_1_1d"
OPENSSL_VERSION: "1_1_1g"
POSTGRES_VERSION: "11_4"

PSYCOPG2_TESTDB: psycopg2_test
Expand Down
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github:
- dvarrazzo
custom:
- "https://www.paypal.me/dvarrazzo"
23 changes: 19 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@

language: python

dist: bionic

arch:
- amd64
- arm64

python:
- 3.5
- 3.6
- 3.7
- 3.8

matrix:
include:
- python: 2.7
- python: 3.8
- python: 3.7
- python: 3.6
- python: 3.5

install:
- sudo apt-get install -y bc
- pip install -U pip setuptools wheel
- pip install .
- rm -rf psycopg2.egg-info
Expand All @@ -19,5 +28,11 @@ install:
script:
- scripts/travis_test.sh

deploy:
- provider: script
script: bash scripts/travis_update_docs.sh
on:
branch: master

notifications:
email: false
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Installation instructions are included in the docs.

Please check the 'doc/src/install.rst' file or online at
<http://initd.org/psycopg/docs/install.html>.
<https://www.psycopg.org/docs/install.html>.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ endif
VERSION := $(shell grep PSYCOPG_VERSION setup.py | head -1 | sed -e "s/.*'\(.*\)'/\1/")
SDIST := dist/psycopg2-$(VERSION).tar.gz

.PHONY: env check clean
.PHONY: check clean

default: package

Expand Down
28 changes: 28 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
Current release
---------------

What's new in psycopg 2.8.6
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Fixed memory leak changing connection encoding to the current one
(:ticket:`#1101`).
- Fixed search of mxDateTime headers in virtualenvs (:ticket:`#996`).
- Added missing values from errorcodes (:ticket:`#1133`).
- `cursor.query` reports the query of the last :sql:`COPY` opearation too
(:ticket:`#1141`).
- `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to
PostgreSQL 13.
- Added wheel packages for ARM architecture (:ticket:`#1125`).
- Wheel package compiled against OpenSSL 1.1.1g.


What's new in psycopg 2.8.5
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Fixed use of `!connection_factory` and `!cursor_factory` together
(:ticket:`#1019`).
- Added support for `~logging.LoggerAdapter` in
`~psycopg2.extras.LoggingConnection` (:ticket:`#1026`).
- `~psycopg2.extensions.Column` objects in `cursor.description` can be sliced
(:ticket:`#1034`).
- Added AIX support (:ticket:`#1061`).
- Fixed `~copy.copy()` of `~psycopg2.extras.DictCursor` rows (:ticket:`#1073`).


What's new in psycopg 2.8.4
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
11 changes: 5 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ Documentation

Documentation is included in the ``doc`` directory and is `available online`__.

.. __: http://initd.org/psycopg/docs/
.. __: https://www.psycopg.org/docs/

For any other resource (source code repository, bug tracker, mailing list)
please check the `project homepage`__.

.. __: https://psycopg.org/


Installation
------------
Expand Down Expand Up @@ -56,11 +58,8 @@ production it is advised to use the package built from sources.

.. _PyPI: https://pypi.org/project/psycopg2/
.. _psycopg2-binary: https://pypi.org/project/psycopg2-binary/
.. _install: http://initd.org/psycopg/docs/install.html#install-from-source
.. _faq: http://initd.org/psycopg/docs/faq.html#faq-compile

.. __: http://initd.org/psycopg/

.. _install: https://www.psycopg.org/docs/install.html#install-from-source
.. _faq: https://www.psycopg.org/docs/faq.html#faq-compile

:Linux/OSX: |travis|
:Windows: |appveyor|
Expand Down
3 changes: 3 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ src/_build/*
html/*
psycopg2.txt
src/sqlstate_errors.rst

# Added by psycopg-website to customize published docs
src/_templates/layout.html
15 changes: 7 additions & 8 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: env help clean html doctest
.PHONY: env help clean html package doctest

docs: html

Expand All @@ -9,26 +9,25 @@ check: doctest

PYTHON := python$(PYTHON_VERSION)
PYTHON_VERSION ?= $(shell $(PYTHON) -c 'import sys; print ("%d.%d" % sys.version_info[:2])')
BUILD_DIR = $(shell pwd)/../build/lib.$(PYTHON_VERSION)

SPHINXBUILD ?= $$(pwd)/env/bin/sphinx-build
SPHOPTS = SPHINXBUILD=$(SPHINXBUILD)

html: src/sqlstate_errors.rst
$(MAKE) PYTHON=$(PYTHON) -C .. package
html: package src/sqlstate_errors.rst
$(MAKE) $(SPHOPTS) -C src $@
cp -r src/_build/html .

src/sqlstate_errors.rst: ../psycopg/sqlstate_errors.h
src/sqlstate_errors.rst: ../psycopg/sqlstate_errors.h $(BUILD_DIR)
env/bin/python src/tools/make_sqlstate_docs.py $< > $@

$(BUILD_DIR):
$(MAKE) PYTHON=$(PYTHON) -C .. package

doctest:
$(MAKE) PYTHON=$(PYTHON) -C .. package
$(MAKE) $(SPHOPTS) -C src $@

upload:
# this command requires ssh configured to the proper target
tar czf - -C html . | ssh psycoweb tar xzvf - -C docs/current

clean:
$(MAKE) $(SPHOPTS) -C src $@
rm -rf html src/sqlstate_errors.rst
Expand Down
2 changes: 1 addition & 1 deletion doc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ introspection, so you will need the same prerequisites_. The only extra
prerequisite is virtualenv_: the packages needed to build the docs will be
installed when building the env.

.. _prerequisites: http://initd.org/psycopg/docs/install.html#install-from-source
.. _prerequisites: https://www.psycopg.org/docs/install.html#install-from-source
.. _virtualenv: https://virtualenv.pypa.io/en/latest/

Build the env once with::
Expand Down
28 changes: 10 additions & 18 deletions doc/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ How to make a psycopg2 release
In the rest of this document we assume you have exported the version number
into an environment variable, e.g.::

$ export VERSION=2.7
$ export VERSION=2.8.4

- In the `Travis settings`__ you may want to be sure that the variables
``TEST_PAST`` and ``TEST_FUTURE`` are set to 1 to check all
Expand All @@ -36,45 +36,37 @@ How to make a psycopg2 release
- Create a signed tag with the content of the relevant NEWS bit and push it.
E.g.::

$ git tag -a -s 2_7
$ git tag -a -s 2_8_4

Psycopg 2.7 released
Psycopg 2.8.4 released

What's new in psycopg 2.7
-------------------------
What's new in psycopg 2.8.4
---------------------------

New features:

- Added `~psycopg2.sql` module to generate SQL dynamically (:ticket:`#308`).
- Fixed bug blah (:ticket:`#42`).
...

- Update the `psycopg2-wheels`_ submodule to the tag version and push. This
will build the packages on `Travis CI`__ and `AppVeyor`__ and upload them to
the `initd.org upload`__ dir.
https://upload.psycopg.org/.

.. _psycopg2-wheels: https://github.com/psycopg/psycopg2-wheels
.. __: https://travis-ci.org/psycopg/psycopg2-wheels
.. __: https://ci.appveyor.com/project/psycopg/psycopg2-wheels
.. __: http://initd.org/psycopg/upload/

- Download the packages generated (this assumes ssh configured properly)::

$ rsync -arv initd-upload:psycopg2-${VERSION} .
$ rsync -arv psycopg-upload:psycopg2-${VERSION} .

- Sign the packages and upload the signatures back::

$ for f in psycopg2-${VERSION}/*.{exe,tar.gz,whl}; do \
gpg --armor --detach-sign $f;
done

$ rsync -arv psycopg2-${VERSION} initd-upload:

- Run the ``copy-tarball.sh`` script on the server to copy the uploaded files
in the `tarballs`__ dir::

$ ssh psycoweb@initd.org copy-tarball.sh ${VERSION}

.. __: http://initd.org/psycopg/tarballs/
$ rsync -arv psycopg2-${VERSION} psycopg-upload:

- Remove the ``.exe`` from the dir, because we don't want to upload them on
PyPI::
Expand All @@ -88,7 +80,7 @@ How to make a psycopg2 release
- Create a release and release notes in the psycopg website, announce to
psycopg and pgsql-announce mailing lists.

- Edit ``setup.py`` changing the version again (e.g. go to ``2.7.1.dev0``).
- Edit ``setup.py`` changing the version again (e.g. go to ``2.8.5.dev0``).


Releasing test packages
Expand Down
5 changes: 5 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Packages only needed to build the docs
Pygments>=2.2,<2.3
Sphinx>=1.6,<=1.7
sphinx-better-theme>=0.1.5,<0.2

# 0.15.2 affected by https://sourceforge.net/p/docutils/bugs/353/
# Can update to 0.16 after release (currently in rc) but must update Sphinx too
docutils<0.15
101 changes: 99 additions & 2 deletions doc/src/_static/psycopg.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import url("classic.css");

blockquote {
font-style: italic;
}
Expand Down Expand Up @@ -37,3 +35,102 @@ dl.faq dt {
table.data-types div.line-block {
margin-bottom: 0;
}


/* better theme customisation */

body {
background-color: #216464;
}

header, .related, .document, footer {
background-color: white;
}

header h1 {
font-size: 150%;
margin-bottom: 0;
padding: 0.5rem 10px 0.5rem 10px;
}

h1, h2, h3 {
font-weight: normal;
}

.body h1, .body h2, .body h3 {
color: #074848;
}

h1 {
font-size: 200%;
}

h2 {
font-size: 160%;
}

h3 {
font-size: 140%;
}

footer#pagefooter {
margin-bottom: 1rem;
font-size: 85%;
color: #444;
}

#rellinks, #breadcrumbs {
padding-right: 10px;
padding-left: 10px;
}

.sphinxsidebar {
padding-left: 10px;
}

.bodywrapper {
padding-right: 10px;
}

div.body h1, div.body h2, div.body h3 {
background-color: #f2f2f2;
border-bottom: 1px solid #d0d0d0;
}

div.body p.rubric {
border-bottom: 1px solid #d0d0d0;
}

body .sphinxsidebar .search {
margin-top: 0;
}

html pre {
background-color: #efc;
border: 1px solid #ac9;
border-left: none;
border-right: none;
}

a, a:visited {
color: #0b6868;
}

th {
background-color: #ede;
}

code.xref, a code {
font-weight: bold;
}

code.descname {
font-weight: bold;
font-size: 120%;
}

@media (max-width: 820px) {
body {
background-color: white;
}
}
Loading

0 comments on commit 1502a2e

Please sign in to comment.