Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"There is hopeful symbolism in the fact that flags do not wave in a vacuum." -- Arthur C. Clarke


devel / comp.lang.python.announce / [Python-announce] SQLObject 3.10.3

SubjectAuthor
o [Python-announce] SQLObject 3.10.3Oleg Broytman

1
[Python-announce] SQLObject 3.10.3

<ZTlEsmih8jaM2-14@phdru.name>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1328&group=comp.lang.python.announce#1328

  copy link   Newsgroups: comp.lang.python.announce
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: phd@phdru.name (Oleg Broytman)
Newsgroups: comp.lang.python.announce
Subject: [Python-announce] SQLObject 3.10.3
Date: Wed, 25 Oct 2023 19:39:14 +0300
Lines: 151
Approved: python-announce-list@python.org
Message-ID: <ZTlEsmih8jaM2-14@phdru.name>
Reply-To: python-list@python.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.uni-berlin.de KEhhzLOnRxoMiw5K3PoeugDN7YG2P8peb70bQblRfA/Q==
Cancel-Lock: sha1:OC2gwPcYPcGO39Nv+lEMIWRouYY= sha256:O31sVJiVwHzUrDKbpzUt7P7B+FigEAitIgN7pGvQGis=
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=unknown (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.003
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'generated': 0.03; '3.7':
0.03; 'pip': 0.04; 'skip:= 10': 0.05; 'thread': 0.05; 'tests':
0.07; '2.7': 0.09; 'filtering': 0.09; 'ids': 0.09; 'instances':
0.09; 'linux': 0.09; 'meant': 0.09; 'open-source': 0.09; 'skip:`
10': 0.09; 'skip:` 20': 0.09; 'threads': 0.09; 'to:addr:python-
announce-list': 0.09; 'url-ip:151.101.0.223/32': 0.09; 'url-
ip:151.101.128.223/32': 0.09; 'url-ip:151.101.192.223/32': 0.09;
'url-ip:151.101.64.223/32': 0.09; 'import': 0.15; 'url:mailman':
0.15; 'announce': 0.15; 'memory': 0.15; '3.10': 0.16; '3.7.':
0.16; '=======': 0.16; 'active.': 0.16; 'changes:': 0.16;
'classes,': 0.16; 'fixes': 0.16; 'incompatible': 0.16; 'mssql':
0.16; 'releases': 0.16; 'reuse': 0.16; 'stuck': 0.16; 'thread.':
0.16; 'url:project': 0.16; 'url:pypi': 0.16; 'windows.': 0.16;
'problem': 0.16; 'python': 0.16; 'developer': 0.16; 'api': 0.17;
'bug': 0.19; 'to:addr:python-list': 0.20; 'creates': 0.22;
"what's": 0.22; 'version': 0.23; 'install': 0.23; 'skip:p 30':
0.23; 'run': 0.23; 'list,': 0.24; 'thanks!': 0.24; 'seems': 0.26;
'brings': 0.26; 'old': 0.27; '>>>': 0.28; 'wrong': 0.28; 'url-
ip:188/8': 0.31; 'program': 0.31; "doesn't": 0.32; '---------':
0.32; 'dropped': 0.32; 'objects': 0.32; 'programmers': 0.32;
'but': 0.32; "i'm": 0.33; 'mailing': 0.33; 'windows': 0.34;
'release': 0.34; 'requires': 0.34; 'close': 0.35; 'fix': 0.36;
'those': 0.36; 'class': 0.37; 'two': 0.39; 'branch': 0.39;
'hello!': 0.39; 'use': 0.39; '(with': 0.39; 'table': 0.39;
'should': 0.40; 'connection': 0.61; 'skip:o 10': 0.61; 'url-
ip:151.101.0/24': 0.62; 'url-ip:151.101.128/24': 0.62; 'url-
ip:151.101.192/24': 0.62; 'url-ip:151.101.64/24': 0.62; 'true':
0.63; 'complete': 0.64; 'url:name': 0.64; 'your': 0.64; 'news':
0.65; 'required': 0.65; 'less': 0.65; 'pleased': 0.67; 'url-
ip:104.18/16': 0.67; 'per': 0.68; 'url:net': 0.68; '-----': 0.69;
'stores': 0.69; 'url:news': 0.69; 'longer': 0.71; 'free': 0.72;
'easy': 0.74; 'released': 0.75; 'skip:f 20': 0.75; 'received:94':
0.76; 'site:': 0.76; 'quick': 0.77; 'database': 0.80; '3rd': 0.81;
'known': 0.84; '2018.': 0.84; 'cooperate': 0.84; 'drivers': 0.84;
'garbage': 0.84; 'itself.': 0.84; 'negligible': 0.84; 'news:':
0.84; 'postgresql': 0.84; 'released.': 0.84; 'sqlite': 0.84;
'tables': 0.84; 'url:sourceforge': 0.84; 'url:p': 0.88; 'return.':
0.91
Content-Disposition: inline
X-Attribution: phd
X-Face: "4chVP^f8;3Bi>x"ic0%DuP(ZLyn:;kzQ1njs]5,GRZG<{<\~`|Shxi7|)d|8uO~HFRfyym
{[xs@OYG]2Q]0#}0sjJp`1^1+B6]A2+{9fW=S<O7^"hul]^|AGtiI7SkYF-2VD?UH*h_!zuCIf+^F7
c0x8?W,UfhCAx^YY#1ALhvG\2yG}LW:)zw#1;Yajq"hK~S
X-Operating-System: Debian GNU/Linux
X-Url: https://phdru.name/
Mail-Followup-To: Oleg Broytman <phd@phdru.name>, Python Mailing List
<python-list@python.org>
X-Skip-DKIM-Sig: mailing list
X-MailFrom: phd@phdru.name
X-Mailman-Rule-Hits: emergency
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved
Message-ID-Hash: USCAE3AQ6ZJU2OVDHISS4FSPHKLV2LZU
X-Message-ID-Hash: USCAE3AQ6ZJU2OVDHISS4FSPHKLV2LZU
X-Mailman-Approved-At: Wed, 25 Oct 2023 12:43:47 -0400
X-Mailman-Version: 3.3.9
Precedence: list
List-Id: Announcement-only list for the Python programming language <python-announce-list.python.org>
Archived-At: <https://mail.python.org/archives/list/python-announce-list@python.org/message/USCAE3AQ6ZJU2OVDHISS4FSPHKLV2LZU/>
List-Archive: <https://mail.python.org/archives/list/python-announce-list@python.org/>
List-Help: <mailto:python-announce-list-request@python.org?subject=help>
List-Owner: <mailto:python-announce-list-owner@python.org>
List-Post: <mailto:python-announce-list@python.org>
List-Subscribe: <mailto:python-announce-list-join@python.org>
List-Unsubscribe: <mailto:python-announce-list-leave@python.org>
 by: Oleg Broytman - Wed, 25 Oct 2023 16:39 UTC

