[issue41735] Thread locks in zlib module may go wrong in rare case

2020-09-06 Thread Ma Lin


Change by Ma Lin :


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

___
Python tracker 

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



[issue41735] Thread locks in zlib module may go wrong in rare case

2020-09-06 Thread Ma Lin


New submission from Ma Lin :

The code in zlib module:

self->zst.next_in = data->buf;  // set next_in
...
ENTER_ZLIB(self);   // acquire thread lock

`self->zst` is a `z_stream` struct defined in zlib, used to record states of a 
compress/decompress stream:

typedef struct z_stream_s {
Bytef*next_in;  /* next input byte */
uInt avail_in;  /* number of bytes available at next_in */
uLongtotal_in;  /* total number of input bytes read so far */

Bytef*next_out; /* next output byte will go here */
uInt avail_out; /* remaining free space at next_out */
uLongtotal_out; /* total number of bytes output so far */

... // Other states
} z_stream;

Setting `next_in` before acquiring the thread lock may mix up 
compress/decompress state in other threads.

Moreover, modify `ENTER_ZLIB` macro, don't release the GIL when the thread lock 
can be acquired immediately. This behavior is the same as the bz2/lzma modules.

--
components: Library (Lib)
messages: 376473
nosy: malin
priority: normal
severity: normal
status: open
title: Thread locks in zlib module may go wrong in rare case
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38306] High level API for loop.run_in_executor(None, ...)?

2020-09-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

Really closing.

--
nosy: +gvanrossum
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



[issue41729] test_winconsoleio fails and hangs on Windows

2020-09-06 Thread Eryk Sun

Eryk Sun  added the comment:

> ÄÄ^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z

I don't know why Steve made write_input (PC/_testconsole.c) set wRepeatCount in 
each KeyEvent record to 10. Maybe it was a typo. Previous console 
implementations have ignored the repeat count, so it wasn't an issue.

test_ctrl_z checks (1) that reading a non-ASCII character works when split 
across two reads and (2) that Ctrl+Z (0x1A) as the first character of a read is 
handled as EOF, regardless of where it occurs on the line as long as it's the 
first character in the buffer. The latter has to be tested because 
_WindowsConsoleIO has to manually implement the way that WinAPI ReadFile 
handles Ctrl+Z, a behavior that WinAPI ReadConsoleW does not itself implement.

--

___
Python tracker 

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



[issue41513] High accuracy math.hypot()

2020-09-06 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 67c998de24985b36498b0fdac68d1beceb43aba7 by Raymond Hettinger in 
branch 'master':
bpo-41513: Expand comments and add references for a better understanding 
(GH-22123)
https://github.com/python/cpython/commit/67c998de24985b36498b0fdac68d1beceb43aba7


--

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-09-06 Thread mohamed koubaa


mohamed koubaa  added the comment:

Sounds like there needs to be some python-wide global state that perhaps the 
signal module wraps rather than owns.  I could try to prototype it if you agree

--
nosy: +koubaa

___
Python tracker 

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



[issue41513] High accuracy math.hypot()

2020-09-06 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +21207
pull_request: https://github.com/python/cpython/pull/22123

___
Python tracker 

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



[issue41513] High accuracy math.hypot()

2020-09-06 Thread Raymond Hettinger


Change by Raymond Hettinger :


Added file: https://bugs.python.org/file49448/test_hypot_commutativity.py

___
Python tracker 

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



[issue41513] High accuracy math.hypot()

2020-09-06 Thread Raymond Hettinger


Change by Raymond Hettinger :


Removed file: https://bugs.python.org/file49398/test_hypot_commutativity.py

___
Python tracker 

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



[issue41734] Refactor b32{encode,decode} tests

2020-09-06 Thread Filipe Laíns

Change by Filipe Laíns :


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

___
Python tracker 

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



[issue41734] Refactor b32{encode,decode} tests

2020-09-06 Thread Filipe Laíns

New submission from Filipe Laíns :

As discussed in https://github.com/python/cpython/pull/20441, these tests could 
be improved by using the same format of the b32hex{encode,decode} tests.

--
components: Tests
messages: 376468
nosy: FFY00, p-ganssle
priority: normal
severity: normal
status: open
title: Refactor b32{encode,decode} tests
type: enhancement

___
Python tracker 

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



[issue23163] pdb docs need to contain a statement on threads/multithreaded debugging

2020-09-06 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

See also https://bugs.python.org/issue41571

--
nosy: +pablogsal

