You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Tyler Hobbs (JIRA)" <ji...@apache.org> on 2011/04/19 22:30:05 UTC
[jira] [Commented] (CASSANDRA-2508) missing imports in CQL Python
driver
[ https://issues.apache.org/jira/browse/CASSANDRA-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021769#comment-13021769 ]
Tyler Hobbs commented on CASSANDRA-2508:
----------------------------------------
Looks good with the exception of changing the exceptions that are raised.
Internal error refers to cql.InternalError here, and PEP 249 outlines its usage in a way that closely matches the way it was used.
{noformat}
InternalError
Exception raised when the database encounters an internal
error, e.g. the cursor is not valid anymore, the
transaction is out of sync, etc. It must be a subclass of
DatabaseError.
{noformat}
PEP 249 also mentions using NotSupportedError explicitly in reference to rollback():
{noformat}
NotSupportedError
Exception raised in case a method or database API was used
which is not supported by the database, e.g. requesting a
.rollback() on a connection that does not support
transaction or has transactions turned off. It must be a
subclass of DatabaseError.
{noformat}
I think it should be kept here.
> missing imports in CQL Python driver
> ------------------------------------
>
> Key: CASSANDRA-2508
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2508
> Project: Cassandra
> Issue Type: Bug
> Components: Tools
> Affects Versions: 0.8
> Reporter: Eric Evans
> Assignee: Jonathan Ellis
> Labels: cql
> Fix For: 0.8
>
> Attachments: 2508.txt
>
>
> Try:
> bq. cd drivers/py && python -c 'from cql import DateFromTicks; DateFromTicks(1)'
> Also:
> {{cql.connection}} is missing an import of {{AuthenticationRequest}} from {{ttypes}}, and the exceptions {{NotSupportedError}}, and {{InternalError}}.
> Also:
> {{marshal.unmarshal_long}} has a NameError waiting to happen in the form of "unpack"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira