From 2442b96a85e55706659494ce6b58e7f933bdb1b8 Mon Sep 17 00:00:00 2001 From: Roger Binns Date: Sat, 28 Dec 2013 21:40:39 -0800 Subject: [PATCH] More updates for GC to GH change --- MANIFEST.in | 2 +- doc/build.rst | 23 +++++------- doc/changes.rst | 94 ++++++++++++++++++++-------------------------- doc/conf.py | 4 +- doc/download.rst | 39 ++++++++++--------- doc/execution.rst | 13 +++---- doc/index.rst | 2 +- doc/tips.rst | 3 +- setup.py | 3 +- src/apsw.c | 2 +- tests.py | 2 +- tools/docupdate.py | 11 +++--- tools/shell.py | 2 +- 13 files changed, 89 insertions(+), 111 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 62e41531..7de0a9d3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -16,7 +16,7 @@ include src/util.c include src/vfs.c include src/vtable.c -# See http://code.google.com/p/apsw/issues/detail?id=89 +# See https://github.com/rogerbinns/apsw/issues/89 include MANIFEST.in # other files diff --git a/doc/build.rst b/doc/build.rst index 6309d39e..18080dbf 100644 --- a/doc/build.rst +++ b/doc/build.rst @@ -105,9 +105,8 @@ re-fetching. have no way of verifying they were produced by the SQLite team or were not modified between the SQLite servers and your computer. - Consequently APSW ships with a :file:`checksums` `file - `__ that - includes checksums for the various SQLite downloads. If the + Consequently APSW ships with a :source:`checksums file ` + that includes checksums for the various SQLite downloads. If the download does not match the checksum then it is rejected and an error occurs. @@ -334,25 +333,21 @@ the issue doesn't happen or doesn't happen again.:: The tests also ensure that as much APSW code as possible is executed including alternate paths through the code. 95.5% of the APSW code is -executed by the tests. If you checkout the APSW source then there is -an script `coverage.sh -`_ -that enables extra code that deliberately induces extra conditions -such as memory allocation failures, SQLite returning undocumented -error codes etc. That brings coverage up to 99.6% of the code. +executed by the tests. If you checkout the APSW source then there is a +script :source:`coverage.sh` that enables extra code that deliberately +induces extra conditions such as memory allocation failures, SQLite +returning undocumented error codes etc. That brings coverage up to +99.6% of the code. A memory checker `Valgrind `_ is used while running the test suite. The test suite is run 150 times to make any memory leaks or similar issues stand out. A checking version of Python -is also used. See `valgrind.sh -`_ -in the source. +is also used. See :source:`valgrind.sh` in the source. To ensure compatibility with the various Python versions, a script downloads and compiles all supported Python versions in both 2 byte and 4 byte Unicode character configurations against the APSW and -SQLite supported versions running the tests. See `megatest.py -`_ +SQLite supported versions running the tests. See :source:`megatest.py` in the source. In short both SQLite and APSW have a lot of testing! diff --git a/doc/changes.rst b/doc/changes.rst index b060649c..7860e779 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -2,6 +2,11 @@ Change History ************** .. currentmodule:: apsw +next +==== + +APSW is now hosted at Github - https://github.com/rogerbinns/apsw + 3.8.2-r1 ======== @@ -413,13 +418,12 @@ When using the context manager (with statement) of a transaction is rolled back. This could occur if SQLite had buffered the transaction entirely in memory and a non-eager transaction lock had been obtained. Thanks to Geoff Ness for finding the problem. -(`Issue 98 `__). +(:issue:`98`). Fixed bug when an error is returned creating an instance of a virtual table (eg an invalid column name). Before the fix you would get the previous error message or a crash. Thanks to Jose Gomes for finding -the problem. (`Issue 103 -`__). +the problem. :issue:`103` There is now a PPA for Ubuntu users that is kept up to date with APSW and SQLite at https://launchpad.net/~ubuntu-rogerbinns/+archive/apsw @@ -469,13 +473,11 @@ Made it possible to run distutils 'sdist' from an already produced source that was made from 'sdist'. This was necessary for some Python virtual package environments. Note that the recursive result does not include the HTML help as distutils has no way of including content in -a reparented location. (`Issue 89 -`__). +a reparented location. :issue:`89` Various settings are output as pragma statements when making a dump such as page size, encoding, auto_vacuum etc. The pragmas are -commented out. (`Issue 90 -`__). +commented out. :issue:`90` 3.6.21-r1 ========= @@ -498,11 +500,9 @@ Support for Python 3.0 has been dropped as it has been `end of lifed onwards. Changes to how some statements are `prepared -`__ to allow the new RANGE -and LIKE optimisations with bound variables introduced in SQLite -3.6.20 to be used. See `issue 85 -`__ for the long -and gory details. +`__ to allow the new RANGE and +LIKE optimisations with bound variables introduced in SQLite 3.6.20 to +be used. See :issue:`85` for the long and gory details. You can now access `CouchDB `__ using a virtual table. This lets you easily bidirectionally transfer data @@ -513,8 +513,7 @@ the same time. Other example uses are in the documentation. * .dump command now outputs views in the order they were created rather than alphabetical as views could reference each - other. (`Issue 82 - `__) + other. :issue:`82` * .dump command now outputs the `user_version `__ as a comment. It is @@ -523,18 +522,14 @@ the same time. Other example uses are in the documentation. * Can now output in `JSON `__. -* Fixed `Issue 83 - `__ - exception - if history file didn't exist +* Fixed :issue:`83` - exception if history file didn't exist * You can right justify output in column mode by specifying negative - widths. (`Issue 84 - `__) + widths. :issue:`84` * You no longer get a traceback doing completions if there is a virtual table in the database but the module is not loaded. - (`Issue 86 - `__) + :issue:`86` * You can now get detailed tracebacks including local variables using the ".exception ON" command. This is useful when developing @@ -546,12 +541,11 @@ the same time. Other example uses are in the documentation. 3.6.19-r1 ========= -**Backwards incompatible change** Fixed `issue 72 -`__ where APSW -wasn't zero basing virtual table :meth:`~VTTable.BestIndex` -constraints returned as documented. If you have working BestIndex -code then you need to update it for this release. Thanks to Lefteris -for finding this issue. +**Backwards incompatible change** Fixed :issue:`72` where APSW wasn't +zero basing virtual table :meth:`~VTTable.BestIndex` constraints +returned as documented. If you have working BestIndex code then you +need to update it for this release. Thanks to Lefteris for finding +this issue. **Backwards incompatible change** The :meth:`~apsw.complete` method has moved from :class:`Connection` to :mod:`apsw` where it should have @@ -598,8 +592,7 @@ amalgamation and compiled out when using existing libraries. This is more likely to match your machine. You can use :option:`--omit=load_extension` or :option:`--enable=load_extension` to the build/build_ext commands to explicitly disable/enable extension -loading. (`Issue 67 -`__). +loading. :issue:`67` :ref:`setup.py ` will now abort on a download that has no checksum. See :ref:`more information ` on checksums. @@ -649,9 +642,8 @@ The test suite will now check the functionality of the FTS3, RTree and ICU extensions if they were included. (The Windows binary distribution includes FTS3 and RTree by default.) -Fixed `issue 55 `_ -where FTS3 was unintentionally omitted from the Windows binary -distribution. +Fixed :issue:`55` where FTS3 was unintentionally omitted from the +Windows binary distribution. Various documentation updates. @@ -665,9 +657,9 @@ Trivial tweaks to keep MSVC happy. 3.6.15-r1 ========= -Fixed `issue 50 `_ -where :meth:`blob.read` was returning :const:`None` on end of file -instead of the documented (and correct) empty string/bytes. +Fixed :issue:`50` where :meth:`blob.read` was returning :const:`None` +on end of file instead of the documented (and correct) empty +string/bytes. Corrected spelling of option in :ref:`apswtrace ` and only output CURSORFROM if SQL tracing is on. @@ -780,10 +772,9 @@ Various changes in data structures and containers to reduce code size. Changed the code to handle SQLite errors to only use Python functionality and no operating system functionality (thread local -storage). This also addresses `issue 36 -`_ where Vista was -not binary compatible with XP. Thanks to Rudolf Gaertner for -assistance in detecting and diagnosing this issue. +storage). This also addresses :issue:`36` where Vista was not binary +compatible with XP. Thanks to Rudolf Gaertner for assistance in +detecting and diagnosing this issue. :class:`Connections `, :class:`cursors ` and :class:`blobs ` can be used by `weak references @@ -840,8 +831,7 @@ It was possible to get a deadlock between the Python GIL and the SQLite database mutex when using the same :class:`Connection` across multiple threads. Fixed by releasing the GIL in more places and added test that inspects the source to verify GIL/mutex handling. Thanks to -amicitas reporting this as `issue 31 -`_. +amicitas reporting this as :issue:`31` SQLite's API has been extended in 3.6.5 so that errors can be retrieved in a thread safe manner. APSW now uses this API. @@ -910,17 +900,17 @@ useful you can do with them (yet): Restored prior behaviour regarding Python ints and longs returning int for numbers fitting in signed 32 bit. This only affects Python 2 as Python 3 uses long exclusively. Thanks to Joe Pham for reporting this -as `issue 24 `_. +as :issue:`24` Added :meth:`Connection.getsqlite3pointer` method to help with -`issue 26 `_. +:issue:`26` 3.5.9-r2 ======== APSW now works with Python 3 (you need 3.0b1 or later). -(`Issue 17 `_) +(:issue:`17`) Removed the :const:`SQLITE_MAX_*` constants since they could be unreliable (eg APSW can't tell what a shared library was compiled with). A workaround is documented in :func:`Connection.limit`. @@ -970,18 +960,16 @@ but not if you let the destructor do the closing. SQLite now has incremental :ref:`blob I/O ` -`Issue 4 `_ which -could lead to generic error messages was fixed in SQLite 3.5.9. +:issue:`4` which could lead to generic error messages was fixed in +SQLite 3.5.9. -Fixed `issue 1 `_ -error in example code for virtual tables which caused filename errors -on Windows. +Fixed :issue:`1` error in example code for virtual tables which caused +filename errors on Windows. -Fixed `issue 15 `_ -releasing the GIL around calls to sqlite3_prepare. +Fixed :issue:`15` releasing the GIL around calls to sqlite3_prepare. -Fixed `issue 7 `_ -ensuring that extension module filenames are converted to utf8. +Fixed :issue:`7` ensuring that extension module filenames are +converted to utf8. Use the `sqlite3_open_v2 `_ interface which allows specifying which vfs to use. This release does diff --git a/doc/conf.py b/doc/conf.py index 5140657a..6fb4d689 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -31,7 +31,9 @@ 'SQLite ticket #'), 'sqliteapi': ('https://sqlite.org/c3ref/%s.html', 'XXYouShouldNotSeeThisXX'), 'issue': ('https://github.com/rogerbinns/apsw/issues/%s', - 'APSW issue ') + 'APSW issue '), + 'source': ('https://github.com/rogerbinns/apsw/blob/master/%s', + ''), } diff --git a/doc/download.rst b/doc/download.rst index 4b8b018f..ea9e3cef 100644 --- a/doc/download.rst +++ b/doc/download.rst @@ -19,44 +19,43 @@ way to build or all the :ref:`options available `. .. downloads-begin * `apsw-3.8.2-r1.zip - `_ + `__ (Source, includes this HTML Help) - * Windows Python 2.3 `32bit - `__ + `__ * Windows Python 2.4 `32bit - `__ + `__ * Windows Python 2.5 `32bit - `__ + `__ * Windows Python 2.6 `32bit - `__ + `__ `64bit - `__ + `__ * Windows Python 2.7 `32bit - `__ + `__ `64bit - `__ + `__ * Windows Python 3.1 `32bit - `__ + `__ `64bit - `__ + `__ * Windows Python 3.2 `32bit - `__ + `__ `64bit - `__ + `__ * Windows Python 3.3 `32bit - `__ + `__ * `apsw-3.8.2-r1-sigs.zip - `_ + `__ GPG signatures for all files .. downloads-end @@ -88,9 +87,9 @@ machine. Verifying your download ======================= -Downloads are now digitally signed so you can verify they have not -been tampered with. Download and extract the zip file of signatures -listed above. These instructions are for `GNU Privacy Guard +Downloads are digitally signed so you can verify they have not been +tampered with. Download and extract the zip file of signatures listed +above. These instructions are for `GNU Privacy Guard `__. (GPG is installed as standard on most Unix/Linux platforms and can be downloaded for Windows.) @@ -127,8 +126,8 @@ Getting the signing key Source code control =================== -The source is controlled by Mercurial documented at -https://code.google.com/p/apsw/source/checkout +The source is controlled by Git - start at +https://github.com/rogerbinns/apsw easy_install/pip/pypi ===================== diff --git a/doc/execution.rst b/doc/execution.rst index f444d059..954b2426 100644 --- a/doc/execution.rst +++ b/doc/execution.rst @@ -206,12 +206,11 @@ APSW Trace APSW includes a tracing script as part of the :ref:`source distribution ` named :file:`apswtrace.py`, or you -can get a copy directly from `source control -`__ -(choose "View Raw File"). This script lets you easily trace SQL -execution as well as providing a summary report without modifying your -code. If it is installed anywhere on your :envvar:`PYTHONPATH` then -you can invoke it with ``-m``:: +can get a copy directly from :source:`source control +` (choose "Raw File"). This script lets you +easily trace SQL execution as well as providing a summary report +without modifying your code. If it is installed anywhere on your +:envvar:`PYTHONPATH` then you can invoke it with ``-m``:: $ python -m apswtrace [apswtrace options] yourscript.py [your options] @@ -401,5 +400,3 @@ This shows the longest running queries with time in seconds. 0.646 select timesten(x) from foo where x=? order by x 0.631 select timesten(x) from foo where x=? order by x 0.620 select timesten(x) from foo where x=? order by x - - diff --git a/doc/index.rst b/doc/index.rst index 2d8c25b9..d80a4643 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -16,7 +16,7 @@ it works the way SQLite 3 does. (`pysqlite `). -APSW is hosted at https://code.google.com/p/apsw/ +APSW is hosted at https://github.com/rogerbinns/apsw Contents: diff --git a/doc/tips.rst b/doc/tips.rst index 054de90a..959e2c5d 100644 --- a/doc/tips.rst +++ b/doc/tips.rst @@ -203,8 +203,7 @@ the same way. The timeouts and handlers are ignored and instead Consequently you will have to do your own busy handling. (`SQLite ticket `__, -`APSW ticket 59 -`__) +:issue:`59`) The amount of memory and I/O saved is trivial compared to Python's overal memory and I/O consumption. You may also need to tune the diff --git a/setup.py b/setup.py index 097215a2..458a1248 100644 --- a/setup.py +++ b/setup.py @@ -826,8 +826,7 @@ def create_c_file(src, dest): complete SQLite API into Python.""", author="Roger Binns", author_email="rogerb@rogerbinns.com", - url="https://code.google.com/p/apsw/", - download_url="https://code.google.com/p/apsw/downloads/list", + url="https://github.com/rogerbinns/apsw/", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/src/apsw.c b/src/apsw.c index 0189df8b..bc308949 100644 --- a/src/apsw.c +++ b/src/apsw.c @@ -1561,7 +1561,7 @@ modules etc. For example:: ADDINT(SQLITE_LIMIT_LIKE_PATTERN_LENGTH), ADDINT(SQLITE_LIMIT_VARIABLE_NUMBER), ADDINT(SQLITE_LIMIT_TRIGGER_DEPTH), - /* We don't include the MAX limits - see https://code.google.com/p/apsw/issues/detail?id=17 */ + /* We don't include the MAX limits - see https://github.com/rogerbinns/apsw/issues/17 */ END, DICT("mapping_config"), diff --git a/tests.py b/tests.py index 0e3c9070..558a7d55 100644 --- a/tests.py +++ b/tests.py @@ -1878,7 +1878,7 @@ def testSharedCache(self): # compiled in or not so the assumption is that they aren't. # However setup.py is being run then it sets environment variables # saying the extensions *must* be present if they were enabled. - # See https://code.google.com/p/apsw/issues/detail?id=55 for what + # See https://github.com/rogerbinns/apsw/issues/55 for what # led to this. def checkOptionalExtension(self, name, testquery): try: diff --git a/tools/docupdate.py b/tools/docupdate.py index 1caa9db4..496dfffe 100644 --- a/tools/docupdate.py +++ b/tools/docupdate.py @@ -10,7 +10,7 @@ # get the download file names correct version=sys.argv[1] -url="https://code.google.com/p/apsw/downloads/detail?name=" +url=" `__" download=open("doc/download.rst", "rtU").read() @@ -23,20 +23,19 @@ incomment=True op.append("") op.append("* `apsw-%s.zip" % (version,)) - op.append(" <%sapsw-%s.zip>`_" % (url, version)) + op.append(url % ("apsw-%s.zip" % version)) op.append(" (Source, includes this HTML Help)") op.append("") - op.append("") not64=("2.3", "2.4", "2.5", "3.3") for pyver in ("2.3", "2.4", "2.5", "2.6", "2.7", "3.1", "3.2", "3.3"): op.append("* Windows Python %s `32bit" % (pyver,)) - op.append(" <%sapsw-%s.win32-py%s.exe>`__" % (url, version, pyver)) + op.append(url % ("apsw-%s.win32-py%s.exe" % (version, pyver))) if pyver not in not64: op.append(" `64bit ") - op.append(" <%sapsw-%s.win-amd64-py%s.exe>`__" % (url, version, pyver)) + op.append(url % ("apsw-%s.win-amd64-py%s.exe" % (version, pyver))) op.append("") op.append("* `apsw-%s-sigs.zip " % (version,)) - op.append(" <%sapsw-%s-sigs.zip>`_" % (url, version)) + op.append(url % ("apsw-%s-sigs.zip" % version)) op.append(" GPG signatures for all files") op.append("") diff --git a/tools/shell.py b/tools/shell.py index e5e31ba1..cdbad568 100644 --- a/tools/shell.py +++ b/tools/shell.py @@ -2698,7 +2698,7 @@ def complete_sql(self, line, token, beg, end): if item not in other: other.append(item) except apsw.SQLError: - # See https://code.google.com/p/apsw/issues/detail?id=86 + # See https://github.com/rogerbinns/apsw/issues/86 pass self._completion_cache=[self._sqlite_keywords, self._sqlite_functions, self._sqlite_special_names, collations, databases, other]