Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix_UnboundLocalError
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Sep 22, 2020
2 parents 32ebc3f + 25f66d3 commit 79209ea
Show file tree
Hide file tree
Showing 60 changed files with 548 additions and 614 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ develop-eggs
parts
.installed.cfg
build
docs/_build
doc/_build
__pycache__
*.pyc
*.so
.tox
.coverage
.coverage.*
nosetests.xml
coverage.xml
*.egg-info
Expand Down
17 changes: 16 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
language: python

env:
global:
ZOPE_INTERFACE_STRICT_IRO: 1

python:
- 2.7
- 3.5
Expand All @@ -8,13 +13,23 @@ python:
- pypy
- pypy3

jobs:
include:
# Special Linux builds
- name: "Python: 3.8, pure (no C extensions)"
python: 3.8
env: PURE_PYTHON=1

install:
- pip install -U pip
- pip install -U setuptools zc.buildout
# BBB use older setuptools on pypy, setuptools 50.0.0 is not compatible with pypy 7.1.1-beta0
- if [[ $TRAVIS_PYTHON_VERSION == pypy3* ]]; then pip install -U setuptools==49.6.0 zc.buildout; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy3* ]]; then pip install -U setuptools zc.buildout; fi
- buildout $BUILOUT_OPTIONS
script:
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then bin/coverage run bin/coverage-test -v; fi
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then bin/test -v; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy3* ]]; then pip install --upgrade --requirement doc/requirements.txt; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy3* ]]; then make -C doc html; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls; fi # install early enough to get into the cache
after_success:
Expand Down
18 changes: 17 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
Change History
================

5.6.0 (unreleased)
5.6.1 (unreleased)
==================

- Nothing changed yet.


5.6.0 (2020-06-11)
==================

- Fix UnboundLocalError when running fsoids.py script.
Expand All @@ -12,6 +18,10 @@
affected Storage implementations that rely on mvccadapter, and could result
in data corruption (oid loaded at wrong serial after a concurrent commit).
See `issue 290 <https://github.com/zopefoundation/ZODB/issues/290>`_.
As mentionned in pull request #307, interfaces are clarified about the fact
that storage implementations must update at a precise moment the value that
is returned by lastTransaction(): just after invalidate() or
tpc_finish callback.

- Improve volatile attribute ``_v_`` documentation.

Expand Down Expand Up @@ -43,6 +53,12 @@

- Fix tests with transaction 3.0.

- Fix inconsistent resolution order with zope.interface v5.

- Remove ``ConnectionPool.map()``. Instead, ``ConnectionPool`` is now
iterable. See `PR 280
<https://github.com/zopefoundation/ZODB/pull/280>`_.

5.5.1 (2018-10-25)
==================

Expand Down
6 changes: 3 additions & 3 deletions DEVELOPERS.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
======================
For developers of ZODB
======================
================
Developers notes
================

Building
========
Expand Down
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ New Features

- The mkzeoinst script has been moved to a separate project:

http://pypi.python.org/pypi/zope.mkzeoinstance
https://pypi.org/project/zope.mkzeoinstance/

and is no-longer included with ZODB.

Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ZODB, a Python object-oriented database
=======================================

.. image:: https://img.shields.io/pypi/v/ZODB.svg
:target: https://pypi.python.org/pypi/ZODB/
:target: https://pypi.org/project/ZODB/
:alt: Latest release

.. image:: https://img.shields.io/pypi/pyversions/ZODB.svg
Expand All @@ -13,13 +13,13 @@ ZODB, a Python object-oriented database
.. image:: https://travis-ci.org/zopefoundation/ZODB.svg?branch=master
:target: https://travis-ci.org/zopefoundation/ZODB
:alt: Build status

.. image:: https://coveralls.io/repos/github/zopefoundation/ZODB/badge.svg
:target: https://coveralls.io/github/zopefoundation/ZODB
:alt: Coverage status

.. image:: https://readthedocs.org/projects/zodb/badge/?version=latest
:target: https://zodb.readthedocs.io/en/latest/
.. image:: https://readthedocs.org/projects/zodb-docs/badge/?version=latest
:target: https://zodb-docs.readthedocs.io/en/latest/
:alt: Documentation status

ZODB provides an object-oriented database for Python that provides a
Expand All @@ -39,7 +39,7 @@ above. It also runs on PyPy.

ZODB is an ACID Transactional database.

To learn more, visit: http://www.zodb.org
To learn more, visit: https://zodb-docs.readthedocs.io

The github repository is: at https://github.com/zopefoundation/zodb

Expand Down
10 changes: 4 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ install:
- "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%"
- echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat"
- python -m pip install -U pip setuptools wheel
- pip install -U -e .
- pip install -U zope.testrunner zope.testing manuel
- pip install -U zc.buildout zc.recipe.testrunner zc.recipe.egg
- pip install -U -e .[test]

build_script:
- buildout bootstrap
- bin\buildout parts=test
- python -m pip install -U wheel
- python -W ignore setup.py -q bdist_wheel

test_script:
- bin\test -vvv
- zope-testrunner --test-path=src -vvv --auto-color
16 changes: 8 additions & 8 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ parts =
# Avoid breakage in 4.4.5:
zope.testrunner = >= 4.4.6

[versions:python2]
Sphinx = < 2
pygments = < 2.6
sphinxcontrib-websupport = < 1.2

[test]
recipe = zc.recipe.testrunner
eggs =
Expand Down Expand Up @@ -49,20 +54,15 @@ eggs =
${coverage-test:eggs}
interpreter = py

[sphinx_egg]
eggs = Sphinx

[sphinx_egg:python2 or python34]
eggs = Sphinx < 2

[sphinx]
recipe = zc.recipe.egg
eggs =
${sphinx_egg:eggs}
Sphinx
docutils
ZODB
j1m.sphinxautointerface
sphinxcontrib_zopeext
j1m.sphinxautozconfig
sphinx_rtd_theme
scripts =
sphinx-build
interpreter = stxpy
1 change: 1 addition & 0 deletions doc/ConflictResolution.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../src/ZODB/ConflictResolution.rst
2 changes: 1 addition & 1 deletion doc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ZODB documentation
==================

``zodbdocs`` is the source documentation for the website http://zodb.org. It
``zodbdocs`` is the source documentation for the website http://zodb-docs.readthedocs.io. It
contains all ZODB relevant documentation like "ZODB/ZEO Programming Guide",
some ZODB articles and links to the ZODB release notes.

Expand Down
10 changes: 5 additions & 5 deletions doc/articles/ZODB-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ ordering.
The hot points for ConflictErrors are the catalogue indexes. Some of the
indexes do not support conflict resolution and you will see ConflictErrors
under write-intensive loads. On solution is to defer catalogue updates using
`QueueCatalog <http://pypi.python.org/pypi/Products.QueueCatalog>`_
`QueueCatalog <https://pypi.org/project/Products.QueueCatalog/>`_
(`PloneQueueCatalog
<http://pypi.python.org/pypi/Products.PloneQueueCatalog>`_), which allows
<https://pypi.org/project/Products.PloneQueueCatalog/>`_), which allows
indexing operations to be serialized using a seperate ZEO client. This can
bring big performance benefits as request retries are reduced, but the
downside is that index updates are no longer reflected immediately in the
application. Another alternative is to offload text indexing to a dedicated
search engine using `collective.solr
<http://pypi.python.org/pypi/collective.solr>`_.
<https://pypi.org/project/collective.solr/>`_.

This brings us to **Atomicity**, the other key feature of ZODB transactions. A
transaction will either succeed or fail, your data is never left in an
Expand All @@ -76,7 +76,7 @@ ConflictError occurs Zope will attempt to replay a transaction up to three
times. Interactions with an external system should be made through a Data
Manager that participates in the transaction. If you’re talking to a database
use a Zope DA or a SQLAlchemy wrapper like `zope.sqlalchemy
<http://pypi.python.org/pypi/zope.sqlalchemy>`_.
<https://pypi.org/project/zope.sqlalchemy/>`_.

Unfortunately the default MailHost implementation used by Plone is not
transaction aware. With it you can see duplicate emails sent. If this is a
Expand Down Expand Up @@ -115,7 +115,7 @@ file per object revision. Does not require the Data.fs.index to be rebuilt on
an unclean shutdown (which can take a significant time for a large database).
Small number of users.

