[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks


Samuel Marks  added the comment:

Opened two issues and two PRs for 3.8 and 3.8:
- https://bugs.python.org/issue42241
- https://bugs.python.org/issue42242

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks


Change by Samuel Marks :


--
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks

Samuel Marks  added the comment:



--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Erlend Egeberg Aasland

Erlend Egeberg Aasland  added the comment:

> Should I close this issue—and PR—then? - Backport from master to these?

If this fix is wanted in 3.9 and 3.8, I think the correct way to proceed would 
be to close GH-23072 and backport GH-19581.

Try checking out 3.9 and cherrypicking 7f331c8 to verify that the trace-warning 
disappears. I'm pretty sure that SQLite3 version detection works on macOS.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks

Samuel Marks  added the comment:

@erlendaasland Hmm… just double-checked, and this issue is present on Python 
3.8.6 and 3.9.0 but not master [d3b4e068077dd26927ae7485bd0303e09d962c02] as 
you referenced.

Should I close this issue—and PR—then? - Backport from master to these?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Erlend Egeberg Aasland

Erlend Egeberg Aasland  added the comment:

> Yes, this commit extends his changes to include macOS support (for some 
> reason that SQLite version check doesn’t work properly on macOS

I can't reproduce this on master on macOS 10.15.7 with the SQLite 3.28.0 that's 
shipped with the os.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Oh, I see now that you're only mentioning 3.9 here. The issue was fixed in 
master only (that is 3.10 alpha). Perhaps GH-19581 should be backported to 3.9, 
or even 3.8, but that's not for me to decide.

Note: your patch is against 3.10, not 3.9.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks

Samuel Marks  added the comment:

Yes, this commit extends his changes to include macOS support (for some reason 
that SQLite version check doesn’t work properly on macOS; so this checks the 
macOS version, knowing AOT when SQLite trace v1 APIs were deprecated.

Curious that `sqlite3_enable_shared_cache` is in the ‘wontfix’ category… why is 
this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Look at bpo-24464 regarding the shared cache issue. Apparently I did not 
remember correctly regarding its status.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

FYI, commit 7f331c8 (GH-19581 / bpo-40318) migrates the sqlite3 to the new 
trace API.

There was also a discussion about sqlite3_enable_shared_cache() on bpo, but I 
think it was closed as "wont-fix", IIRC.

--
nosy: +erlendaasland

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42229] Fix SQLite warnings on macOS

2020-11-01 Thread Samuel Marks

New submission from Samuel Marks :

Planned to fix all the compiler warnings on macOS. Ended up just fixing this 
SQLite one:
```
Python-3.9.0/Modules/_sqlite/connection.c:1066:9: warning: 'sqlite3_trace' is 
deprecated: first deprecated in macOS 10.12
  [-Wdeprecated-declarations]
sqlite3_trace(self->db, 0, (void*)0);
^
sqlite3_trace_v2
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sqlite3.h:3022:36:
 note: 'sqlite3_trace' has
  been explicitly marked deprecated here
SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(
   ^
Python-3.9.0/Modules/_sqlite/connection.c:1069:9: warning: 'sqlite3_trace' is 
deprecated: first deprecated in macOS 10.12
  [-Wdeprecated-declarations]
sqlite3_trace(self->db, _trace_callback, trace_callback);
^
sqlite3_trace_v2
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sqlite3.h:3022:36:
 note: 'sqlite3_trace' has
  been explicitly marked deprecated here
SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(
   ^
```

Note that: `sqlite3_enable_shared_cache` should be removed from 
`Modules/_sqlite/module.c` also, as warning and guide says: 
https://www.sqlite.org/c3ref/enable_shared_cache.html
```
Python-3.9.0/Modules/_sqlite/module.c:147:10: warning: 
'sqlite3_enable_shared_cache' is deprecated: first deprecated in macOS
  10.7 - Not supported [-Wdeprecated-declarations]
```

But I think that would require a major version change, so let's keep that 
warning fix to one side.

Same with the tk issues, as per https://bugs.python.org/issue41016 ; although I 
suspect there's a way to quiet the warnings here…

--
components: Build
messages: 380126
nosy: samuelmarks
priority: normal
pull_requests: 21992
severity: normal
status: open
title: Fix SQLite warnings on macOS
type: compile error
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com