___
Python tracker 

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



Re: Replacement for pygtk?

2020-09-06 Thread Grant Edwards
On 2020-09-06, Michael Torrie  wrote:
> On 9/4/20 3:24 PM, Grant Edwards wrote:
>> I assume that difference is because pygtk was hand-written and gi is
>> built auto-magically using SWIG or something like that?
>
> Essentially, yes.  Although pygobject does not use a tool like swig to
> generate static wrappers. Rather it uses the GTK introspection API to
> ask gobject's for their methods and attributes, and then marshalls and
> calls them at runtime.

I was wondering about that.  Some of the error messages you get when
you mistype something hinted that the "wrapping" is being done
on-the-fly.

> So you can use pygobject with any GObject-based binary library, not
> just GTK+.  Hope that makes sense.

Yes, I think so. I can see how it would be far less work that
maintaining something like pygtk.

--
Grant

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23163] pdb docs need to contain a statement on threads/multithreaded debugging

2020-09-06 Thread Bar Harel


Change by Bar Harel :


--
nosy: +bar.harel

___
Python tracker 

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



[issue41571] Implement thread-related commands in pdb

2020-09-06 Thread Bar Harel


Change by Bar Harel :


--
nosy: +bar.harel

___
Python tracker 

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



PyDev 8.0 Released

