[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Mohamed


Mohamed  added the comment:

This statement in the main program which is calling a subprogram, to control 
for multiple runs. Even I close this statement, the issue is same.
del sys.modules['cm_asset_add'] 

I've contacted Microsoft support team, they have different opinions, about the 
impact of the latest Windows update which was on May 1st

--

___
Python tracker 

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



[issue44095] Add suffix property to zipfile.Path

2021-05-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +jaraco

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Mohamed


Mohamed  added the comment:

I chose Python to develop a huge information system.
I completed about 47%, and made a demonstration, so everything was working 
correctly, as evidenced by presence of the data
Now, I can't go back, and I can't move forward

--

___
Python tracker 

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



[issue44097] add configure option to control the groups of .pyc files to install

2021-05-10 Thread Peixing Xin


New submission from Peixing Xin :

Currently when building and installing Python out of source, unoptimized .pyc 
files and 2 types of optimized .pyc files(*.opt-1.pyc and *.opt-2.pyc) are all 
compiled out and installed. So to reduce package size and build and 
installation time, we should provide an option in configure to control the 
groups of .pyc files to install. For  distribution case, normally only one type 
of .pyc files even none is needed.

--
components: Build
messages: 393356
nosy: pxinwr
priority: normal
pull_requests: 24663
severity: normal
status: open
title: add configure option to control the groups of .pyc files to install
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Are they saying this error is result of Windows update? (It may be. I didn't 
notice you're talking about 21H1, I thought you're talking about other patch 
updates.)

--

___
Python tracker 

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



[issue44097] add configure option to control the groups of .pyc files to install

2021-05-10 Thread Peixing Xin


Change by Peixing Xin :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Christian Heimes


Christian Heimes  added the comment:

For your information Python 3.8 is now in security fix-only mode and no longer 
receives regular updates. That means that any potential compatibility issues 
with Windows updates will not be addressed. Could you please update to Python 
3.9 and try again?

--
nosy: +christian.heimes

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Mohamed

Mohamed  added the comment:

These are the latest updates:
May 08, 2021, Microsoft Edge
May 06, 2021, Microsoft OneDrive
May 01, 2021, Update Health Tools

There is no an option to uninstall the following:
May 01, 2021-KB4023057: Update for Windows 10 Update Service components 
April 28, 2021—KB5001391 (OS Builds 19041.964 and 19042.964) Preview

I don't know, any of these updates might have an effect. 

I'm using a lot of modules, it means I have to install them again on Python 3.9

--

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Shortcut is store the output of pip in a file using,

pip freeze > file.txt

And then after installing Python 3.9

py -3.9 -m pip install -m file.txt

--
nosy:  -christian.heimes

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Mohamed


Mohamed  added the comment:

Thanks a lot

--

___
Python tracker 

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



[issue44097] add configure option to control the groups of .pyc files to install

2021-05-10 Thread Peixing Xin


Peixing Xin  added the comment:

For the configure option name used in PR# 23930, change it to 
"--enable-pyc-groups" is better? What is your advice?

--

___
Python tracker 

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



[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2021-05-10 Thread Pablo Conesa


Pablo Conesa  added the comment:

So, is it ok, when the fast copy fails, not to _GiveupOnFastCopy(err)?

I can understand that fast copy might fail, but then the Giveup part should 
happen and it wasn't.

Additionally, _USE_CP_SENDFILE could be taken, optionally from an environment 
variable to cancel the fastcopy once we know it will fail?

--

___
Python tracker 

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



[issue44097] add configure option to control the groups of .pyc files to install

2021-05-10 Thread Christian Heimes


Christian Heimes  added the comment:

Please hold off with PR until we have agreed if we want this feature request 
makes sense at all. Linux distributions typically provide all pyc variants. 
There are also better ways to shrink code size, e.g. deduplication or 
compression.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue512981] readline /dev/tty problem

2021-05-10 Thread Pierre


Pierre  added the comment:

Please, let me know if I should re-open a new bug for this one.

--

___
Python tracker 

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



[issue44092] [sqlite3] consider removing special rollback handling

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

BTW, the patch also removes resetting of cursors upon close, which is a little 
bit out of scope of this bpo.

--

___
Python tracker 

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



[issue37373] Configuration of windows event loop for libraries

2021-05-10 Thread Min RK


Min RK  added the comment:

A hiccup to using uvloop is that it doesn't support Windows yet 
(https://github.com/MagicStack/uvloop/issues/14), so it can't be used in the 
affected environment.


I'm exploring this again for pyzmq / Jupyter, and currently investigating 
relying on tornado's AddThread loop functionality. It's even slightly easier 
for tornado, which can reasonably set the proactor-wrapper policy at IOLoop 
start time, which means `asyncio.get_event_loop()` returns a loop with 
add_reader. But pyzmq doesn't get invoked until an event loop is already 
running. That means the selector thread needs to work not as a wrapper of the 
loop itself, as in tornado's AddThreadSelector, but attached after-the-fact. 
Using tornado's AddThread seems to work for this, but I'm not sure that should 
be assumed.

--
nosy: +minrk

___
Python tracker 

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



[issue44055] NamedTemporaryFile opened twice on Windows

2021-05-10 Thread Lumír Balhar

Lumír Balhar  added the comment:

I understand, thanks for the explanation.

I'd like to improve the documentation to make it more clear that the file 
actually can be reopened on Windows when you use delete=False but I cannot find 
the right words :/

What about:

That name can be retrieved from the name attribute of the returned file-like 
object. If delete is true (the default), the file is deleted as soon as it is 
closed. Whether the name can be used to open the file a second time, while the 
named temporary file is still open with delete set to true, varies across 
platforms (it can be so used on Unix; it cannot on Windows NT or later).

--

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


--
nosy:  -erlendaasland

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Today the nosy list is not working. When I don't even mean to add or remove 
someone, that person is automatically being added.

--

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Sorry, for the disturbance in the nosy list but it's glitching.

--

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2021-05-10 Thread Mark Shannon


Mark Shannon  added the comment:

Thanks everyone for the triaging and fixing.

--

___
Python tracker 

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



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-10 Thread Ken Jin


New submission from Ken Jin :

``typing.List`` includes ``ParamSpec`` in ``__parameters__`` but the builtin 
``list`` doesn't. The behavior of the latter is correct, as PEP 612 states 
that: "As before, parameters_expressions by themselves are not acceptable in 
places where a type is expected".

https://www.python.org/dev/peps/pep-0612/#valid-use-locations

This patch just makes the typing version same as the builtin version by 
excluding ``ParamSpec`` from ``__parameters__`` (except for Concatenate, 
Callable, and Generic).

--
assignee: kj
components: Library (Lib)
messages: 393373
nosy: gvanrossum, kj, levkivskyi
priority: normal
severity: normal
status: open
title: Remove ParamSpec from __parameters__ of most typing generics
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-10 Thread Ken Jin


Change by Ken Jin :


--
keywords: +patch
pull_requests: +24664
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26013

___
Python tracker 

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



[issue44099] Introduce a new slot in PyModuleDef to hold the classes

2021-05-10 Thread Shreyan Avigyan


New submission from Shreyan Avigyan :

It's tedious to add classes one by one using PyModule_AddObject in 
PyInit_module function. Wouldn't it be much easier if there's a slot that has 
an array of all the classes in their PyObject form and it'll automatically add 
those classes. Since this is a backwards compatibility change it'll be best if 
a macro (like PY_AUTO_OBJECT maybe?) is defined then it'll add those classes 
automatically. If the slot is NULL or 0 then don't add anything. But yeah they 
may add more classes if they want but it doesn't matter much.

Thanking you,

With Regards,
Shreyan Avigyan

--
components: C API, Extension Modules
messages: 393374
nosy: shreyanavigyan
priority: normal
severity: normal
status: open
title: Introduce a new slot in PyModuleDef to hold the classes
type: enhancement

___
Python tracker 

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



[issue26110] Speedup method calls 1.2x

2021-05-10 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj
nosy_count: 21.0 -> 22.0
pull_requests: +24665
pull_request: https://github.com/python/cpython/pull/26014

___
Python tracker 

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



[issue44100] test_subinterpreters fails in AMD64 Fedora Stable 3.x

2021-05-10 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Example failure:

https://buildbot.python.org/all/#/builders/543/builds/133

test_already_destroyed (test.test__xxsubinterpreters.DestroyTests) ... ok
test_bad_id (test.test__xxsubinterpreters.DestroyTests) ... ok
test_does_not_exist (test.test__xxsubinterpreters.DestroyTests) ... ok
test_from_current (test.test__xxsubinterpreters.DestroyTests) ... ok
test_from_other_thread (test.test__xxsubinterpreters.DestroyTests) ... ok
test_from_sibling (test.test__xxsubinterpreters.DestroyTests) ... ok
test_main (test.test__xxsubinterpreters.DestroyTests) ... ok
test_one (test.test__xxsubinterpreters.DestroyTests) ... ok
Fatal Python error: Py_EndInterpreter: thread still has a frame
Python runtime state: initialized
Thread 0x7f0b28968740 (most recent call first):
  File "", line 4 in 
make: *** [Makefile:1249: buildbottest] Aborted (core dumped)
program finished with exit code 2
elapsedTime=385.730409
test_still_running (test.test__xxsubinterpreters.DestroyTests) ...

--
messages: 393375
nosy: eric.snow, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_subinterpreters fails in AMD64 Fedora Stable 3.x
versions: Python 3.11

___
Python tracker 

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



[issue44100] test_subinterpreters fails in AMD64 Fedora Stable 3.x: "Fatal Python error: Py_EndInterpreter: thread still has a frame"

2021-05-10 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue44100] test_subinterpreters fails in AMD64 Fedora Stable 3.x: "Fatal Python error: Py_EndInterpreter: thread still has a frame"

2021-05-10 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_subinterpreters fails in AMD64 Fedora Stable 3.x -> 
test_subinterpreters fails in AMD64 Fedora Stable 3.x: "Fatal Python error: 
Py_EndInterpreter: thread still has a frame"

___
Python tracker 

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



[issue44100] test__xxsubinterpreters: test_one() fails in AMD64 Fedora Stable 3.x: "Fatal Python error: Py_EndInterpreter: thread still has a frame"

2021-05-10 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_subinterpreters fails in AMD64 Fedora Stable 3.x: "Fatal Python 
error: Py_EndInterpreter: thread still has a frame" -> test__xxsubinterpreters: 
test_one() fails in AMD64 Fedora Stable 3.x: "Fatal Python error: 
Py_EndInterpreter: thread still has a frame"

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-05-10 Thread Mark Shannon


Mark Shannon  added the comment:

Ned, no line numbers should never be None.
(Except under very unusual circumstances, like the trace function raising an 
error)

Taking a look at the disassembly of execsitecustomize, there is a return with 
no line number, which shouldn't happen.

--

___
Python tracker 

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



[issue44101] Generation of an executable's library file when python is built is static

2021-05-10 Thread Christian Rendina


New submission from Christian Rendina :

When linking any windows application with pythoncore built as a static library, 
such executable will automatically export all python c api functions and 
generate a static library.

Exporting functions from a static library is a strange behavour, as I am not 
aware of any reason why dllimport/export should be used when building a static 
library.

This behavour oncurrs because python's export.h doesn't know when the library 
is linked as shared or static.

I have attached a patch that should fix this issue.
Tested under Windows 10 + VS2019, a static linkage of Python3 does not produce 
any library file anymore, and such exports are no longer visible with 
Dependencies.

I would like to apology if I got any tag wrong, as it's my first issue here.

--
components: Windows
files: prop.patch
keywords: patch
messages: 393377
nosy: lakor64, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Generation of an executable's library file when python is built is static
type: behavior
versions: Python 3.11
Added file: https://bugs.python.org/file50031/prop.patch

___
Python tracker 

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



[issue44102] mock_open does not support the use of 'seek()'

2021-05-10 Thread Niko


New submission from Niko :

Using 'mock_open' to unit test a code that uses the 'seek()' function for the 
file object does not work. This would be a great addition for mock_open 
functionality as this use case happens occasionally.

Test file contains:
def test_one(self):
with patch("builtins.open", mock_open(read_data="#123")):
script.main()

Example script:
def main():
with open('some/file', 'r') as f:
print(f.read(1))
f.seek(0)
print(f.read(1))

if __name__ == "__main__":
main()

Output will be:
#
1

While the expected output is:
#
#

--
messages: 393378
nosy: nikle
priority: normal
severity: normal
status: open
title: mock_open does not support the use of 'seek()'
type: behavior
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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Miro Hrončok

Miro Hrončok  added the comment:

I am afraid the "Speed up check for tracing in interpreter dispatch" brought 
some backwards incompatible changes:

yappi/_yappi.c:1261:9: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member 
named ‘use_tracing’; did you mean ‘tracing’?
 1261 | ts->use_tracing = 1;
  | ^~~
  | tracing

This is not mentioned in https://docs.python.org/3.10/whatsnew/3.10.html and I 
haven't noticed the use_tracing member being deprecated. I am confused. Should 
this happened?

--
nosy: +hroncok, petr.viktorin, vstinner

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Ping

--

___
Python tracker 

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



[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-10 Thread So Ukiyama


Change by So Ukiyama :


--
nosy: +uniocto
nosy_count: 4.0 -> 5.0
pull_requests: +24666
pull_request: https://github.com/python/cpython/pull/26016

___
Python tracker 

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



[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-05-10 Thread So Ukiyama


So Ukiyama  added the comment:

I created a PR which apply Martin Panter's patch.

So If I have offended you with my rudeness, I hope you will forgive me for 
taking this down.

--

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Berker Peksag


Berker Peksag  added the comment:

Serhiy is right. Without a proper research on why it was added in the first 
place, simply removing the second call won't make code any better and it may 
introduce regressions (we've already introduced two in 3.10) Maybe doing some 
digging in pysqlite commits or reaching out to the original author may help.

--

___
Python tracker 

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



[issue44102] mock_open does not support the use of 'seek()'

2021-05-10 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also https://bugs.python.org/issue25690 . 
https://github.com/nivbend/mock-open has support for seek.

As stated in the other issue supporting all operations of a filesystem might 
add more complexity.

--
components: +Library (Lib)
nosy: +cjw296, lisroach, mariocj89, michael.foord, rbcollins, xtreak
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.9

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Greg Stein


Change by Greg Stein :


--
nosy: +gstein
nosy_count: 3.0 -> 4.0
pull_requests: +24667
pull_request: https://github.com/python/cpython/pull/26015

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Miro Hrončok

Miro Hrončok  added the comment:

Fedora packages affected (that we know of now):

greenlet: https://bugzilla.redhat.com/show_bug.cgi?id=1957784
dipy: https://bugzilla.redhat.com/show_bug.cgi?id=1958203
yappi: https://bugzilla.redhat.com/show_bug.cgi?id=1958896
smartcols: https://bugzilla.redhat.com/show_bug.cgi?id=1958938

--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Mark Shannon


Mark Shannon  added the comment:

At yappi/_yappi.c:1261 sets an undocumented field on a CPython internal data 
structure.

What did you believe that was supposed to do? use_tracing is not documented 
anywhere.

We could add the field back and ignore it, but I doubt that would help you much.

--

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
Removed message: https://bugs.python.org/msg393386

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Relevant historical commits:
- 
https://github.com/ghaering/pysqlite/commit/a471f0495956c3b8e3f45895b172e522a9ecd683
- 
https://github.com/ghaering/pysqlite/commit/5a009ed6fb2e90b952438f5786f93cd1e8ac8722
- 191321d11bc7e064e1a07830a43fa600de310e1bj (in cpython repo)

--

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Relevant historical commits:
- 
https://github.com/ghaering/pysqlite/commit/a471f0495956c3b8e3f45895b172e522a9ecd683
- 
https://github.com/ghaering/pysqlite/commit/5a009ed6fb2e90b952438f5786f93cd1e8ac8722
- 191321d11bc7e064e1a07830a43fa600de310e1b (in cpython repo)

--

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-05-10 Thread Mark Shannon


Mark Shannon  added the comment:

If there is no C-API function that supports your needs, feel free to suggest 
one.

--

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-05-10 Thread Mark Shannon


Change by Mark Shannon :


--
Removed message: https://bugs.python.org/msg393388

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Mark Shannon


Mark Shannon  added the comment:

If there is no C-API function that supports your needs, feel free to suggest 
one.

--

___
Python tracker 

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



[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +24668
pull_request: https://github.com/python/cpython/pull/26018

___
Python tracker 

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



[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24669
pull_request: https://github.com/python/cpython/pull/26019

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Miro Hrončok

Miro Hrončok  added the comment:

Disclaimer: I have not written the code nor do I understand what is trying to 
achieve. I merely collect the data and report the problems to the package 
maintainers.

It just seems to me that a non-underscored (and hence public) member variable 
on a non-underscored (and hence public) structure should not suddenly go 
missing. Although, I am not familiar with the rules that define what part of 
the API falls under https://www.python.org/dev/peps/pep-0497/

--

___
Python tracker 

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



[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-10 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 4d532d3f8f7970493442d7c217220f60312f92e1 by Miss Islington (bot) 
in branch '3.9':
bpo-43558: Add note about base class initialization to dataclasses doc 
(GH-25967) (GH-26019)
https://github.com/python/cpython/commit/4d532d3f8f7970493442d7c217220f60312f92e1


--

___
Python tracker 

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



[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-10 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset f47305aa1fa41c38f744e9a16ae33b74c6fd45e7 by Miss Islington (bot) 
in branch '3.10':
bpo-43558: Add note about base class initialization to dataclasses doc 
(GH-25967) (GH-26018)
https://github.com/python/cpython/commit/f47305aa1fa41c38f744e9a16ae33b74c6fd45e7


--

___
Python tracker 

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



[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks, @dhoekstra!

--
resolution:  -> fixed
stage: patch review -> 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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Tests that exercise this branch:
Lib/sqlite3/test/dbapi.py: test_in_transaction
Lib/sqlite3/test/dbapi.py: test_last_row_id_insert_o_r
Lib/sqlite3/test/dbapi.py: 
test_on_conflict_abort_raises_with_explicit_transactions
Lib/sqlite3/test/dbapi.py: test_on_conflict_abort_raises_without_transactions
Lib/sqlite3/test/dbapi.py: test_on_conflict_rollback_with_explicit_transaction
Lib/sqlite3/test/dbapi.py: test_on_conflict_rollback_without_transaction
Lib/sqlite3/test/types.py: test_cursor_description_cte
Lib/sqlite3/test/types.py: test_bool
Lib/sqlite3/test/types.py: test_error_in_conform
Lib/sqlite3/test/userfunctions.py: test_aggr_check_aggr_sum
Lib/sqlite3/test/regression.py: test_column_name_with_spaces
Lib/sqlite3/test/regression.py: test_statement_reset

--

___
Python tracker 

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



[issue41324] Add a minimal decimal capsule API

2021-05-10 Thread Daniele Varrazzo


Daniele Varrazzo  added the comment:

FYI, will try to use this API in psycopg3, which supports the PostgreSQL 
decimal binary format. Thank you very much: it seems exactly what needed.

Binary conversion with Python Decimal currently has disappointing performances 
and is slower than the text format conversion. This is likely caused by the use 
of Decimal.as_tuple(), which creates tuples for the return value and the digits 
and requires Python calls to access their values.

I have considered using libmpdec directly: personally I wouldn't be opposed to 
that, but the additional dependency on libmpdec-dev would earn the project no 
new fan :\

Ref. https://github.com/psycopg/psycopg3/issues/54

--

___
Python tracker 

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



[issue41324] Add a minimal decimal capsule API

2021-05-10 Thread Daniele Varrazzo


Daniele Varrazzo  added the comment:

Ah, just noticed that this has been now reverted. Oh well, I'll see what to do 
then :(

--

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Adding fprintf's in pysqlite_statement_reset:
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
--- a/Modules/_sqlite/statement.c
+++ b/Modules/_sqlite/statement.c
@@ -347,19 +363,23 @@
 int pysqlite_statement_reset(pysqlite_Statement* self)
 {
 int rc;
 
 rc = SQLITE_OK;
 
 if (self->in_use && self->st) {
 Py_BEGIN_ALLOW_THREADS
 rc = sqlite3_reset(self->st);
+fprintf(stderr, "sqlite3_reset(stmt=%p) => %d: %s\n",
+self->st, rc, sqlite3_errstr(rc));
 Py_END_ALLOW_THREADS
 
 if (rc == SQLITE_OK) {
 self->in_use = 0;
 }
+} else {
+fprintf(stderr, "sqlite3_reset => noop\n");
 }
 
 return rc;
 }
 

In Modules/_sqlite/cursor.c, I've also added a fprintf(stderr, "SECONDRESET: 
"); before the code in question.


$ ./python.exe -m test test_sqlite  2> log.txt
$ cat log.txt | grep -A1 -B1 SECONDRESET
sqlite3_reset(stmt=0x7fc360177e98) => 0: not an error
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset(stmt=0x7fc3a005f9e8) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc3a005ebd8) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc3a005f538) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc3a005f9e8) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc3a005f538) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc3a005f9e8) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc35000fe98) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc3500107f8) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc350010348) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc3500107f8) => 0: not an error
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset(stmt=0x7fc350010348) => 0: not an error
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset(stmt=0x7fc3700287f8) => 0: not an error
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop

--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop
sqlite3_reset => noop
--
--
sqlite3_reset => noop
SECONDRESET: sqlite3_reset => noop

--

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

fprintf debugging patch added, for reference

--
Added file: https://bugs.python.org/file50032/fprintf.diff

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Complete fprintf log added, for reference.

--
Added file: https://bugs.python.org/file50033/log.txt

___
Python tracker 

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



[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Grep for SECONDRESET in log.txt to get the complete "API context".

As far as I can see, there is no harm in removing the redundant reset statement.

--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Miro Hrončok

Miro Hrončok  added the comment:

scikit-learn: https://bugzilla.redhat.com/show_bug.cgi?id=1958976

gcc: sklearn/cluster/_k_means_fast.c
In file included from 
/usr/lib64/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944,
 from 
/usr/lib64/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
 from 
/usr/lib64/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:4,
 from sklearn/cluster/_k_means_fast.c:635:
/usr/lib64/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2:
 warning: #warning "Using deprecated NumPy API, disable it with " "#define 
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
  |  ^~~
sklearn/cluster/_k_means_fast.c: In function ‘__Pyx_call_return_trace_func’:
sklearn/cluster/_k_means_fast.c:1596:15: error: ‘PyThreadState’ {aka ‘struct 
_ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
 1596 |   tstate->use_tracing = 0;
  |   ^~~
  |   tracing
sklearn/cluster/_k_means_fast.c:1602:15: error: ‘PyThreadState’ {aka ‘struct 
_ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
 1602 |   tstate->use_tracing = 1;
  |   ^~~
  |   tracing



The usage comes from 
https://github.com/cython/cython/blob/master/Cython/Utility/Profile.c

--

___
Python tracker 

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



[issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction

2021-05-10 Thread Ma Lin


Ma Lin  added the comment:

Erlend, please take a look at this bug.

--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Petr Viktorin


Petr Viktorin  added the comment:

PEP 0497 is rejected; the active one is PEP 387, which says "backwards 
incompatibility" means preexisting code ceases to comparatively function after 
a change.
So, this does look like a backwards-incompatible change.

Unfortunately, not all of the C API is documented, so unless it's explicitly 
marked private, people will use it :(

--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Mark Shannon


Mark Shannon  added the comment:

But what does "use it" mean?
What does setting `tstate->use_tracing = 1` do?
There is no documented behavior, so how do we know what assumptions people are 
making about what happens when they set some field to 1?

As I said, we could keep the field and ignore it, but that seems worse.

--

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread William Pickard


William Pickard  added the comment:

I'm quite familiar with MSVC's command line and I'm quite confused on what you 
mean "the above commands are specific to 32-bit Python"

"/LD" is available for both 32-bit and 64-bit compilations, it implies "/MT" to 
the compiler and "/DLL" to the linker.

"/I" is available for both 32-bit and 64-bit compilations.

Python's lib files are named exactly the same between 32-bit and 64-bit 
versions.

The only thing platform specific in MSVC is the compiler. Visual Studio's C/C++ 
build tools ships with 4 variants of MSVC:

2 32-bit versions, 1 for targeting 32-bit and the other for targeting 64-bit 
(32-bit native, 32-bit cross compile to 64-bit)

The same is true for the 64-bit versions (64-bit native and 64-bit cross 
compile to 32-bit)

Internally, these are known as: x86, x86_x64, x64, x64_x86

--
nosy: +WildCard65

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread Zachary Ware


Zachary Ware  added the comment:

Since the removal of Rietveld from the tracker, it's not easy to review a patch 
as a patch file.  Please open a PR instead.

As I said on the first PR, and as William says above, I don't see any 
indication that your assertion that some commands are 32-bit only is true.  
Please provide some evidence for your claim.

--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I don't think the PEP meant to restrict individual struct member such as this.  
For example, we were able to switch from byte code to word code without 
violating the intended rules.  Consider asking Brett and Benjamin for 
clarification.  I would think that if a new function were introduced to provide 
a reliable way to determine whether tracing was enabled, that would suffice for 
external packages to have a minimally disruptive migration path.

--
nosy: +rhettinger

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Steve Dower


Change by Steve Dower :


--
nosy:  -steve.dower

___
Python tracker 

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



[issue44076] issue with list in Python 3.8.5

2021-05-10 Thread Zachary Ware


Zachary Ware  added the comment:

Given that 3.8 is in security-fix-only mode and that it's not clear that this 
is actually a Python bug, I'm closing the issue.

If you can reproduce the issue in Python 3.9 with a short script, do please 
open a new issue (or reopen this one) with the reproducer and a description of 
what's going wrong.  In the meantime, please see either the 
python-l...@python.org mailing list or the Users category of discuss.python.org 
for community support for using Tkinter.

--
components: +Tkinter
nosy: +steve.dower
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: enhancement -> behavior

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread Steve Dower


Steve Dower  added the comment:

I still don't think the patch goes anywhere near far enough to be useful.

Most likely we should preface that section with a "we recommend using a 
third-party build backend for your package, such as ... and refer to 
packaging.python.org for up to date suggestions" and then the rest of the 
section shows literally the build steps to compile an extension module (so that 
build backend authors have a reference).

We should *not* have a section on using setuptools, or if we do, it should 
consist entirely of a link to the latest setuptools documentation. Their 
interface is not tied to our release schedule, and could change at any time, 
invalidating our docs (which is a *good* thing, provided we haven't documented 
them).

--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-05-10 Thread STINNER Victor


STINNER Victor  added the comment:

I understand that some projects manually call the profile and/or trace 
functions, and temporarily set use_tracing 0 while calling these functions.

Some projects restore use_tracing to the correct value (compute the efficient 
value), some projects simply set use_tracing to 1.

I see 3 use cases:

* disable tracing temporarily (set use_tracing to 0)
* reenable tracing (compute use_tracing to the correct value)
* check if tracing is used (get use_tracing)

We can add 3 functions:

* PyThreadState_DisableTracing()
* PyThreadState_EnableTracing()
* PyThreadState_GetTracing()

PyThreadState_EnableTracing(tstate) would do something like:

tstate->cframe->use_tracing = (tstate->c_tracefunc || 
tstate->c_profilefunc);

If we added these functions, I can then add an implementation for Python 3.9 
and older to my https://github.com/pythoncapi/pythoncapi_compat project for 
backward compatibility.

The problem is that some projects also increase temporarily ts->tracing. Since 
I would like to make PyThreadState opaque, I would prefer to hide this access 
behind a function call as well. Maybe we need an API to call profile and/or 
trace functions?

--

According to the bugzilla compiler errors:

> greenlet: https://bugzilla.redhat.com/show_bug.cgi?id=1957784

It has already been fixed:

* 
https://github.com/python-greenlet/greenlet/commit/6c5f0963eb00eeb1cfb337c6edbd3efaf7d8eacc
* 
https://github.com/python-greenlet/greenlet/commit/352b974447bb489cb2778e07c3832d0cc60e0e4a

It uses:

* "tstate->use_tracing = 0;"
* "tstate->use_tracing = (tstate->tracing <= 0 && (...)"

> dipy: https://bugzilla.redhat.com/show_bug.cgi?id=1958203

It uses:

* "tstate->use_tracing = 0;"
* "tstate->use_tracing = 1;"
* "tstate->use_tracing = (tstate->c_profilefunc || (...)"
* "return tstate->use_tracing && retval;"
* "if (tstate->use_tracing) {"

> yappi: https://bugzilla.redhat.com/show_bug.cgi?id=1958896

* "ts->use_tracing = 1;"
* "ts->use_tracing = 0;"

> smartcols: https://bugzilla.redhat.com/show_bug.cgi?id=1958938

It uses "tstate->use_tracing = 0;".

> scikit-learn: https://bugzilla.redhat.com/show_bug.cgi?id=1958976

It uses:

* "tstate->use_tracing = 0;"
* "tstate->use_tracing = 1;"

> The usage comes from 
> https://github.com/cython/cython/blob/master/Cython/Utility/Profile.c

Simplified code:

--
static int __Pyx_TraceSetupAndCall(...)
{
...
tstate->tracing++;
tstate->use_tracing = 0;

if (tstate->c_tracefunc)
retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, 
NULL) == 0;
if (retval && tstate->c_profilefunc)
retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, 
PyTrace_CALL, NULL) == 0;

tstate->use_tracing = (tstate->c_profilefunc ||
   (CYTHON_TRACE && tstate->c_tracefunc));
tstate->tracing--;
...
}

  int __Pyx_use_tracing = 0;

  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)
 \
  if (nogil) {  
 \
  if (CYTHON_TRACE_NOGIL) { 
 \
  PyThreadState *tstate;
 \
  PyGILState_STATE state = PyGILState_Ensure(); 
 \
  tstate = __Pyx_PyThreadState_Current; 
 \
  if (unlikely(tstate->use_tracing) && !tstate->tracing &&  
 \
  (tstate->c_profilefunc || (CYTHON_TRACE && 
tstate->c_tracefunc))) {\
  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, 
&$frame_cname, tstate, funcname, srcfile, firstlineno);  \
  } 
 \
  PyGILState_Release(state);
 \
  if (unlikely(__Pyx_use_tracing < 0)) goto_error;  
 \
  } 
 \
  } else {  
 \
  PyThreadState* tstate = PyThreadState_GET();  
 \
  if (unlikely(tstate->use_tracing) && !tstate->tracing &&  
 \
  (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) 
{\
  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, 
&$frame_cname, tstate, funcname, srcfile, firstlineno);  \
  if (unlikely(__Pyx_use_tracing < 0)) goto_error;  
 \
  } 
 \
  }
--

--

___
Python tracker 


[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-05-10 Thread STINNER Victor


Change by STINNER Victor :


--
title: The DISPATCH() macro is not as efficient as it could be. -> The 
DISPATCH() macro is not as efficient as it could be (move 
PyThreadState.use_tracing)
versions: +Python 3.10

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-05-10 Thread STINNER Victor


Change by STINNER Victor :


--
components: +C API, Interpreter Core

___
Python tracker 

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



[issue44092] [sqlite3] consider removing special rollback handling

2021-05-10 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Quoting pysqlite commit 5a009ed message 
(https://github.com/ghaering/pysqlite/commit/5a009ed6fb2e90b952438f5786f93cd1e8ac8722):
"Implemented a function that resets all statements in the connection's
  statement cache. After calling this function it is always possible to
  rollback a transaction or close a connection."

The commit is from 2005-12-09. SQLite 3.7.11 wasn't released until 2012, so in 
2005 any pending statements would block a rollback. I'm guessing commit 5a009ed 
addressed that issue.

--

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Zachary:
> As I said on the first PR, and as William says above, I don't see any 
> indication that your assertion that some commands are 32-bit only is true.  
> Please provide some evidence for your claim.

cl.exe by default points to the 32-bit cl.exe not the 64-bit cl.exe. And also 
the library used by cl.exe by default is also 32-bit. Therefore there seems to 
be a linker issue. And I've tested that. It's true.

Steve:
> Most likely we should preface that section with a "we recommend using a 
> third-party build backend for your package, such as ... and refer to 
> packaging.python.org for up to date suggestions" and then the rest of the 
> section shows literally the build steps to compile an extension module (so 
> that build backend authors have a reference).
We should *not* have a section on using setuptools, or if we do, it should 
consist entirely of a link to the latest setuptools documentation. Their 
interface is not tied to our release schedule, and could change at any time, 
invalidating our docs (which is a *good* thing, provided we haven't documented 
them).

I'll remove the changes in Building C and C++ Extensions. I'll also make sure 
no changes are referencing setuptools. I'll be opening PR very soon.

--

___
Python tracker 

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



[issue44096] Bad clang detection in configure script

2021-05-10 Thread Ned Deily


Change by Ned Deily :


--
assignee:  -> ned.deily
nosy: +ned.deily

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread William Pickard


William Pickard  added the comment:

Then it appears you're using a version of the compiler that is built for 
building 32-bit exes/dlls, you need to use the x64 version.

For this you need to start either the x86 Cross Tools console or the x64 native 
console (VS 2019) or use vcvarsall.cmd/Enter-VsDevShell (PowerShell)

--

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

I'm aware of that. But anyway I'm removing it since there are ways to overcome 
it.

--

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread William Pickard


William Pickard  added the comment:

Correction: You can use either VsDevCmd.bat/Enter-VsDevShell on VS versions 
that provide them (2017 and 2019 are known to include it), but to get the x64 
tools you need to pass command line arguments (They default to x86 native 
tools).

Otherwise you must use either vcvarsall.cmd and pass the appropriate command 
line arguments or vcvarsx86_amd64.bat/vcvars64.bat

--

___
Python tracker 

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



[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

In the 3.10 docs (but not 3.11 or 3.9) I see an extra copy of the table of 
contents at the top of the page. Attached a screenshot.

--
assignee: docs@python
components: Documentation
files: Screen Shot 2021-05-10 at 9.11.51 AM.png
messages: 393416
nosy: Jelle Zijlstra, docs@python, mdk
priority: normal
severity: normal
status: open
title: Python 3.10 docs are visually broken
Added file: https://bugs.python.org/file50034/Screen Shot 2021-05-10 at 9.11.51 
AM.png

___
Python tracker 

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



[issue31604] unittest.TestLoader().loadTestsFromTestCase(...) fails when adding test cases with the expectedFailure decorator

2021-05-10 Thread Irit Katriel


Irit Katriel  added the comment:

I can't reproduce the issue on 3.10, I believe it was fixed by this: 

https://github.com/python/cpython/commit/c9b3ef2df06818f055e555c1d23e3ff2d5bf2d74

in particular:

- def expectedFailure(func):
- @functools.wraps(func)
- def wrapper(*args, **kwargs):
- try:
- func(*args, **kwargs)
- except Exception:
- raise _ExpectedFailure(sys.exc_info())
- raise _UnexpectedSuccess
- return wrapper
+ def expectedFailure(test_item):
+ test_item.__unittest_expecting_failure__ = True
+ return test_item


2.7 won't be fixed, so closing.

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue44096] Bad clang detection in configure script

2021-05-10 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the report. Let’s hold off on writing a patch for now until I’ve had 
a chance to investigate the multiple issues here. That should be a few days 
after some imminent PyCon events.

--

___
Python tracker 

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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-05-10 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


--
pull_requests: +24670
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/26020

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2021-05-10 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +24671
pull_request: https://github.com/python/cpython/pull/26021

___
Python tracker 

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



[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2021-05-10 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The logic for bailing out to a slow copy is currently:

https://github.com/python/cpython/blob/main/Lib/shutil.py#L158

that condition appears to not be happening in Alexei's test.  Suggesting that 
either at least one sendfile call succeeded and thus offset is non-zero or the 
lseek failed.

run that test under pdb and walk thru the code, or under strace to look at the 
syscalls and find out.

The question seems to be is if it should be okay to _GiveUpOnFastCopy after a 
partial (incomplete) copy has already occurred via sendfile.

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

That's odd. What do you think is causing this? Python's 3.10 docs were fine 
even yesterday. Why is it suddenly broken? Can it be related to Sphinx version 
or some other bug?

--
nosy: +shreyanavigyan

___
Python tracker 

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



[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

> Can it be related to Sphinx version

That's a good guess since Sphinx 4 was released on May 8. I'm not sure if 
Python would immediately pick that up though.

--

___
Python tracker 

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



[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Zachary Ware


Zachary Ware  added the comment:

This is likely an artifact of the new version of the theme and browser caching 
issues; try a full reload (Ctrl + Shift + R in Firefox).  See also 
https://github.com/python/python-docs-theme/issues/78; I'll close this as a 
duplicate of that issue.

--
nosy: +zach.ware
resolution:  -> duplicate
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



[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks, hard refresh does fix it.

--

___
Python tracker 

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



[issue44103] Python 3.10 docs are visually broken

2021-05-10 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Yes, hard refresh fixes it. Thanks a lot.

--

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-05-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+1 for Victor's suggestions.  It provides a reasonable way forward without 
locking in eval-loop implementation details that weren't intended to be public 
and frozen in time.

--

___
Python tracker 

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



[issue44104] http.cookies.CookieError: Illegal key

2021-05-10 Thread ra1nb0w


New submission from ra1nb0w :

The issue arises when there are multiple web applications using the same 
hostname and a "bad" cookie is stored; the first one (ex. tvheadend) sets a 
cookie like 'ys-api/mpegts/service=blabla' and the second is a python one that 
crash with the following:

May 10 18:56:37 hos openwebrx[4575]: Exception happened during processing of 
request from ('192.168.178.203', 56994)
May 10 18:56:37 hos openwebrx[4575]: Traceback (most recent call last):
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/socketserver.py", line 650, in process_request_thread
May 10 18:56:37 hos openwebrx[4575]: self.finish_request(request, 
client_address)
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/socketserver.py", line 360, in finish_request
May 10 18:56:37 hos openwebrx[4575]: self.RequestHandlerClass(request, 
client_address, self)
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3/dist-packages/owrx/http.py", line 40, in __init__
May 10 18:56:37 hos openwebrx[4575]: super().__init__(request, 
client_address, server)
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/socketserver.py", line 720, in __init__
May 10 18:56:37 hos openwebrx[4575]: self.handle()
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/http/server.py", line 426, in handle
May 10 18:56:37 hos openwebrx[4575]: self.handle_one_request()
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
May 10 18:56:37 hos openwebrx[4575]: method()
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3/dist-packages/owrx/http.py", line 46, in do_GET
May 10 18:56:37 hos openwebrx[4575]: self.router.route(self, 
self._build_request("GET"))
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3/dist-packages/owrx/http.py", line 55, in _build_request
May 10 18:56:37 hos openwebrx[4575]: return Request(self.path, method, 
self.headers)
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3/dist-packages/owrx/http.py", line 68, in __init__
May 10 18:56:37 hos openwebrx[4575]: self.cookies.load(headers["Cookie"])
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/http/cookies.py", line 529, in load
May 10 18:56:37 hos openwebrx[4575]: self.__parse_string(rawdata)
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/http/cookies.py", line 593, in __parse_string
May 10 18:56:37 hos openwebrx[4575]: self.__set(key, rval, cval)
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/http/cookies.py", line 485, in __set
May 10 18:56:37 hos openwebrx[4575]: M.set(key, real_value, coded_value)
May 10 18:56:37 hos openwebrx[4575]:   File 
"/usr/lib/python3.7/http/cookies.py", line 352, in set
May 10 18:56:37 hos openwebrx[4575]: raise CookieError('Illegal key %r' % 
(key,))
May 10 18:56:37 hos openwebrx[4575]: http.cookies.CookieError: Illegal key 
'ys-api/mpegts/service'

Is there a way to avoid this (just a warning) or the only solution is to filter 
the load(headers["Cookie"]) input?

thank you

--
messages: 393426
nosy: ra1nb0w
priority: normal
severity: normal
status: open
title: http.cookies.CookieError: Illegal key
versions: Python 3.7

___
Python tracker 

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



[issue44074] patchcheck checks against branch "master" not "main"

2021-05-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +24672
pull_request: https://github.com/python/cpython/pull/26022

___
Python tracker 

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



[issue44074] patchcheck checks against branch "master" not "main"

2021-05-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24673
pull_request: https://github.com/python/cpython/pull/26023

___
Python tracker 

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



[issue44074] patchcheck checks against branch "master" not "main"

2021-05-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> 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



[issue44074] patchcheck checks against branch "master" not "main"

2021-05-10 Thread miss-islington


miss-islington  added the comment:


New changeset fbd9b9939cffda4936a986bc729833c69b61f4cb by Miss Islington (bot) 
in branch '3.9':
bpo-44074: let patchcheck infer the base branch name (GH-25991)
https://github.com/python/cpython/commit/fbd9b9939cffda4936a986bc729833c69b61f4cb


--

___
Python tracker 

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



[issue44074] patchcheck checks against branch "master" not "main"

2021-05-10 Thread miss-islington


miss-islington  added the comment:


New changeset 4cc836983ecc643be776026049bd1bcc826c7a0e by Miss Islington (bot) 
in branch '3.10':
bpo-44074: let patchcheck infer the base branch name (GH-25991)
https://github.com/python/cpython/commit/4cc836983ecc643be776026049bd1bcc826c7a0e


--

___
Python tracker 

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



[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2021-05-10 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

> The question seems to be is if it should be okay to _GiveUpOnFastCopy after a 
> partial (incomplete) copy has already occurred via sendfile.

I think it should not. For posterity: my rationale for introducing 
_USE_CP_SENDFILE was to allow monkey patching for corner cases such as this one 
(see also bpo-36610 / GH-13675), but expose it as a private name because I 
expected them to be rare and likely up to a broken underlying implementation, 
as it appears this is the case. FWIW, I deem _USE_CP_SENDFILE usage in 
production code as legitimate, and as such it should stay private but never be 
removed.

--
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



  1   2   >