[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Such a change would be backwards incompatible and no longer in line with PEP 249. I also don't understand what you regard as confusing about the message "unable to open database file". The message could be extended to include the path, but apart from

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Could it instead throw a FileNotFoundError if the db simply doesn't exist at > the specified path? We pass the database path pretty much straight to sqlite3_open_v2(), via the os.PathLike interface, so any errors we get come straight from SQLite (apart

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Isaac Boates
New submission from Isaac Boates : I was just using the sqlite3 package and was very confused when trying to open an sqlite database from a relative path, because the only error provided was: File "/path/to/filepy", line 50, in __init__ self.connection = sqlite3.connect(path)