2020-09-06 Thread Fabio Zadrozny
 PyDev 8.0 Release Highlights

   -

   *MyPy*
   - Make sure that only one MyPy is running at a given time (to prevent
  cache corruptions).
  - Properly report MyPy messages that only have a line number. (
  *#PyDev-1091*)
  - MyPy integration now also shows notes for a message. (*#PyDev-1088*)
   -

   *Debugger* (updated to pydevd 2.0.0)
   - The frame evaluation mode (which adds programmatic breakpoints by
  rewriting bytecode) was redone (it had a critical issue which
could make it
  skip breakpoints).
  - Fixed issue collecting try..except information.
  - Fixed issue evaluating numpy array with unexpected dimension.
   -

   *Type Inference*
   - Option to create a method at a given class properly considers
  type-hinting. (*#PyDev-1092*)
  - Support code-completion for Optional[]. (*#PyDev-1089*)
  - Properly handle type information when given as a string. (
  *#PyDev-1082*, *#PyDev-1087*)
  - Fixed issue where line/col was not forwarded properly in go to
  definition. (*#PyDev-1075*)
  - Typing info should have priority when available. (*#PyDev-1079*)
  - Properly get completions considering function annotation. (
  *#PyDev-1078*)
   -

   *Test running*
   - Fixed issue running tests which override *address* with nose. (
  *#PYDev-1095*)
  - Fixed issue where test import/export didn't deal well with binary
  chars that were collected from the test. (*#PyDev-1067*)
   -

   *Others*
   - When finding a file in a project on Windows consider paths as case
  insensitive.
  - .mypy_cache and .pytest_cache contents are now marked as derived
  (so they can be filtered out in searches).
  - Fixed case where auto-import could be added to wrong location. (
  *#PyDev-1085*)
  - Occurrence was not found in type hint return. (*#PyDev-1076*)
  - Find references not working for constant depending how it's used. (
  *#PyDev-1083*)
  - Backported fix to properly parse raw f-string in Python 3.6. (
  *#PyDev-991*)
  - Code completion inside f-strings. (*#PyDev-1081*)

About PyDev

PyDev is an open-source Python IDE on top of Eclipse for Python, Jython and
IronPython development, now also available for Python on Visual Studio Code.

It comes with goodies such as code completion, syntax highlighting, syntax
analysis, code analysis, refactor, debug, interactive console, etc.

It is also available as a standalone through LiClipse with goodies such as
multiple cursors, theming and support for many other languages, such as
Django Templates, Jinja2, Html, JavaScript, etc.

Links:

PyDev: http://pydev.org
PyDev Blog: http://pydev.blogspot.com
PyDev on VSCode: http://pydev.org/vscode
LiClipse: http://www.liclipse.com
PyVmMonitor - Python Profiler: http://www.pyvmmonitor.com/

Cheers,

Fabio Zadrozny
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


PyDev 8.0 Released

2020-09-06 Thread Fabio Zadrozny
 PyDev 8.0 Release Highlights

   -

   *MyPy*
   - Make sure that only one MyPy is running at a given time (to prevent
  cache corruptions).
  - Properly report MyPy messages that only have a line number. (
  *#PyDev-1091*)
  - MyPy integration now also shows notes for a message. (*#PyDev-1088*)
   -

   *Debugger* (updated to pydevd 2.0.0)
   - The frame evaluation mode (which adds programmatic breakpoints by
  rewriting bytecode) was redone (it had a critical issue which
could make it
  skip breakpoints).
  - Fixed issue collecting try..except information.
  - Fixed issue evaluating numpy array with unexpected dimension.
   -

   *Type Inference*
   - Option to create a method at a given class properly considers
  type-hinting. (*#PyDev-1092*)
  - Support code-completion for Optional[]. (*#PyDev-1089*)
  - Properly handle type information when given as a string. (
  *#PyDev-1082*, *#PyDev-1087*)
  - Fixed issue where line/col was not forwarded properly in go to
  definition. (*#PyDev-1075*)
  - Typing info should have priority when available. (*#PyDev-1079*)
  - Properly get completions considering function annotation. (
  *#PyDev-1078*)
   -

   *Test running*
   - Fixed issue running tests which override *address* with nose. (
  *#PYDev-1095*)
  - Fixed issue where test import/export didn't deal well with binary
  chars that were collected from the test. (*#PyDev-1067*)
   -

   *Others*
   - When finding a file in a project on Windows consider paths as case
  insensitive.
  - .mypy_cache and .pytest_cache contents are now marked as derived
  (so they can be filtered out in searches).
  - Fixed case where auto-import could be added to wrong location. (
  *#PyDev-1085*)
  - Occurrence was not found in type hint return. (*#PyDev-1076*)
  - Find references not working for constant depending how it's used. (
  *#PyDev-1083*)
  - Backported fix to properly parse raw f-string in Python 3.6. (
  *#PyDev-991*)
  - Code completion inside f-strings. (*#PyDev-1081*)

About PyDev

PyDev is an open-source Python IDE on top of Eclipse for Python, Jython and
IronPython development, now also available for Python on Visual Studio Code.

It comes with goodies such as code completion, syntax highlighting, syntax
analysis, code analysis, refactor, debug, interactive console, etc.

It is also available as a standalone through LiClipse with goodies such as
multiple cursors, theming and support for many other languages, such as
Django Templates, Jinja2, Html, JavaScript, etc.

Links:

PyDev: http://pydev.org
PyDev Blog: http://pydev.blogspot.com
PyDev on VSCode: http://pydev.org/vscode
LiClipse: http://www.liclipse.com
PyVmMonitor - Python Profiler: http://www.pyvmmonitor.com/

Cheers,

Fabio Zadrozny
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41672] imaplib: wrong return type documented

2020-09-06 Thread Norbert Cyran


Norbert Cyran  added the comment:

@ericsmith

Sure, I can create a PR and link it here when I'm done.

--

___
Python tracker 

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



[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2020-09-06 Thread Irit Katriel


Irit Katriel  added the comment:

This issue only impacts container objects where  the len(repr(o)) is less than 
width. If the length is greater than width, containers are handled by a 
different code path which is covered by a unit test and works correctly.


For this case, indeed it works in Python 2 but not in Python 3. The 
PrettyPrinter._format code has been refactored quite a lot with respect to 
handling of containers.

In both Python 2 and 3 this happens:

PrettyPrinter.pprint([10]) calls
PrettyPrinter._format([10])  which calls
PrettyPrinter._repr([10]) which calls
MyPrettyPrinter.format([10]) which calls
PrettyPrinter.format([10]) which calls
_safe_repr([10])  which calls
_safe_repr(10)
returns 10
returns [10]
returns [10]
returns [10]
returns [10]

But then they diverge - in Python 3 the [10] is returned as the result, but in 
Python 2 there is another piece of code (starting here 
https://github.com/python/cpython/blob/fdda200195f9747e411d3491aae0806bc1fcd919/Lib/pprint.py#L179)
 which overrides this result and recalculates the representation for 
containers. In our case it does:

since issubclass(type([10]), list):
# ignore the [10] calculated above, now call
self._format(10) which calls
PrettyPrinter._repr(10) which calls
MyPrettyPrinter.format(10)
returns 0xa
returns 0xa
returns 0xa
returns [0xa]


This explains the difference between Python 2 and 3. 

As to why the first calculation returns [10] and not [0xa]:
This is because _safe_repr is defined at module scope, so once it is called we 
are no longer on the PrettyPrinter instance, and the format() override is no 
longer accessible.  When _safe_repr needs to recurse on container contents, it 
calls itself.


I think the solution is to make _safe_repr a method of PrettyPrinter, and make 
it call self.format() when it needs to recurse. The default self.format() just 
calls _safe_repr, so when there is no override the result is the same.

The PR's diff looks substantial, but that's mostly due to the indentation of 
_safe_repr code. To make it easier to review, I split it into several commits, 
where the indentation is done in one commit as a noop change. The other commits 
have much smaller diffs.

--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python 
3.7

___
Python tracker 

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



[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2020-09-06 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +patch
nosy: +iritkatriel
nosy_count: 7.0 -> 8.0
pull_requests: +21205
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22120

___
Python tracker 

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



PyCon India 2020: The Schedule Outline

2020-09-06 Thread Sayan Chowdhury
Hi everyone,

CFP & Review

The CFP Working Group (WG) did a great job of reaching out to speakers
and achieving a good number of talk proposals. The Review Panel WG
volunteers worked parallelly to get the proposals as complete as
possible as per the guidelines we built before the Subject Matter
Expert (SME) aka Talk Reviewers started the process. Thanks to the
whole Reviewers team for putting their thought and effort into each
talk.

As of today, based on the reviews of the proposals, the first set of
selected speakers has been created. The team will start reaching out
to all these speakers, to prepare the final list.

The date for the final schedule to be published still stands at 15th
September 2020.

Schedule Outline of PyCon India 2020


This year, since we have gone online, the number of talks and
registration outside India is substantially high. So, the team has
decided to start the event at noon and end at 8:00 PM IST. This will
help us to accommodate other timezones as well and not moving much
from our core time.

The schedule outline (the mentioned time is in IST):
12:00 - 12:10 - Opening Session of the day
12:15 - 13:15 - Keynote
13:20 - 13:50 - Talk Slot
13:55 - 14:25 - Talk Slot
14:30 - 15:20 - Break / Networking
15:20 - 15:50 - Talk Slot
15:55 - 16:25 - Talk Slot
16:30 - 17:30 - Keynote
17:30 - 17:50 - Break / Networking
17:50 - 18:20 - Talk Slot
18:25 - 18:55 - Talk Slot
19:00 - 20:00 - Keynote
20:00 - 20:05 - Closing session for the day
20:05 - 20:30 - Networking

The `Talk Slot`s are 30 min slot which would have talks, lightning
talks, and sponsored talks. This will be replicated for all the
stages, except for the
Keynote slots.

This year the team also plans to have 4 parallel tracks, and one track
dedicated for just *Advanced* talks. Once the schedule is prepared, an
update will be shared detail about how the talks will be placed across
the stages/ or sessions.

Though this schedule is tentative and what the whole team is
following, minor updates might be done to accommodate speakers or
sponsors.


---


Miscellaneous info
--

Tickets
---
The PyCon India 2020 tickets are open but we are selling out fast. So,
if you haven't booked the tickets, please head over to the website and
get your tickets.

We need your help
-
This year, we've been very highly active on Zulip[1]. As we move
closer to the event, we would like your support and help to make this
happen successfully. We have ample work where we need a volunteer, so
please join us on Zulip and ping on the main channel.

The Promotions WG needs a helping hand, so if you interested please
follow the instructions

Sponsorship
---
The Call for Sponsors[2] is open, and we've some good packages with
amazing benefits. You can visit the sponsorship page or write to us at
spon...@in.pycon.org, and we will revert.

Please share the ticket announcement to that it reaches more in the community.
https://twitter.com/pyconindia/status/1298222867935444992

[1] https://pyconindia.zulipchat.com/
[2] https://in.pycon.org/2020/sponsorship/

-- 
Sayan Chowdhury 
On behalf of PyCon India 2020 Team
https://in.pycon.org/2020/
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


Re: Uninstall problem

2020-09-06 Thread Mats Wichmann
On 9/6/20 6:24 AM, Luuk wrote:
> On 5-9-2020 19:40, Mats Wichmann wrote:
>> On 9/5/20 7:54 AM, f.le...@omnias.fr wrote:
>>> Hello,
>>>
>>>  
>>> I commit an error to install python because I chose python 3.8.5
>>> x32bytes
>>>
>>> So I wanted uninstalling it to install python 3.7.9 x64bytes
>>
>> why not 3.8.5, by the way?
>>
>>> But 3.8.5 version don't want uninstall !?!
>>
>> what does this mean?   uninstall should work like any uninstall on your
>> platform. in what way doesn't it want to uninstall?
>>
>>
>>> And so I have the twice in my computer now ! How can I do to
>>> uninstall 3.8.5
>>> ?
>>
>>
>> it doesn't hurt to have more than one.  If you're on Windows, and use
>> the Python Launcher, you can show all your installs, and use it to
>> select the one you want:
>>
>> py --list
>> py -3.7    # specifically pick 3.7
>> py -3.8-32   # pick 32-bit 3.8, if both 64-bit and 32-bit are installed
>> py -3-64  # pick latest 64-bit Py3
>>
>> The one reason you might be unhappy with both is that the Python
>> Launcher picks the highest numbered one as the default, so just
>>
>> py
>>
>> would get you 32-bit 3.8.   if both 64-bit and 32-bit of same version
>> are installed, the 64-bit one is preferred.
>>
> 
> D:\TEMP>python -V
> Python 3.8.5
> 
> D:\TEMP>py --list
> Installed Pythons found by py Launcher for Windows
>  -3.7-64 *
> 
> 
> Can you explain above?

Not sure what you're asking here?  The python launcher is a separate
program which keeps track of (and launches) your python.org Python
installations, intended to cut down on the amount of path fiddling you
otherwise have to do.  Because of where it's installed (your snip
below), it's always found.  However, the Microsoft Store version of
Python doesn't participate in this, as far as I've found in the past -
and this would seem to be borne out by your investigation.

> D:\TEMP>where py
> C:\Windows\py.exe
> 
> D:\TEMP>where python
> C:\Users\Luuk\AppData\Local\Microsoft\WindowsApps\python.exe
> 

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41733] ContextVar get value is unexpected

2020-09-06 Thread Jason Chen


New submission from Jason Chen :

import asyncio
from contextvars import *

var = ContextVar('VarTest', default=None)

def get_var(tag=None):
obj = var.get()
if obj is None:
obj = object()
var.set(obj)
print(f'{tag=}: get_var result is {obj=}')
return obj

async def get_var_object(tag):
return get_var(tag)

async def asyncio_main():
await asyncio.gather(*[get_var_object(id) for id in range(2)])

def test(get_var_before_run=False):
print(f'{get_var_before_run=}')
if get_var_before_run:
get_var()
asyncio.run(asyncio_main())
print()


if __name__ == '__main__':
test(get_var_before_run=False)
test(get_var_before_run=True)


 Output:---

tag=0: get_var result is obj=
tag=1: get_var result is obj=

get_var_before_run=True
tag=None: get_var result is obj=
tag=0: get_var result is obj=
tag=1: get_var result is obj=


--- my question: --
-- all objects in get_var_before_run=True are same.
-- my expected result is all objects should be different, because the code runs 
in different context.

--
components: asyncio
messages: 376464
nosy: asvetlov, chenzep, yselivanov
priority: normal
severity: normal
status: open
title: ContextVar get value is unexpected
versions: Python 3.8

___
Python tracker 

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



[issue41718] test.regrtest has way too many imports

2020-09-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

>
> Yes, but they should be imported after running the test. Note that the
> default value in the example was changed from None to set().

--

___
Python tracker 

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



Re: Uninstall problem

2020-09-06 Thread Luuk

On 5-9-2020 19:40, Mats Wichmann wrote:

On 9/5/20 7:54 AM, f.le...@omnias.fr wrote:

Hello,

  


I commit an error to install python because I chose python 3.8.5 x32bytes

So I wanted uninstalling it to install python 3.7.9 x64bytes


why not 3.8.5, by the way?


But 3.8.5 version don't want uninstall !?!


what does this mean?   uninstall should work like any uninstall on your
platform. in what way doesn't it want to uninstall?



And so I have the twice in my computer now ! How can I do to uninstall 3.8.5
?



it doesn't hurt to have more than one.  If you're on Windows, and use
the Python Launcher, you can show all your installs, and use it to
select the one you want:

py --list
py -3.7# specifically pick 3.7
py -3.8-32   # pick 32-bit 3.8, if both 64-bit and 32-bit are installed
py -3-64  # pick latest 64-bit Py3

The one reason you might be unhappy with both is that the Python
Launcher picks the highest numbered one as the default, so just

py

would get you 32-bit 3.8.   if both 64-bit and 32-bit of same version
are installed, the 64-bit one is preferred.



D:\TEMP>python -V
Python 3.8.5

D:\TEMP>py --list
Installed Pythons found by py Launcher for Windows
 -3.7-64 *


Can you explain above?

D:\TEMP>where py
C:\Windows\py.exe

D:\TEMP>where python
C:\Users\Luuk\AppData\Local\Microsoft\WindowsApps\python.exe

--
https://mail.python.org/mailman/listinfo/python-list


[issue30646] SQLite: sqlite3_enable_shared_cache() is deprecated

2020-09-06 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue41718] test.regrtest has way too many imports

2020-09-06 Thread STINNER Victor


STINNER Victor  added the comment:

> You could save/restore this data only when corresponded modules was imported, 
> like it was done in clear_caches() in refleak.py.

It was my first idea, but some large modules like multiprocessing and asyncio 
are only imported by tested when the test file is imported, whereas 
save_environment() is called (__enter__) before the import in 
libregrtest.runtest.

--

___
Python tracker 

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



[issue38325] [Windows] test_winconsoleio failures

2020-09-06 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 by Mohamed Koubaa in 
branch 'master':
bpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (GH-21818)
https://github.com/python/cpython/commit/63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2


--

___
Python tracker 

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



[issue41732] Custom iterator to memoryview - performance improvement

2020-09-06 Thread Diogo Flores


Change by Diogo Flores :


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

___
Python tracker 

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



[issue41732] Custom iterator to memoryview - performance improvement

2020-09-06 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +skrah

___
Python tracker 

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



[issue41732] Custom iterator to memoryview - performance improvement

2020-09-06 Thread Diogo Flores


New submission from Diogo Flores :

Hi,

Here's a patch that adds an iterator to memoryview, which makes iterating over 
memoryview objs considerably faster.

The following values result from a compilation with debug ON.



Without patch:

cpython: ./python.exe -m timeit -s "a=memoryview(b'x'*100)" "for x in a: 
pass"
5 loops, best of 5: 98 msec per loop

cpython: ./python.exe -m timeit -s "a=b'x'*100" "for x in a: pass"
5 loops, best of 5: 68.6 msec per loop


With patch:

cpython: ./python.exe -m timeit -s "a=memoryview(b'x'*100)" "for x in a: 
pass"
5 loops, best of 5: 68.1 msec per loop

cpython: ./python.exe -m timeit -s "a=b'x'*100" "for x in a: pass"
5 loops, best of 5: 70 msec per loop



Please let me know your thoughts regarding it.

Diogo

--
messages: 376460
nosy: dxflores
priority: normal
severity: normal
status: open
title: Custom iterator to memoryview - performance improvement
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



[issue41730] Show deprecation warnings for tkinter.tix

2020-09-06 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The removal was suggested before but not merged in 
https://bugs.python.org/issue31371

--
nosy: +gpolo, serhiy.storchaka, xtreak

___
Python tracker 

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



Re: Replacement for pygtk?

2020-09-06 Thread Liste guru

Il 06/09/2020 06:20, Michael Torrie ha scritto:

On 9/4/20 3:24 PM, Grant Edwards wrote:

I assume that difference is because pygtk was hand-written and gi is
built auto-magically using SWIG or something like that?

Essentially, yes.  Although pygobject does not use a tool like swig to
generate static wrappers. Rather it uses the GTK introspection API to
ask gobject's for their methods and attributes, and then marshalls and
calls them at runtime. So you can use pygobject with any GObject-based
binary library, not just GTK+.  Hope that makes sense.


    AFAIK, from the source code / include files a .gir file is 
generated (an xml with all the functions, parameters and info).


    For example for a simple rectangle_int(x. y. width, height) in 
cairo you have:


    
  
    
  
  
    
  
  
    
  
  
    
  
    

    From this file a .typelib is generated (a binary, compact 
representation of the data) and the gi library, using this file and the 
.dll/.so, creates the correct bindings and function for the language you 
use (at runtime).


    Switching from Gtk 3.22 to Gtk 3.24 (or a new 3.26) is only a 
matter of using the new .typelib/.dll with your version of gi, at least 
until the gi folks puts the handling of the default values for parameters :)


    So with the gi package for your python (say 3.5.10) you can use all 
the Gtk versions, you don't have to recompile for example Gtk 3.24.13 
for your python/gi version.


    To have all the Gtk works with python 3.8 you have only to port / 
build the gi part (and on windows make some magic to handle the new path 
handling for the .dll search/load location, but this is another story).


    With best regards

        Daniele Forghieri




--
https://mail.python.org/mailman/listinfo/python-list