[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Attached patch consists of two commits: one to rename "conn" to "con", and one to rename "c" to "cur". Are you ok with that, Berker? -- Added file: https://bugs.python.org/file49851/patch.diff ___ Python

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: 'con' and 'cur' seems to be used in a majority of the examples. I suggest normalising to always using these two in code examples. -- ___ Python tracker

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Berker Peksag
Berker Peksag added the comment: No problem and thank you for taking time to report! I'd be happy to merge a PR that renames c to cur in the documentation (I counted four instances.) We can then reopen and retarget this isssue. -- resolution: -> not a bug

[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki
Inada Naoki added the comment: User may install Python from python.org installer, scoop, conda, and Windows Store. So envvar is not a right tool to configure only one installation. Anyway, adding more complex way to configure Python can be discussed later. Paul Moore againsted adding more

[issue43395] os.path states that bytes can't represent all MBCS paths under Windows

2021-03-04 Thread Eryk Sun
Eryk Sun added the comment: > Vice versa, using bytes objects cannot represent all file names > on Windows (in the standard mbcs encoding), hence Windows > applications should use string objects to access all files. This is outdated advice that should be removed, or at least reworded to

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Right, got me confused as well! I guess a clarification would be an improvement :) -- ___ Python tracker ___

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Tore Anderson
Tore Anderson added the comment: You're right. I got it confused with the conn object in the code I was working on, because it turns out that it has an execute() method: >>> import sqlite3 >>> c = sqlite3.connect('test.db') >>> c.execute('SELECT * FROM tbl') Closing, apologies for the

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Berker Peksag
Berker Peksag added the comment: https://github.com/python/cpython/blame/e161ec5dd7ba9355eb06757b9304019ac53cdf69/Doc/library/sqlite3.rst#L74-L76 is not a standalone snippet. It uses the cursor object created at

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Tore Anderson
Tore Anderson added the comment: You're looking in the wrong place, the buggy ones are at https://github.com/python/cpython/blame/e161ec5dd7ba9355eb06757b9304019ac53cdf69/Doc/library/sqlite3.rst#L74-L76 Tore -- ___ Python tracker

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Berker Peksag
Berker Peksag added the comment: Could you please post the full snippet? c is already set to a cursor at https://github.com/python/cpython/blame/e161ec5dd7ba9355eb06757b9304019ac53cdf69/Doc/library/sqlite3.rst#L56: c = conn.cursor() And the following example works fine: >>> import

[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Eryk Sun
Eryk Sun added the comment: > I'm always very hesitant to modify system-wide (or user-wide) settings > like this though. I'd be more comfortable if we made it a PYTHONUTF8_310 > variable that _only_ applies to that specific version. Otherwise someone > might install an update and break

[issue43383] imprecise handling of weakref callbacks

2021-03-04 Thread Konrad Schwarz
Change by Konrad Schwarz : -- resolution: -> postponed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43383] imprecise handling of weakref callbacks

2021-03-04 Thread Konrad Schwarz
Konrad Schwarz added the comment: Unfortunately, my management has impressed other priorities upon me; I can't delve deeper into this subject at the moment. My takeaway is that the error very likely lies on my side; maybe I need to re-check local variables and del them explicitly. In any

[issue12594] Docs for "Using Python on a Macintosh" needs to be updated

2021-03-04 Thread Tomy Hsieh
Change by Tomy Hsieh : -- nosy: +tomy000 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2021-03-04 Thread Tomy Hsieh
Change by Tomy Hsieh : -- nosy: +tomy000 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43398] [sqlite3] sqlite3.connect() segfaults if given a faulty Connection factory

2021-03-04 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : If the connection factory __init__ method fails, we hit a seg. fault when pysqlite_do_all_statements() is called to clean up the defect connection: PyList_Size received a NULL pointer. Suggested fix: Split pysqlite_do_all_statements() in two: one

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23515 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24745 ___ Python tracker

[issue43396] Non-existent method sqlite3.Connection.fetchone() used in docs

2021-03-04 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Correct, fetchone() is a cursor method. Thanks for the report! -- nosy: +berker.peksag, erlendaasland ___ Python tracker ___

[issue40642] Cpython "pystate.h" subdirectory wrong

2021-03-04 Thread Xi Ruoyao
Change by Xi Ruoyao : -- keywords: +patch nosy: +xry111 nosy_count: 3.0 -> 4.0 pull_requests: +23514 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24744 ___ Python tracker

[issue43369] [sqlite3] Handle out-of-memory errors in sqlite3_column_*()

2021-03-04 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43369] [sqlite3] Handle out-of-memory errors in sqlite3_column_*()

2021-03-04 Thread Berker Peksag
Berker Peksag added the comment: New changeset e161ec5dd7ba9355eb06757b9304019ac53cdf69 by Erlend Egeberg Aasland in branch 'master': bpo-43369: sqlite3_column_{text,blob} failures now raise MemoryError (GH-24723)

[issue43397] Incorrect conversion path case with german character

2021-03-04 Thread Сергей М
New submission from Сергей М : I try to normalize case for path with german characters: ``` >os.path.normcase(r'c:\asd\ASDẞ') 'c:\\asd\\asdß' ``` But in OS Windows r'c:\asd\ASDẞ' and r'c:\asd\asdß' are different paths. -- components: Windows messages: 388079 nosy: paul.moore,

[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +23513 pull_request: https://github.com/python/cpython/pull/24743 ___ Python tracker ___

[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +23512 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24742 ___ Python tracker ___

<    1   2