Hello!

I'm pleased to announce version 3.10.3, the 3rd bugfix release of branch
3.10 of SQLObject.

What's new in SQLObject
=======================

The contributors for this release are
Igor Yudytskiy and shuffle (github.com/shuffleyxf).
Thanks!

Bug fixes
---------

* Relaxed aliasing in ``SQLRelatedJoin`` introduced in 3.10.2 - aliasing
is required only when the table joins with itself. When there're two
tables to join aliasing prevents filtering -- wrong SQL is generated
in ``relJoinCol.filter(thisClass.q.column)``.

Drivers
-------

* Fix(SQLiteConnection): Release connections from threads that are
no longer active. This fixes memory leak in multithreaded programs
in Windows.

``SQLite`` requires different connections per thread so
``SQLiteConnection`` creates and stores a connection per thread.
When a thread finishes its connections should be closed.
But if a program doesn't cooperate and doesn't close connections at
the end of a thread SQLObject leaks memory as connection objects are
stuck in ``SQLiteConnection``. On Linux the leak is negligible as
Linux reuses thread IDs so new connections replace old ones and old
connections are garbage collected. But Windows doesn't reuse thread
IDs so old connections pile and never released. To fix the problem
``SQLiteConnection`` now enumerates threads and releases connections
from non-existing threads.

* Dropped ``supersqlite``. It seems abandoned.
The last version 0.0.78 was released in 2018.

Tests
-----

* Run tests with Python 3.12.

CI
--

* GHActions: Ensure ``pip`` only if needed

This is to work around a problem in conda with Python 3.7 -
it brings in wrong version of ``setuptools`` incompatible with Python 3.7.

For a more complete list, please see the news:
http://sqlobject.org/News.html

What is SQLObject
=================

SQLObject is a free and open-source (LGPL) Python object-relational
mapper. Your database tables are described as classes, and rows are
instances of those classes. SQLObject is meant to be easy to use and
quick to get started with.

SQLObject supports a number of backends: MySQL/MariaDB (with a number of
DB API drivers: ``MySQLdb``, ``mysqlclient``, ``mysql-connector``,
``PyMySQL``, ``mariadb``), PostgreSQL (``psycopg2``, ``PyGreSQL``,
partially ``pg8000`` and ``py-postgresql``), SQLite (builtin ``sqlite``,
``pysqlite``); connections to other backends
- Firebird, Sybase, MSSQL and MaxDB (also known as SAPDB) - are less
debugged).

Python 2.7 or 3.4+ is required.

Where is SQLObject
==================

Site:
http://sqlobject.org

Download:
https://pypi.org/project/SQLObject/3.10.3

News and changes:
http://sqlobject.org/News.html

StackOverflow:
https://stackoverflow.com/questions/tagged/sqlobject

Mailing lists:
https://sourceforge.net/p/sqlobject/mailman/

Development:
http://sqlobject.org/devel/

Developer Guide:
http://sqlobject.org/DeveloperGuide.html

Example
=======

Install::

$ pip install sqlobject

Create a simple class that wraps a table::

>>> from sqlobject import *
>>>
>>> sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
>>>
>>> class Person(SQLObject):
... fname = StringCol()
... mi = StringCol(length=1, default=None)
... lname = StringCol()
...
>>> Person.createTable()

Use the object::

>>> p = Person(fname="John", lname="Doe")
>>> p
<Person 1 fname='John' mi=None lname='Doe'>
>>> p.fname
'John'
>>> p.mi = 'Q'
>>> p2 = Person.get(1)
>>> p2
<Person 1 fname='John' mi='Q' lname='Doe'>
>>> p is p2
True

Queries::

>>> p3 = Person.selectBy(lname="Doe")[0]
>>> p3
<Person 1 fname='John' mi='Q' lname='Doe'>
>>> pc = Person.select(Person.q.lname=="Doe").count()
>>> pc
1

Oleg.
--
Oleg Broytman https://phdru.name/ phd@phdru.name
Programmers don't die, they just GOSUB without RETURN.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor