PrettyTable 0.7 Release Candidate 1

14 views
Skip to first unread message

Luke Maurits

unread,
Jan 21, 2013, 11:03:48 PM1/21/13
to prettyta...@googlegroups.com
Greetings prettytable-devel,

It's that magical time of the year again, where I finally get around to
releasing a new PrettyTable so that all of the improvements and fixes
which have accumulated in trunk over the last several months can finally
see the light of day.

Tonight I tagged 0.7-RC01, the first release candidate for PrettyTable
0.7. I would like to request that anybody with the time and
inclination give the new version a test and let me know if
they experience any problems.

There are a few new features in particular that I would like people to
make use of if it's convenient for them.

1. IMPORTING FROM CSV

If you have your table data in a comma separated values file (.csv),
you can read this data into a PrettyTable like this:

from prettytable import from_csv
fp = open("myfile.csv", "r")
mytable = from_csv(fp)
fp.close()

2. IMPORTING FROM DATABASE

If you have your table data in a database which you can access using a
library which confirms to the Python DB-API (e.g. an SQLite database
accessible using the sqlite module), then you can build a PrettyTable
using a cursor object, like this:

import sqlite3
from prettytable import from_cursor

connection = sqlite3.connect("mydb.db")
cursor = connection.cursor()
cursor.execute("SELECT field1, field2, field3 FROM my_table")
mytable = from_cursor(cursor)

3. USING NON-LATIN CHARACTERS

Previous versions of PrettyTable have not handled non-Latin character
sets well (e.g. text in Chinese, Japanese, Korean, Russian, etc.).
Many of these characters have len() = 1 or 2 according to Python's
inbuilt string methods, but take up 2 or 1 spaces in the terminal.
This lead to tables which were poorly aligned. Completely fixing this
for any and all languages is a huge undertaking, but I hope I have
brought PrettyTable a good chunk of the way toward handling some of the
most common scenarios. So if you are using PrettyTable in an
application that involves data in languages which do not use Latin
characters, please check that alignment etc. works correctly for your
language.

There are a few other less major changes which you can read about in
the CHANGELOG file.

Even if you are unable to easily test any of the above new features,
just testing 0.7 in your current applications to make sure I have not
broken anything which worked previously would be very much
appreciated. There should not have been any breaking of syntax
compatibility between 0.6 and 0.7, so hopefully this kind of minimal
testing should be able to be done quickly and easily.

I would like to make the release sometime in the next few days before I
lose time or interest and the next release gets held up yet again, so
the sooner people are able to offer feedback, the better.

As always, many thanks to everybody who reported bugs, made good
feature requests or contributed patches.

Cheers,
Luke

Sandro Tosi

unread,
Jan 22, 2013, 3:56:18 PM1/22/13
to prettyta...@googlegroups.com
Hi Luke,

On Tue, Jan 22, 2013 at 5:03 AM, Luke Maurits <lu...@maurits.id.au> wrote:
> Tonight I tagged 0.7-RC01, the first release candidate for PrettyTable
> 0.7. I would like to request that anybody with the time and
> inclination give the new version a test and let me know if
> they experience any problems.

Do you mind cut off a tarball and upload it to PyPI? That way it
would be a lot easier to prepare the Debian package for upload &
testing.

Cheers,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

Luke Maurits

unread,
Jan 22, 2013, 4:27:22 PM1/22/13
to prettyta...@googlegroups.com
Hi Sandro,

I will surely do this when 0.7 is released, but do you really want me to
do it for the release candidate as well? The idea behind the RC is
really just for people to try dropping it into their existing
applications, maybe try some new features, and make sure nothing
unexpectedly blows up. Making a Debian package seems excessive?

That said, I can certainly do this if you like, as long as PyPI makes it
easy for me to upload this without bumping the public version up from 0.6...

Cheers,
Luke

Sandro Tosi

unread,
Jan 22, 2013, 4:54:28 PM1/22/13
to prettyta...@googlegroups.com
Hi Luke,

On Tue, Jan 22, 2013 at 10:27 PM, Luke Maurits <lu...@maurits.id.au> wrote:
> I will surely do this when 0.7 is released, but do you really want me to do
> it for the release candidate as well? The idea behind the RC is really just
> for people to try dropping it into their existing applications, maybe try
> some new features, and make sure nothing unexpectedly blows up. Making a
> Debian package seems excessive?

Ok then, never mind :) I'll package 0.7 once you'll release it.

Cheer,s
Reply all
Reply to author
Forward
0 new messages