Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #2592

SQLObject 3.4.0

Path csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From Oleg Broytman <phd@phdru.name>
Newsgroups comp.lang.python.announce
Subject SQLObject 3.4.0
Date Sat, 5 Aug 2017 19:11:08 +0200
Lines 136
Approved python-announce-list@python.org
Message-ID <mailman.120.1502087125.28999.python-announce-list@python.org> (permalink)
References <20170805171108.GA15747@phdru.name>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace news.uni-berlin.de 0wf5ISzNBwA/aix3RFP2VAVVAfhga2Grf7IT1CGSiQUQ==
Return-Path <phd@phdru.name>
X-Original-To python-announce-list@python.org
Delivered-To python-announce-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'url:sourceforge': 0.03; 'remaining': 0.04; 'binary': 0.05; 'cache': 0.05; 'classes,': 0.05; 'classes.': 0.07; 'cleanup': 0.07; 'contributor': 0.07; 'deprecated': 0.07; 'fixes': 0.07; 'python': 0.09; 'encode': 0.09; 'fname': 0.09; 'postgresql,': 0.09; 'rows': 0.09; 'bug': 0.10; '2.7': 0.11; 'encoding': 0.15; "'q'": 0.16; '(also': 0.16; 'email addr:phdru.name': 0.16; 'email name:phd': 0.16; 'header:X-Face:1': 0.16; 'idempotent.': 0.16; 'inverse': 0.16; 'return.': 0.16; 'setup.py.': 0.16; 'supported.': 0.16; 'sybase,': 0.16; 'travis': 0.16; 'url:tagged': 0.16; 'string': 0.17; 'driver': 0.18; 'skip:p 40': 0.18; 'tests': 0.18; '>>>': 0.18; 'to:2**1': 0.21; 'meant': 0.22; 'mysql,': 0.22; 'tables': 0.23; 'fix': 0.24; 'skip:= 10': 0.24; 'import': 0.26; 'values': 0.26; 'header:User-Agent:1': 0.27; 'branch': 0.27; 'url:mailman': 0.27; '2.6': 0.27; 'skip:u 30': 0.27; "i'm": 0.28; 'example': 0.29; 'changes:': 0.29; 'download:': 0.29; 'minor': 0.29; 'quoting': 0.29; 'wraps': 0.29; '-----': 0.29; 'required.': 0.30; 'expected': 0.30; 'minimal': 0.30; 'url:listinfo': 0.31; '--------': 0.31; 'url:python': 0.32; 'transaction': 0.32; 'instances': 0.33; 'skip:= 20': 0.33; 'announce': 0.34; 'supported': 0.34; 'list': 0.34; 'instead': 0.35; 'version': 0.35; 'list:': 0.35; 'stable': 0.35; 'class': 0.36; 'to:addr:python- list': 0.36; 'comment': 0.36; 'url:docs': 0.36; 'url:org': 0.36; 'there': 0.36; 'programmers': 0.36; '...': 0.37; 'list,': 0.37; 'skip:p 20': 0.37; 'release': 0.38; 'skip:- 10': 0.38; 'add': 0.38; 'charset:us-ascii': 0.38; 'mailing': 0.38; 'needed': 0.38; 'received:io': 0.38; 'received:psf.io': 0.38; 'received:ams1.psf.io': 0.38; 'received:mail1.ams1.psf.io': 0.38; 'skip:p 30': 0.38; 'proto:https': 0.39; 'to:addr:python.org': 0.40; 'url:news': 0.61; 'your': 0.61; 'more': 0.62; 'dr.': 0.63; 'our': 0.64; 'easy': 0.64; 'news': 0.65; 'complete': 0.66; 'drivers': 0.72; 'to:addr:python-announce-list': 0.72; 'url:4': 0.75; 'connection.': 0.76; 'site:': 0.77; '2.7.': 0.84; '3.4': 0.84; 'neil': 0.84
DKIM-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=phdru.name; s=default; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=SZH+194QCWi5Tk1V0uGArSiUKwfZ6vV0/0dW61Mrnuw=; b=q7LeS/qBzfTT7UKSxh9y3j2g6C99d8fWrDq38HS8JR9pIhhFse6KmfAr/B5eryopYZYtQZnkGmN5FX/mf7JrCUi8yOInwNFJjb6wnaEl+qKmKlfxCXffpsfIQWi6KSF5Kn4Tt0woFOQxF00TQa+U2MgbEgYUdq0ifU6OOvO1Bq0=;
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 http://phdru.name/
Mail-Followup-To Oleg Broytman <phd@phdru.name>, Python Mailing List <python-list@python.org>
User-Agent Mutt/1.5.23 (2014-03-12)
X-Mailman-Approved-At Mon, 07 Aug 2017 02:25:24 -0400
X-BeenThere python-announce-list@python.org
X-Mailman-Version 2.1.24
Precedence list
List-Id Announcement-only list for the Python programming language <python-announce-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-announce-list/>
List-Post <mailto:python-announce-list@python.org>
List-Help <mailto:python-announce-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-announce-list>, <mailto:python-announce-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <20170805171108.GA15747@phdru.name>
Xref csiph.com comp.lang.python.announce:2592

Show key headers only | View raw


Hello!

I'm pleased to announce version 3.4.0, the first stable release of branch
3.4 of SQLObject.


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

Contributor for this release is Dr. Neil Muller.

Features
--------

* Python 2.6 is no longer supported. The minimal supported version is
  Python 2.7.

Drivers (work in progress)
--------------------------

* Encode binary values for py-postgresql driver. This fixes the
  last remaining problems with the driver.

* Encode binary values for PyGreSQL driver using the same encoding as for
  py-postgresql driver. This fixes the last remaining problems with the driver.

  Our own encoding is needed because unescape_bytea(escape_bytea()) is not
  idempotent. See the comment for PQunescapeBytea at
  https://www.postgresql.org/docs/9.6/static/libpq-exec.html:

    This conversion is not exactly the inverse of PQescapeBytea, because the
    string is not expected to be "escaped" when received from PQgetvalue. In
    particular this means there is no need for string quoting considerations.

* List all drivers in extras_require in setup.py.

Minor features
--------------

* Use base64.b64encode/b64decode instead of deprecated
  encodestring/decodestring.

Tests
-----

* Fix a bug with sqlite-memory: rollback transaction and close connection.
  The solution was found by Dr. Neil Muller.

* Use remove-old-files.py from ppu to cleanup pip cache
  at Travis and AppVeyor.

* Add test_csvimport.py more as an example how to use load_csv
  from sqlobject.util.csvimport.

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


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

SQLObject is an 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, PostgreSQL, SQLite,
Firebird, Sybase, MSSQL and MaxDB (also known as SAPDB).

Python 2.7 or 3.4+ is required.


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

Site:
http://sqlobject.org

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

Mailing list:
https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss

Download:
https://pypi.python.org/pypi/SQLObject/3.4.0

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

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


Example
=======

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            http://phdru.name/            phd@phdru.name
           Programmers don't die, they just GOSUB without RETURN.

Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread


Thread

SQLObject 3.4.0 Oleg Broytman <phd@phdru.name> - 2017-08-05 19:11 +0200

csiph-web