[issue13773] Support sqlite3 uri filenames

2013-02-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You can use p format in PyArg_ParseTuple* for boolean parameters.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2013-02-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 You can use p format in PyArg_ParseTuple* for boolean parameters.

That's what I used, indeed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2013-02-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, I were blind.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2013-02-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f13bb1e40fbc by Antoine Pitrou in branch 'default':
Issue #13773: sqlite3.connect() gets a new `uri` parameter to pass the filename 
as a URI, allowing to pass custom options.
http://hg.python.org/cpython/rev/f13bb1e40fbc

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2013-02-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've committed the patch, closing.

--
assignee: ghaering - 
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2013-02-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is an updated patch.

--
Added file: http://bugs.python.org/file28982/sqlite_open_uri.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2013-01-15 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2013-01-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This would definitely be useful. I would have liked to have this feature today.
poq, could you sign a contributor agreement?
See http://www.python.org/psf/contrib/
Also, it's better if you can use a real name (or at least a well-known 
pseudonym).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-09-11 Thread André Anjos

André Anjos added the comment:

A question concerning this patch: is this going to be applied only to 3.3 or to 
2.7 as well? Python-2.7.x also does not have this functionality which would be 
interesting to get.

--
nosy: +anjos

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-09-11 Thread Éric Araujo

Éric Araujo added the comment:

2.7 and 3.2 are stable versions which only get bug fixes.  3.3 is in release 
candidate stage, so this new feature can only go into 3.4.  See the devguide 
and PEPs for more info about the process we follow.

--
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-02-05 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 I've added an updated patch which adds a link. I've also changed the 
 exception when URIs
 are not supported to sqlite3.NotSupportedError.
Sounds good.  Note to the person who will commit: :const:`True` should be 
marked up as ``True.``

 I prefer anonymity. :)
OK.  I’m still not sure if a contributor agreement is needed for this patch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-02-04 Thread poq

poq p...@gmx.com added the comment:

 The Python docs should either list them (there aren’t much; pro: all the info 
 is here, con: maintenance) or link to them.

They've already added a new option ('psow') since I opened this report, so 
linking is probably more future-proof.

I've added an updated patch which adds a link. I've also changed the exception 
when URIs are not supported to sqlite3.NotSupportedError.

 By the way, do you want to give us your full name so that we can credit you?

I prefer anonymity. :)

--
Added file: http://bugs.python.org/file24420/sqlite-uri.v3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-02-03 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Should I also rewrap modified lines that were already much too long?
Please don’t, it would make the diff harder to read.

 I also noticed  fixed an unrelated typo in Lib/sqlite3/test/hooks.py...
Can you open a bug report for that?

I think the doc could link to the sqlite.org doc about URIs.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-02-03 Thread poq

poq p...@gmx.com added the comment:

 Can you open a bug report for that?

Opened #13934.

 I think the doc could link to the sqlite.org doc about URIs.

I considered this, but the rest of the sqlite3 module documentation doesn't 
link to the sqlite.org doc pages either. There is only a link to 
http://www.sqlite.org under 'See also'.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-02-03 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

[Amaury]
 The test function should use from test.support import TESTFN to get
 a temporary file name
I believe that TESTFN predates tempfile (and the tempfile helpers in regrtest 
and test.support) and is now seen as an ugly relic (at least by me :)

[poq]
 I think the doc could link to the sqlite.org doc about URIs.
 I considered this, but the rest of the sqlite3 module documentation doesn't 
 link to the
 sqlite.org doc pages either.
Well, users need a way to find the list of allowed options.  The Python docs 
should either list them (there aren’t much; pro: all the info is here, con: 
maintenance) or link to them.

By the way, do you want to give us your full name so that we can credit you?  
(And on a related subject, I don’t know if this small patch requires a 
contributor agreement.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-01-13 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee:  - ghaering
nosy: +eric.araujo, ghaering

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-01-11 Thread poq

New submission from poq p...@gmx.com:

URIs are an extensible way to pass options to SQLite. See:
http://www.sqlite.org/uri.html

Patch adds a keyword argument uri to sqlite3.connect which causes the 
filename to be parsed as a URI if set to True.

--
components: Extension Modules
files: sqlite-uri.patch
keywords: patch
messages: 151089
nosy: poq
priority: normal
severity: normal
status: open
title: Support sqlite3 uri filenames
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file24205/sqlite-uri.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-01-11 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Hi, I will let others discuss the feature itself, here are already some 
comments about your patch:

- In module_connect(), the ability to pass factory as a positional argument 
is broken, please restore the previous code; I'm afraid there is no better 
implementation, even if it's a copy of connection.__init__.
- I suggest to allow uri in all builds, and fail only when it's True on a non 
supported platform.
- In general, try to wrap C code in 80 columns (except for the .. function:: 
directive in .rst files)
- IIRC a correct URI is file:///path/to/file but sqlite probably allows 
file:/path/to/file as well.
- The test function should use from test.support import TESTFN to get a 
temporary file name (but I agree that sqlite tests don't seem to follow Python 
standards)

--
nosy: +amaury.forgeotdarc
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13773] Support sqlite3 uri filenames

2012-01-11 Thread poq

poq p...@gmx.com added the comment:

Thanks for your comments. You're right, I didn't consider positional arguments. 
Here's a patch that addresses your comments.

Should I also rewrap modified lines that were already much too long?

I also noticed  fixed an unrelated typo in Lib/sqlite3/test/hooks.py...

--
Added file: http://bugs.python.org/file24207/sqlite-uri.v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13773
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com