**RelStorage** (`pypi <http://pypi.python.org/pypi/RelStorage>`_) stores
**RelStorage** (`pypi <https://pypi.org/project/RelStorage/>`_) stores
pickles in a relational database. PostgreSQL, MySQL and Oracle are supported
and no ZEO server is required. You benefit from the faster network layers of
these database adapters. However, conflict resolution is moved to the
Expand Down
4 changes: 2 additions & 2 deletions doc/articles/multi-zodb-gc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Using zc.zodbdgc (fix PosKeyError's)

*This article was written by Hanno Schlichting*

The `zc.zodbdgc <http://pypi.python.org/pypi/zc.zodbdgc>`_ library contains two
The `zc.zodbdgc <https://pypi.org/project/zc.zodbdgc/>`_ library contains two
useful features. On the one hand it supports advanced ZODB packing and garbage
collection approaches and on the other hand it includes the ability to create a
database of all persistent references.
Expand All @@ -18,7 +18,7 @@ persistent object(s) that point to the lost object.

.. note::
Unless you're using multi-databases, this documentation does not apply to
`RelStorage <http://pypi.python.org/pypi/RelStorage>`_ which has the same
`RelStorage <https://pypi.org/project/RelStorage/>`_ which has the same
features built-in, but accessible in different ways. Look at the options for
the ``zodbpack`` script. The ``--prepack`` option creates a table containing the
same information as we are creating in the reference database.
Expand Down
3 changes: 3 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. include:: ../CHANGES.rst

.. include:: ../HISTORY.rst
4 changes: 4 additions & 0 deletions src/ZODB/collaborations.txt → doc/collaborations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Collabortation Diagrams
=======================

.. caution::
This document hasn't been reviewed since 2005
and is likely out of date.

This file contains several collaboration diagrams for the ZODB.

Simple fetch, modify, commit
Expand Down
46 changes: 36 additions & 10 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,33 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import pkg_resources

# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.append(os.path.abspath('.'))

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath(".."))


# General configuration
# ---------------------

rqmt = pkg_resources.require('ZODB')[0]

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
'j1m.sphinxautointerface',
'j1m.sphinxautozconfig']
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinxcontrib.zopeext.autointerface',
'j1m.sphinxautozconfig',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
Expand All @@ -41,15 +55,15 @@
master_doc = 'index'

# General information about the project.
project = u'ZODB'
copyright = u'2009-2016, Zope Foundation'
project = 'ZODB'
copyright = '2009-2020, Zope Foundation'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '5.0'
version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
# The full version, including alpha/beta/rc tags.
#release = '3.10.3'

Expand Down Expand Up @@ -89,6 +103,10 @@
# Options for HTML output
# -----------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'

# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
Expand All @@ -108,7 +126,7 @@
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = 'zodb.ico'
html_favicon = '.static/zodb.ico'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down Expand Up @@ -166,8 +184,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
('index', 'ZODBdocumentationandarticles.tex', ur'ZODB documentation and articles',
ur'Zope Developer Community', 'manual'),
('index', 'ZODBdocumentationandarticles.tex', 'ZODB documentation and articles',
'Zope Developer Community', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand All @@ -186,3 +204,11 @@

# If false, no module index is generated.
#latex_use_modindex = True

intersphinx_mapping = {
"python": ('https://docs.python.org/3/', None),
"persistent": ('https://persistent.readthedocs.io/en/latest/', None),
"zodburi": ("https://docs.pylonsproject.org/projects/zodburi/en/latest/", None),
"btrees": ("https://btrees.readthedocs.io/en/latest/", None),
"zodburi": ("https://docs.pylonsproject.org/projects/zodburi/en/latest/", None),
}
1 change: 1 addition & 0 deletions doc/cross-database-references.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../src/ZODB/cross-database-references.rst
1 change: 1 addition & 0 deletions doc/developers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../DEVELOPERS.rst
2 changes: 2 additions & 0 deletions src/ZODB/event.txt → doc/event.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
=============
Event support
=============

Sometimes, you want to react when ZODB does certain things. In the
past, ZODB provided ad hoc hook functions for this. Going forward,
Expand Down
Loading

0 comments on commit 79209ea

Please sign in to comment.