Neil Muller | 26 Feb 09:13 2015
Picon

Python3 port status update

For those not following github closely, there has been good progess on
the port to python 3. We are now down to only 3 test failures with
python3 and sqlite, and 4 with postgres. No-one's looked at trying to
run against mysql yet, I believe.

The failures in test_unicode are due to the changed unicode handling
in pyton 3, and the tests should probably be reworked for the python 3
behaviour.

The fialure in test_validiation is due to the handling of a custom
class with a __unicode__ method. I'm personally not sure how we should
handle these in python 3. Would it help people porting code to special
case __unicode__ in this case, or should we expect people to update to
using __str__ ?

Regardless of the outstanding test failures, I think the port is at a
point whee it would benefit from more people using and looking at the
code.

--

-- 
Neil Muller
drnlmuller <at> gmail.com

I've got a gmail account. Why haven't I become cool?

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
(Continue reading)

Oleg Broytman | 16 Feb 20:25 2015
X-Face

Sphinx docs

Hello! I've just created a branch sphinx-docs. The docs are published at
https://sqlobject.readthedocs.org/ . The branch needs some help from
people with knowledge of Sphinx.

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
Oleg Broytman | 15 Feb 23:30 2015
X-Face

flake8 cleanness

Hello!

   With a few exceptions master branch is now flake8-clean (and hence
pep8-clean) for Python 2. flake8-cleanness for commits is now a
requirement. Please consider using pre-commit hook installed by running
   flake8 --install-hook
Don't forget though that older branches are still maintained but are not
flake8-clean.

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
Oleg Broytman | 6 Jan 16:53 2015
X-Face

SQLObject 2.1.0

Hello!

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

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

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

* In queries generated with SQLObject's tables columns are sorted in the
  order they are declared in the table.

* In queries generated with sqlbuilder's Insert/Update, if values are
  passed using dictionaries, columns are sorted alphabetically.

* Tables in SELECT...FROM clause are sorted alphabetically.

* MySQLConnection, PostgresConnection and SQLiteConnection have got
  a new method listDatabases() that lists databases in the connection
  and returns a list of names.

* MySQLConnection, PostgresConnection and SQLiteConnection have got
  a new method listTables() that returns a list of table names in the database.

Contributor for this release is Ian Cordasco.

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

Oleg Broytman | 5 Jan 13:50 2015
X-Face

Flake8 fixes

Hello, All!

   Ian Cordasco and I split the work on flake8 fixes by error number. If
you want to help developing SQLObject see issues marked with [flake8] at
https://github.com/sqlobject/sqlobject/issues . The simpler issues
(lower number of lines) are also labeled "low-hanging fruit":
https://github.com/sqlobject/sqlobject/issues?q=is%3Aopen+label%3A%22low-hanging+fruit%22

   The recommended workflow:

1. Announce here you want to work on an issue; I'll assign the issue to
you. This is to avoid duplication of effort.

2. Fix the problems in the code. If the description in the issue isn't
detailed enough -- I can show the exact lines in the files.

3. Test with flake8 (I use vim-flake8 plugin but that's up to you). If
the error is ignored in setup.cfg -- remove it before testing; remove
both the comment and the error from "ignore" list.

3. Commit to branch "flake8-fixes"; do ``git pull --rebase`` before
pushing, then ``git push origin flake8-fixes``. Create a pull request
from your commit.

4. Please do one commit per issue. The biggest issues (with hundreds
lines) perhaps require a few commits. Make your commit message something
like "Fix #xxx flake8 Eyyy", where #xxx is the issue's number and yyy is
the error; for example "Fix #50 flake8 E401". "Fix #xxx" makes github
automatically close the issue.

(Continue reading)

Gregor Horvath | 5 Jan 12:19 2015

autoCommit=False and Transaction -> SQLObjectNotFound on creation

Hello,

Problem: 

$ dropdb scratch; createdb scratch; python /tmp/scratch.py 
Traceback (most recent call last):
  File "/tmp/scratch.py", line 25, in <module>
    er = Eingangsrechnung(name="test")
  File
 "/home/gregor/work/gnucash/testve/local/lib/python2.7/site-packages/sqlobject/main.py",
line 1226, in __init__
    self._create(id, **kw)
  File
 "/home/gregor/work/gnucash/testve/local/lib/python2.7/site-packages/sqlobject/main.py",
line 1274, in _create
    self._SO_finishCreate(id)
  File
 "/home/gregor/work/gnucash/testve/local/lib/python2.7/site-packages/sqlobject/main.py",
line 1301, in _SO_finishCreate
    self._init(id)
  File
 "/home/gregor/work/gnucash/testve/local/lib/python2.7/site-packages/sqlobject/main.py",
line 934, in _init
    raise SQLObjectNotFound, "The object %s by the ID %s does not
 exist" % (self.__class__.__name__, self.id)
sqlobject.main.SQLObjectNotFound: The object Eingangsrechnung by the ID
1 does not exist

--------------------

(Continue reading)

Michael Root | 30 Dec 18:53 2014

Accumulation functions over limited results


Hi.

Ran into an issue the other day, which I think could be described as a bug, or 
perhaps a mis-feature, depending on how you look at it.

If you use an accumulator function on a SelectResults object (sum, avg, etc.), 
it will silently do the "wrong thing" if that SelectResults object has a LIMIT 
in it.

Now, I understand that adding a LIMIT to a standard SQL query won't affect the 
result either:

     SELECT AVG(size) FROM Thing ORDER BY size LIMIT 5

This will return the average size of all rows, not just the smallest 5, as if 
the ORDER BY and LIMIT weren't there at all.  In this sense, the current 
behavior of SQLObject is correct.

However, consider this code:

     class Thing(SQLObject):
         size = IntCol()

     things = [Thing(size=n) for n in range(10)]

     allThings = Thing.select()
     smallThings = allThings.orderBy(Thing.q.size).limit(5)
     bigThings = allThings.orderBy(Thing.q.size).reversed().limit(5)
     evenThings = allThings.filter(Thing.q.size % 2 == 0)
(Continue reading)

Oleg Broytman | 20 Dec 19:19 2014
X-Face

SQLObject 2.0

Hello!

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

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

Features & Interface
--------------------

* DateTimeCol and TimeCol can read and write values with microseconds.

  WARNING: microseconds are supported by MariaDB since version 5.3.0 and
  by MySQL since version 5.6.4, and even these versions require special
  handling: columns to store microseconds have to be declared with
  precision 6: TIME(6), DATETIME(6), TIMESTAMP(6). SQLObject does the
  right thing when creating a new database but existing databases have
  to be changed: run something like
  ``ALTER TABLE name MODIFY COLUMN col TIME(6)`` for every column that
  you want to store microseconds.

  WARNING: backward compatibility problem! Date/Time columns created
  with microseconds cannot be read back from SQLite databases (and
  perhaps other backends) with versions of SQLObject older than 1.7.

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

* PostgresConnection, when used with fromDatabase=True, sets alternateID
(Continue reading)

Oleg Broytman | 18 Dec 18:22 2014
X-Face

SQLObject 1.7.3

Hello!

I'm pleased to announce version 1.7.3, a release with minor
documentation update of branch 1.7 of SQLObject.

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

* Extend setup.py: include docs and tests into the egg.

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.6 or 2.7 is required.

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

Site:
http://sqlobject.org
(Continue reading)

Oleg Broytman | 18 Dec 18:22 2014
X-Face

SQLObject 1.6.4

Hello!

I'm pleased to announce version 1.6.4, a release with minor
documentation update of branch 1.6 of SQLObject.

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

* Extend setup.py: include docs and tests into the egg.

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.5 or higher is required.

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

Site:
http://sqlobject.org
(Continue reading)

Oleg Broytman | 18 Dec 18:21 2014
X-Face

SQLObject 1.5.6

Hello!

I'm pleased to announce version 1.5.6, a release with minor
documentation update of branch 1.5 of SQLObject.

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

* Extend setup.py: include docs and tests into the egg.

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.4 or higher is required.

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

Site:
http://sqlobject.org
(Continue reading)


Gmane