[issue39673] Map errno==ETIME to TimeoutError

2020-05-19 Thread Zackery Spytz


Change by Zackery Spytz :


--
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue39673] Map errno==ETIME to TimeoutError

2020-05-19 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 2.0 -> 3.0
pull_requests: +19538
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20253

___
Python tracker 

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



[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-19 Thread SilentGhost


Change by SilentGhost :


--
components: +Library (Lib)
nosy: +pitrou
stage:  -> needs patch
type:  -> behavior
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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-19 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I just filed a related issue to this that's also similar to issue 29587:
https://bugs.python.org/issue40694

--

___
Python tracker 

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



[issue40694] gen.throw() with multiple yield froms skips intermediate exceptions

2020-05-19 Thread Chris Jerdonek


New submission from Chris Jerdonek :

Here is another gen.throw() exception chain example similar to the examples in 
issue 29587: https://bugs.python.org/issue29587

def f():
yield

def g():
try:
raise RuntimeError('a')
except Exception as exc:
print(f'handling: {exc!r}')
yield from f()

def h():
try:
raise RuntimeError('b')
except Exception as exc:
print(f'handling: {exc!r}')
yield from g()

gen = h()
gen.send(None)
gen.throw(ValueError)

Output:

handling: RuntimeError('b')
handling: RuntimeError('a')
Traceback (most recent call last):
  File "/.../test.py", line 13, in h
raise RuntimeError('b')
RuntimeError: b

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/.../test.py", line 20, in 
gen.throw(ValueError)
  File "/.../test.py", line 16, in h
yield from g()
  File "/.../test.py", line 9, in g
yield from f()
  File "/.../test.py", line 2, in f
yield
ValueError

The issue is that "RuntimeError: a" is skipped. It should also appear in the 
exception chain.

I believe this has the same root cause as issue 29590: 
https://bugs.python.org/issue29590

--
components: Interpreter Core
messages: 369416
nosy: chris.jerdonek
priority: normal
severity: normal
status: open
title: gen.throw() with multiple yield froms skips intermediate exceptions
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



Re: Can't run program

2020-05-19 Thread Bob Gailer
On May 19, 2020 9:02 PM, "Ryan Harrington" <
ryan.harring...@whitesourcesoftware.com> wrote:
>
> Hi - I'm not the least bit technical. Trying to learn through YouTube.
I've
> gotten exit code 1, 2, 106. Tried setting up the project interpreter and
> can't figure it out. Tried uninstalling and reinstalling everything and
> still having problems. Any feedback appreciated.

We need a lot more information in order to help you. Operating system?
Where did you get the installation file? what does "everything" mean? Show
us the steps you took and whatever error messages you got, or whatever
"still having problems" means.

I'm pretty sure this list does not take attachments, so you either need to
copy and paste what you might have typed and any results from that, or put
images in a place like pastebin and give us the link.

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


Re: why no camelCase in PEP 8?

2020-05-19 Thread Jim

On 5/19/20 3:49 PM, Chris Angelico wrote:

On Wed, May 20, 2020 at 6:38 AM Jim  wrote:


On 5/19/20 1:24 PM, Chris Angelico wrote:

On Wed, May 20, 2020 at 4:03 AM Schachner, Joseph
 wrote:


And, because '_' looks sort of like a space, the individual words are more 
easily readable.  notEveyoneThinksReadingCamelCaseIsEasy.



Me: "What does casels mean?"

*beat*

Me: "Well, I guess that's the point then, isn't it."

ChrisA



Couldn't resist: Why not Chris_A :)


Heh. Actually a fair question! It's actually been my shorthand name
for many many years, and originally I used the username "chrisa" since
that was the email convention at the company. I later started
uppercasing it to avoid being thought of as a "Christa" or somesuch,
and wanted to remain compatible with the existing address, so case
changes were all I'd do. But if I were to identify myself in a more
Pythonic way, it would be Chris_Angelico.

Backward compatibility trumps PEP 8.

ChrisA



Fair point.

Jim

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


[issue40291] socket library support for CAN_J1939

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 12fa658d0565c6c53d25f464f29ef596a0df5e2a by Miss Islington (bot) 
in branch '3.9':
bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)
https://github.com/python/cpython/commit/12fa658d0565c6c53d25f464f29ef596a0df5e2a


--

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 550f30c8f33a2ba844db2ce3da8a897b3e882c9a by karl ding in branch 
'master':
bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)
https://github.com/python/cpython/commit/550f30c8f33a2ba844db2ce3da8a897b3e882c9a


--

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19537
pull_request: https://github.com/python/cpython/pull/20249

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread Karl Ding


Karl Ding  added the comment:

Should this be added to the What's New for 3.9? I see a smaller change that 
exposes the CAN_RAW_JOIN_FILTERS constant mentioned.

I've created https://github.com/python/cpython/pull/20248 if this is needed.

--

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread Karl Ding


Change by Karl Ding :


--
pull_requests: +19536
pull_request: https://github.com/python/cpython/pull/20248

___
Python tracker 

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



Re: Strings: double versus single quotes

2020-05-19 Thread Souvik Dutta
I love and use only singel quotes. I think that looks clean... Nothing else.

Souvik flutter dev

On Tue, May 19, 2020, 11:50 PM Manfred Lotz  wrote:

> Hi there,
> I am asking myself if I should preferably use single or double quotes
> for strings?
>
> If I need a single quote in a string I would use double quotes for the
> whole string and vice versa. For f-strings I mostly see double
> quotes but single quotes would work as well I think.
>
> Is there a recommendation?
>
>
> --
> Manfred
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Can't run program

2020-05-19 Thread Yong Pang

Hi

Ryan Harrington wrote:

Hi - I'm not the least bit technical. Trying to learn through YouTube. I've
gotten exit code 1, 2, 106. Tried setting up the project interpreter and
can't figure it out. Tried uninstalling and reinstalling everything and
still having problems. Any feedback appreciated.


You should be able to paste the code here before anyone others can help you.

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


[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-19 Thread Y Ono


Y Ono  added the comment:

It's the same as when executing `os.path.abspath`.

--

___
Python tracker 

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



Re: Strings: double versus single quotes

2020-05-19 Thread Terry Reedy

On 5/19/2020 2:10 PM, Manfred Lotz wrote:

Hi there,
I am asking myself if I should preferably use single or double quotes
for strings?

If I need a single quote in a string I would use double quotes for the
whole string and vice versa. For f-strings I mostly see double
quotes but single quotes would work as well I think.

Is there a recommendation?


I personally like to use "This is a phrase or sentence" while '0', '\n', 
and 'work' are items or words.

# And this is a comment 'quoted' by '#' and '\n'.


--
Terry Jan Reedy

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


[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-05-19 Thread Irv Kalb


Irv Kalb  added the comment:

If possible, I would like to raise the priority of this issue.  I teach Python 
and I use IDLE every day.  This bug makes using IDLE for teaching extremely 
difficult.

Hopefully new information:

I have just bought a new Mac, which is running Catalina (MacOS 10.15).  I am 
using Python/IDLE 3.7.3, and I am seeing the same issue.  And it does seem to 
behave differently depending on if I created the file(s) on my computer (fails) 
vs downloading files from the internet (opens just fine). 

(For background info, I have used IDLE for years on my older Mac with MacOS 
10.12 without seeing this problem.)

I have my Mac Finder set to open all ".py" files using IDLE.app in the Python 
3.7 folder.

In the Finder, if I select one or more files and double click, each file opens 
in an editor window in IDLE.  But after that, with IDLE still open, double 
clicking on any other .py file is ignored.  I can edit and save any open file, 
but I can no longer open additional files by double clicking in the Finder, or 
by dragging a file to the IDLE icon in my Dock.

Further info:  If I am in IDLE and have an editing window open, then I choose 
to open a different file using File -> Open File, and navigate to another 
Python file, then the open file closes, and the new file opens - even if I have 
not saved any changed in the first file.

I never use the command line.  I just double click on Python files, and want to 
see them open in IDLE.  That's how I teach my students, and I typically have 
multiple small sample files open at the same time.  This bug makes it 
impossible to teach and work this way.

If it would help, I would be happy to create a small movie demonstrating this 
problem.

--
nosy: +IrvKalb

___
Python tracker 

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



Can't run program

2020-05-19 Thread Ryan Harrington
Hi - I'm not the least bit technical. Trying to learn through YouTube. I've
gotten exit code 1, 2, 106. Tried setting up the project interpreter and
can't figure it out. Tried uninstalling and reinstalling everything and
still having problems. Any feedback appreciated.

Thank you,
--

Ryan Harrington
Director of Sales
M - 860-303-2265
WhiteSourceSoftware.com 
Boston, MA, USA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Strings: double versus single quotes

2020-05-19 Thread Alan Gauld via Python-list
On 19/05/2020 19:10, Manfred Lotz wrote:
> Hi there,
> I am asking myself if I should preferably use single or double quotes
> for strings?

Personally laziness wins every time. Single quotes only require one
finger from the home position using my right hand, double quotes
require two and a big movement of my left hand from home.

So I use single quotes most of the time (ie unless it contains
a single quote)


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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


Re: Strings: double versus single quotes

2020-05-19 Thread Cameron Simpson

On 19May2020 22:04, Manfred Lotz  wrote:

On Tue, 19 May 2020 13:36:54 -0500
Tim Chase  wrote:

On 2020-05-19 20:10, Manfred Lotz wrote:
> I am asking myself if I should preferably use single or double
> quotes for strings?

I'd say your consistency matters more than which one you choose.

[...]

I personally use habits from my C days:  double-quotes for everything
except single characters for which I use a single-quote:

  if 'e' in "hello":

as in indicator that I'm using it as a single character rather than
as a string.

I don't have a firm rule for myself if a string contains
double-quotes.  It doesn't happen often for me in a case where I
couldn't use a triple-quoted string or that I am refering to it as a
single character. [...]


I am influenced by Perl which I used before. In Perl I used double
quoted strings when I wanted interpolation. Otherwise single quoted
strings. In Rust (or C) it is double quotes for strings and single
quotes for characters.


And I, the shell (where single quotes are "raw" and double quotes allow 
parameter substitution).  So I use single quotes for plain old strings 
and double quotes when I'm going to be formatting the string with % 
(therefore, in most logging calls).


Personally I find double quotes visually noisy, and prefer single 
quotes. Most of the time.


This is one of the reasons I autoformat with yapf (which doesn't change 
my quoting) rather than black (which is very opinionated and also 
untunable, and _does_ change my quotes).


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-19 Thread Y Ono


New submission from Y Ono :

```
import os
from pathlib import Path

os.chdir(Path(__file__).parent)
print(Path(__file__).absolute())
```
I put the code into a file in `/tmp/test.py`, and execute it from `/tmp/` 
directory like below. Then the output showed `/tmp/scripts/scripts/test.py`.

```
$ python scripts/test.py
/tmp/scripts/scripts/test.py
```


After executing `os.chdir`, pathlib's path handling is completely broken.

--
components: C API
messages: 369410
nosy: Y Ono
priority: normal
severity: normal
status: open
title: pathlib.Path will be broken with os.chdir command.
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



Re: Missing python curses functions?

2020-05-19 Thread Cameron Simpson

On 19May2020 20:53, Alan Gauld  wrote:

Is anyone other than me still even using Python curses? :-)


Well, not curses full on (due to lack of time) but my cs.upd module uses 
the ti_getstr() et al functions for cursor motions and insert/delete 
line, etc.


It may be that the person who wrote the curses module simply got tired.  
Or it predates the get_attr calls (not sure now old they are).


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


[issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior

2020-05-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The parts that are supposed to be stable are the seeding and the output of 
calls to random().  The sessions shown below show that this working as intended.

The downstream algorithms such as randrange() are not protected by the 
reproducibility guarantees.  While we try not to change them unnecessarily, 
they are allowed to change and to generate different sequences.  

At some point in Python 3's history, we changed randrange() so that it often 
gives different results than before.  The reason for the change is that the old 
algorithm wasn't as evenly distributed as it should have been.

-- Sessions showing that the output of random() is stable --

Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 16:24:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> import random
>>> random.seed('superman123')
>>> [random.random() for i in range(5)]
[0.6740635277890739, 0.3455289115553195, 0.6883176146073614, 
0.3824266890084288, 0.9839811707434662]

Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> import random
>>> random.seed('superman123', version=1)
>>> [random.random() for i in range(5)]
[0.6740635277890739, 0.3455289115553195, 0.6883176146073614, 
0.3824266890084288, 0.9839811707434662]

--
resolution:  -> not a bug
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



[issue32309] Implement asyncio.run_in_executor shortcut

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

Note for myself: Python 3.9 release manager (Lukasz) approved adding the 
feature to Python 3.9.0 beta2:
https://github.com/python/cpython/pull/20212#pullrequestreview-414278938

--
nosy: +vstinner
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0509c4547fc95cc32a91ac446a26192c3bfdf157 by Victor Stinner in 
branch 'master':
bpo-40521: Fix update_slot() when INTERN_NAME_STRINGS is not defined (#20246)
https://github.com/python/cpython/commit/0509c4547fc95cc32a91ac446a26192c3bfdf157


--

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The #if 0 was added by Guido in 43ff8683fe68424b9c179ee4970bb865e11036d6 in 
1998, before the tcl/tk clip fix for Windows.

* Temporarily get rid of the registration of Tcl_Finalize() as a
low-level Python exit handler.  This can attempt to call Python code
at a point that the interpreter and thread state have already been
destroyed, causing a Bus Error.  Given the intended use of
Py_AtExit(), I'm not convinced that it's a good idea to call it
earlier during Python's finalization sequence...  (Although this is
the only use for it in the entire distribution.)

The code has a comment that was part of a multifile svn merge, so author 
unknown.

/* This was not a good idea; through  bindings,
   Tcl_Finalize() may invoke Python code but at that point the
   interpreter and thread state have already been destroyed! */

Calling Tcl_Finalize() within Tk.destroy avoids this as .destroy is called 
while python is running, either explicitly or when the associated window is 
closed.

However, it is possible to have more than 1 Tk instance, either accidentally or 
on purpose*, each with its own .tk, which I presume is the 'associated tcl 
interpreter' instance.  So Tk.destroy may be called more than once and each 
call must not disable other Tk instances.  To test: Create 2 roots and two Tk 
windows, destroy 1.  Does the other window disappear? Does root2.withdraw 
raise? Does adding widgets raise?

If yes, we would either need to count working Tk instances or try calling less 
shutdown stuff.

--

___
Python tracker 

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



Re: Missing python curses functions?

2020-05-19 Thread Bill Campbell
On Tue, May 19, 2020, Alan Gauld via Python-list wrote:
>During my Covid19 lock-down I thought I'd spend my time translating
>the "Linux Curses Programming HOWTO" document into Pythonic curses.
>
>One of the functions discussed that does not appear to have
>a Python equivalent is attr_get() which gets the current
>attributes.

I haven't looked for it.

...
>Is anyone other than me still even using Python curses? :-)

Raises hand.

Bill
-- 
INTERNET:   b...@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www2.celestial.com/ 6641 E. Mercer Way
Mobile: (206) 947-5591  PO Box 820
Fax:(206) 232-9186  Mercer Island, WA 98040-0820

Democracy Is Mob Rule with Income Taxes
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [RELEASE] Python 3.9.0b1 is now available for testing

2020-05-19 Thread Robin Becker

..

robin@minikat:~/devel/reportlab
$ $HOME/LOCAL/3.9b1/bin/python3.9
Python 3.9.0b1 (default, May 19 2020, 12:50:30) [GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import distutils

/home/robin/LOCAL/3.9b1/lib/python3.9/distutils/__init__.py:15: UserWarning: 
The virtualenv distutils package at %s appears to be in the same location as 
the system distutils?
  warnings.warn("The virtualenv distutils package at %s appears to be in the same 
location as the system distutils?")

distutils.__path__

['/home/robin/LOCAL/3.9b1/lib/python3.9/distutils']

distutils.__file__

'/home/robin/LOCAL/3.9b1/lib/python3.9/distutils/__init__.py'


is this a bug or have I built python 3.9.0b1 wrongly?


I think that is correct __file__ value. What are you expecting to see?


I wasn't expecting the warning at all, but in fact this appears to be an interaction caused by installing 
virualenv==16.2.0 into my home built python3.9.0b1 and then using it to create a virtual environment. For some reason 
that creates a problem in the base python which I haven't yet fully explained.


I can build python3.9.9b1 virtualenvs using archlinux python 3.8.2 with

/bin/python -mvirtualenv -p /home/robin/LOCAL/3.9b1/bin/python3.9 myenv

I prefer the older virtualenv because it makes python executables which I can link to rather than always using an 
explicit path.


Sorry for the noise.


Barry


--
Robin Becker

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




O


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


[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19535
pull_request: https://github.com/python/cpython/pull/20247

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Thanks! I think it does.

Also, I see now that using the __qualname__ is better than including the 
object's type for locating the method because you can have cases like 
super().foo() or even--

class A:
def foo(self):
pass

def bar():
pass

A.foo = bar

--

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 6ed37430d31e915103ab5decd14d757eb2d159d5 by Miss Islington (bot) 
in branch '3.9':
bpo-40645: restrict HMAC key len to INT_MAX (GH-20238)
https://github.com/python/cpython/commit/6ed37430d31e915103ab5decd14d757eb2d159d5


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19534
pull_request: https://github.com/python/cpython/pull/20246

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19533
pull_request: https://github.com/python/cpython/pull/20245

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset aca4670ad695d4b01c7880fe3d0af817421945bd by Christian Heimes in 
branch 'master':
bpo-40645: restrict HMAC key len to INT_MAX (GH-20238)
https://github.com/python/cpython/commit/aca4670ad695d4b01c7880fe3d0af817421945bd


--
nosy: +miss-islington

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 059279d8706074489144f6ba8ccc8723e0b85007 by Miss Islington (bot) 
in branch '3.9':
bpo-38870: invalid escape sequence (GH-20240)
https://github.com/python/cpython/commit/059279d8706074489144f6ba8ccc8723e0b85007


--

___
Python tracker 

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



[issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9512ad74b0fcaff023c1ade75313dc8e249aef78 by Victor Stinner in 
branch '3.9':
[3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 
(GH-20228)
https://github.com/python/cpython/commit/9512ad74b0fcaff023c1ade75313dc8e249aef78


--

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 381ceeaa5980643fa1f958f112f373d7a197e6e8 by Miss Islington (bot) 
in branch '3.8':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/381ceeaa5980643fa1f958f112f373d7a197e6e8


--

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 67bbb5d4381b6121a4f61ba945c58056e5894846 by Miss Islington (bot) 
in branch '3.7':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/67bbb5d4381b6121a4f61ba945c58056e5894846


--

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset dd74b6fde31aff9aa46c4fc2a830c569764e1b63 by Batuhan Taskaya in 
branch 'master':
bpo-38870: invalid escape sequence (GH-20240)
https://github.com/python/cpython/commit/dd74b6fde31aff9aa46c4fc2a830c569764e1b63


--

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19532
pull_request: https://github.com/python/cpython/pull/20244

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread Steve Dower


Change by Steve Dower :


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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19529
pull_request: https://github.com/python/cpython/pull/20241

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19530
pull_request: https://github.com/python/cpython/pull/20242

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19531
pull_request: https://github.com/python/cpython/pull/20243

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread Steve Dower


Steve Dower  added the comment:


New changeset 92327a9913150f5bb55b2727a2c5d50f9b7b6e55 by Steve Dower in branch 
'master':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/92327a9913150f5bb55b2727a2c5d50f9b7b6e55


--

___
Python tracker 

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



[issue40684] make install doesn't respect configure --with-platlibdir=lib64

2020-05-19 Thread Ned Deily


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



[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +19528
pull_request: https://github.com/python/cpython/pull/20240

___
Python tracker 

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



[issue40667] [Windows] Add global python and python3 commands

2020-05-19 Thread Steve Dower


Steve Dower  added the comment:

> To avoid this, process() can set a flag based on the image name that prevents 
> calling maybe_handle_shebang(). 

Or the other solution, which is stop treating "usr/bin/env" as "search PATH" - 
I'm sure there's another issue open somewhere saying this is the best approach.

At the same time, one other gap is that this would leave the global Scripts 
folder off of PATH. On one hand, good (for all the same reasons). But on the 
other hand, people legitimately complain about it and we don't yet have a 
workaround.

Since the whole point of this exercise is to minimise complaining, it's looking 
better to just leave people with the devil they know...

--

___
Python tracker 

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



[issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing

2020-05-19 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 4.0 -> 5.0
pull_requests: +19527
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20239

___
Python tracker 

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



[issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior

2020-05-19 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

3.5 and 3.6 are now only accepting security fixes.

Only the stability of random.random is guaranteed across versions, but you are 
calling randrange:

https://docs.python.org/3/library/random.html#notes-on-reproducibility

So I am pretty sure that this will not be considered a bug (unless it is a 
design bug).

Personally I think that the lack of reproducibility of the full range of random 
methods is a rather large annoyance: if you care about reproducibility, 
including doctests, you cannot use anything in the module except random.random, 
but have to write your own implementation (possibly by copying and pasting).

I don't have a good solution for this though.

--
nosy: +steven.daprano
versions:  -Python 3.5, Python 3.6

___
Python tracker 

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



Re: [RELEASE] Python 3.9.0b1 is now available for testing

2020-05-19 Thread Barry


> On 19 May 2020, at 21:36, Robin Becker  wrote:
> 
> On 19/05/2020 10:49, Łukasz Langa wrote:
>> On behalf of the entire Python development community, and the currently 
>> serving Python release team in particular, I’m pleased to announce the 
>> release of Python 3.9.0b1. Get it here:
>> https://www.python.org/downloads/release/python-390b1/ 
>> 
>> This is a beta preview of Python 3.9
>> Python 3.9 is still in development. This release, 3.9.0b1, is the first of 
>> four planned beta release previews.
>> Beta release previews are intended to give the wider community the 
>> opportunity to test new features and bug fixes and to prepare their projects 
>> to support the new feature release.
>> Call to action
> .
> 
> I built python3.9.0b1 from source using the standard configure make dance eg
> 
> ./configure --prefix=$HOME/LOCAL/3.9b1
> make && make install
> 
> that appeared to work fine and I seem to get a working python. However, I 
> seem to have an issue with the distutils package
> 
> 
>> robin@minikat:~/devel/reportlab
>> $ $HOME/LOCAL/3.9b1/bin/python3.9
>> Python 3.9.0b1 (default, May 19 2020, 12:50:30) [GCC 10.1.0] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
> import distutils
>> /home/robin/LOCAL/3.9b1/lib/python3.9/distutils/__init__.py:15: UserWarning: 
>> The virtualenv distutils package at %s appears to be in the same location as 
>> the system distutils?
>>  warnings.warn("The virtualenv distutils package at %s appears to be in the 
>> same location as the system distutils?")
> distutils.__path__
>> ['/home/robin/LOCAL/3.9b1/lib/python3.9/distutils']
> distutils.__file__
>> '/home/robin/LOCAL/3.9b1/lib/python3.9/distutils/__init__.py'
> 
> is this a bug or have I built python 3.9.0b1 wrongly?

I think that is correct __file__ value. What are you expecting to see?

Barry

> --
> Robin Becker
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list

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


[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

After reporting my experiments above, msg369334, I made further failing efforts 
to simulate pasting into another process, as in 3 and 4.  It might be that a 
concrete key event is needed.  So I strongly suspect that the solution for IDLE 
is indeed a tkinter solution, and it seems that patching _tkinter.c is needed.  
(And a solution only for IDLE would not help other tkinter users.)  Please 
continue.

--

___
Python tracker 

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



Re: Strings: double versus single quotes

2020-05-19 Thread Manfred Lotz
On Tue, 19 May 2020 13:36:54 -0500
Tim Chase  wrote:

> On 2020-05-19 20:10, Manfred Lotz wrote:
> > Hi there,
> > I am asking myself if I should preferably use single or double
> > quotes for strings?  
> 
> I'd say your consistency matters more than which one you choose.
> 
> According to a recent observation by Raymond H.
> 
> """
>   Over time, the #python world has shown increasing preference
>   for double quotes:  "hello" versus 'hello'.
> 
>   Perhaps, this is due to the persistent influence of JSON,
>   PyCharm, Black, and plain English.
> 
>   In contrast, the interpreter itself prefers single quotes:
> 
>   >>> "hello"  
>   'hello'
> """
> 
> https://twitter.com/raymondh/status/1259209765072154624
> 
> I think the worst choice is to be haphazard in your usage with a
> hodgepodge of single/double quotes.
> 
> I personally use habits from my C days:  double-quotes for everything
> except single characters for which I use a single-quote:
> 
>   if 'e' in "hello":
> 
> as in indicator that I'm using it as a single character rather than
> as a string.
> 
> I don't have a firm rule for myself if a string contains
> double-quotes.  It doesn't happen often for me in a case where I
> couldn't use a triple-quoted string or that I am refering to it as a
> single character.
> 
> -tkc
> 
> 

I am influenced by Perl which I used before. In Perl I used double
quoted strings when I wanted interpolation. Otherwise single quoted
strings. In Rust (or C) it is double quotes for strings and single
quotes for characters. 

You may be right. Consistency is a good thing. So, I have to decide for
what I use and be consistent thereafter.

-- 
Manfred


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


[issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing

2020-05-19 Thread Asheesh Laroia


New submission from Asheesh Laroia :

Some parts of test_concurrent_futures make sense to run even on Python builds 
where multiprocessing.synchronize is absent. At the moment, 
test_concurrent_futures.py skips all tests in the file if 
multiprocessing.synchronize is missing from the Python build. I have a patch to 
enable more tests, which I'll submit as a GitHub pull request.

The reason I want this patch is while working on CPython on Android, I saw that 
test_concurrent_futures refused to run its test suite, and I became very afraid 
that this meant that asyncio on CPython on Android was doomed. In fact, I was 
afraid for no reason. I want future people porting CPython to be less scared 
than I was. :)

I discovered that the only part of concurrent.futures that requires 
multiprocessing.synchronize is concurrent.futures.ProcessPoolExecutor.

concurrent.futures.ProcessPoolExecutor already has a way to check at runtime if 
it can work on the host system, so this patch leans on that.

This patch fixes a few other tests to skip themselves in the case that 
ProcessPoolExecutor cannot function.

I tested this by building CPython (with my patch) with adding a configure flag 
on macOS:

$ ./configure --with-pydebug --with-openssl=$(brew --prefix openssl) 
ac_cv_posix_semaphores_enabled=no

Why multiprocessing.synchronize is missing
--

multiprocessing.synchronize imports _multiprocessing.SemLock, which is based on 
a libc function called sem_open(), which implements named semaphores, which 
allows the creation of lock-esque counters that can be used from multiple 
processes. multiprocessing.c currently only creates the SemLock property if 
sem_open() is considered "working" through a check in ./configure; I've 
short-circuited that check above to be a "no".

On Android, sem_open() exists but simply returns ENOSYS; see its implementation 
here: 
https://android.googlesource.com/platform/external/pthreads/+/master/sem_open.c

Android isn't the only platform missing sem_open()

Past work
-

issue3770 is an older conversation about a related issue. issue3770 has also 
attracted comments from someone who wants CPython's test suite to run to 
completion on their platform lacking sem_open() and therefore lacking 
multiprocessing.synchronize. This patch should solve their problem, I hope.

Future work
---

Automated testing: In order to prevent regressions, I'm interested in hosting a 
buildbot for at least one year, hopefully in perpetuity, on which we call 
./configure with ac_cv_posix_semaphores_enabled=no.

I'd like to improve the error message when the user imports 
multiprocessing.synchronize so it points at some new documentation text that I 
(or someone) adds to CPython, rather than the issue number. I'm OK taking on 
the work of writing those docs in a follow-up issue if we merge this.

Thanks
--

Thanks to Zachary Ware for discussing this with me in an CPython contributor 
office hours time slot before I filed the issue. Thanks to Dr. Russell 
Keith-Magee, Glyph Lefkowitz, Nathaniel Smith, and Geoffrey Thomas for informal 
conversations and technical research.

--
components: Tests, asyncio
messages: 369393
nosy: asheesh, asvetlov, yselivanov, zach.ware
priority: normal
severity: normal
status: open
title: Adjust test_concurrent_futures to run more of its tests if 
multiprocessing.synchronize is missing
type: enhancement
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



Re: why no camelCase in PEP 8?

2020-05-19 Thread DL Neil via Python-list

On 20/05/20 8:49 AM, Chris Angelico wrote:

On Wed, May 20, 2020 at 6:38 AM Jim  wrote:


On 5/19/20 1:24 PM, Chris Angelico wrote:

On Wed, May 20, 2020 at 4:03 AM Schachner, Joseph
 wrote:


And, because '_' looks sort of like a space, the individual words are more 
easily readable.  notEveyoneThinksReadingCamelCaseIsEasy.



Me: "What does casels mean?"


Chris
Angelico
Shortens
Every
Long-name
Savagely
?
Significantly
?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Tal Einat


Tal Einat  added the comment:

epaine, if you'd like to create a new PR based on these findings, I'd be happy 
to review it!

--

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Tal Einat


Tal Einat  added the comment:

Indeed, adding a simple _tkinter.destroy() method which invokes Tcl_Finalize, 
and calling it in the Tk.destroy() method, makes copied text remain available 
after closing IDLE!

I did the above to test my hypothesis, but I'm not sure it would be a proper 
fix.

--

___
Python tracker 

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



[issue40691] misleading output from difflib unified_diff

2020-05-19 Thread Chris Danis


New submission from Chris Danis :

When difflib.unified_diff is asked to produce a diff of inputs a.txt and b.txt 
(attached), with 10 context lines, it produces the following:

--- codfw/groupLoadsBySection live
+++ codfw/groupLoadsBySection generated
@@ -90,37 +90,31 @@
 },
 "s4": {
 "api": {
 "db2106": 300,
 "db2110": 100
 },
 "contributions": {
 "db2084:3314": 100,
 "db2091:3314": 100
 },
-"dump": {
-"db2073": 100
-},
-"logpager": {
-"db2084:3314": 100,
-"db2091:3314": 100
-},
-"recentchanges": {
-"db2084:3314": 100,
-"db2091:3314": 100
-},
-"recentchangeslinked": {
-"db2084:3314": 100,
-"db2091:3314": 100
-},
-"vslow": {
-"db2073": 100
+"logpager": {
+"db2084:3314": 100,
+"db2091:3314": 100
+},
+"recentchanges": {
+"db2084:3314": 100,
+"db2091:3314": 100
+},
+"recentchangeslinked": {
+"db2084:3314": 100,
+"db2091:3314": 100
 },
 "watchlist": {
 "db2084:3314": 100,
 "db2091:3314": 100
 }
 },
 "s5": {
 "api": {
 "db2075": 300,
 "db2128": 100


However, this could simply and much more readably be rendered as:

@@ -90,38 +90,32 @@
   },
   "s4": {
 "api": {
   "db2106": 3,
   "db2110": 1
 },
 "contributions": {
   "db2084:3314": 1,
   "db2091:3314": 1
 },
-"dump": {
-  "db2073": 1
-},
 "logpager": {
   "db2084:3314": 1,
   "db2091:3314": 1
 },
 "recentchanges": {
   "db2084:3314": 1,
   "db2091:3314": 1
 },
 "recentchangeslinked": {
   "db2084:3314": 1,
   "db2091:3314": 1
 },
-"vslow": {
-  "db2073": 1
-},
 "watchlist": {
   "db2084:3314": 1,
   "db2091:3314": 1
 }
   },
   "s5": {
 "api": {
   "db2059": 1,
   "db2066": 1
 },

(This is what diff -u10 produces.)

--
components: Library (Lib)
files: a.txt
messages: 369390
nosy: cdanis
priority: normal
severity: normal
status: open
title: misleading output from difflib unified_diff
versions: Python 3.7
Added file: https://bugs.python.org/file49171/a.txt

___
Python tracker 

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



[issue40691] misleading output from difflib unified_diff

2020-05-19 Thread Chris Danis


Change by Chris Danis :


Added file: https://bugs.python.org/file49172/b.txt

___
Python tracker 

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



Re: why no camelCase in PEP 8?

2020-05-19 Thread Chris Angelico
On Wed, May 20, 2020 at 6:38 AM Jim  wrote:
>
> On 5/19/20 1:24 PM, Chris Angelico wrote:
> > On Wed, May 20, 2020 at 4:03 AM Schachner, Joseph
> >  wrote:
> >>
> >> And, because '_' looks sort of like a space, the individual words are more 
> >> easily readable.  notEveyoneThinksReadingCamelCaseIsEasy.
> >>
> >
> > Me: "What does casels mean?"
> >
> > *beat*
> >
> > Me: "Well, I guess that's the point then, isn't it."
> >
> > ChrisA
> >
>
> Couldn't resist: Why not Chris_A :)

Heh. Actually a fair question! It's actually been my shorthand name
for many many years, and originally I used the username "chrisa" since
that was the email convention at the company. I later started
uppercasing it to avoid being thought of as a "Christa" or somesuch,
and wanted to remain compatible with the existing address, so case
changes were all I'd do. But if I were to identify myself in a more
Pythonic way, it would be Chris_Angelico.

Backward compatibility trumps PEP 8.

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


[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Tal Einat


Tal Einat  added the comment:

During finalization, TkFinalizeThread would call DeleteWindowsExitProc 
(registered via TkCreateThreadExitHandler). This in turn is set as a 
thread-exit handler via Tcl_CreateThreadExitHandler upon the first call to 
TkCreateThreadExitHandler.

Now we're out of Tk and into Tcl itself. TkFinalizeThread would be called by 
Tcl's Tck_FinalizeThread. This, in turn, is called by Tcl_Finalize (for thread 
number zero?). And _tkinter sets an atexit handler to call Tcl_Finalize.

Ah, but no! That handler is actually not set, due to the "#if 0" before it! So 
the Tcl/Tk finalization is actually skipped, causing this issue.

--

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks, Victor!

--

___
Python tracker 

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



Re: Strings: double versus single quotes

2020-05-19 Thread Ethan Furman

On 05/19/2020 11:40 AM, Joel Goldstick wrote:


I thought triple quotes are for docstrings?


It's the recommendation, but double and single quotes work just fine, too -- at 
least for docstrings that fit an one line.

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


[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +19526
pull_request: https://github.com/python/cpython/pull/20238

___
Python tracker 

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



Re: why no camelCase in PEP 8?

2020-05-19 Thread Jim

On 5/19/20 1:24 PM, Chris Angelico wrote:

On Wed, May 20, 2020 at 4:03 AM Schachner, Joseph
 wrote:


And, because '_' looks sort of like a space, the individual words are more 
easily readable.  notEveyoneThinksReadingCamelCaseIsEasy.



Me: "What does casels mean?"

*beat*

Me: "Well, I guess that's the point then, isn't it."

ChrisA



Couldn't resist: Why not Chris_A :)

Jim

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


Missing python curses functions?

2020-05-19 Thread Alan Gauld via Python-list
During my Covid19 lock-down I thought I'd spend my time translating
the "Linux Curses Programming HOWTO" document into Pythonic curses.

One of the functions discussed that does not appear to have
a Python equivalent is attr_get() which gets the current
attributes.

There are functions aplenty for setting/unsetting attributes
but not for querying them. Or am I missing something?

I understand why we don't implement the print family of
functions - we can use string formatting combined with
addstr(). But I can't see equivalent python functionality
in the attr_get() case?

Is anyone other than me still even using Python curses? :-)

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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


Re: [RELEASE] Python 3.9.0b1 is now available for testing

2020-05-19 Thread Robin Becker

On 19/05/2020 10:49, Łukasz Langa wrote:

On behalf of the entire Python development community, and the currently serving 
Python release team in particular, I’m pleased to announce the release of 
Python 3.9.0b1. Get it here:

https://www.python.org/downloads/release/python-390b1/ 


This is a beta preview of Python 3.9

Python 3.9 is still in development. This release, 3.9.0b1, is the first of four 
planned beta release previews.

Beta release previews are intended to give the wider community the opportunity 
to test new features and bug fixes and to prepare their projects to support the 
new feature release.

Call to action


.

I built python3.9.0b1 from source using the standard configure make dance eg

./configure --prefix=$HOME/LOCAL/3.9b1
make && make install

that appeared to work fine and I seem to get a working python. However, I seem 
to have an issue with the distutils package



robin@minikat:~/devel/reportlab
$ $HOME/LOCAL/3.9b1/bin/python3.9
Python 3.9.0b1 (default, May 19 2020, 12:50:30) 
[GCC 10.1.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

import distutils

/home/robin/LOCAL/3.9b1/lib/python3.9/distutils/__init__.py:15: UserWarning: 
The virtualenv distutils package at %s appears to be in the same location as 
the system distutils?
  warnings.warn("The virtualenv distutils package at %s appears to be in the same 
location as the system distutils?")

distutils.__path__

['/home/robin/LOCAL/3.9b1/lib/python3.9/distutils']

distutils.__file__

'/home/robin/LOCAL/3.9b1/lib/python3.9/distutils/__init__.py'




is this a bug or have I built python 3.9.0b1 wrongly?
--
Robin Becker

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


[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-19 Thread Vitalii


Change by Vitalii :


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

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Tal Einat


Tal Einat  added the comment:

Indeed, you've got that pretty much correct. The call chain is:

Tk.__init__
_tkinter_create_impl (called as _tkinter.create() from Python)
Tkapp_New

Tkapp_New does a lot of things. In particular, it calls Tcl_CreateInterp and 
later Tcl_AppInit. Tcl_AppInit (apparently a local copy is usually  used!) 
calls Tcl_Init and later Tk_Init.

At this point the call chain enters tcl/tk code. Tk_Init calls Initialize 
(except on cygwin - I'm ignoring this). The inline comment for Initialize says 
"The core of the initialization code for Tk, called from Tk_Init and 
Tk_SafeInit." And at the very end of Initialize, we find the call 
TkCreateThreadExitHandler(DeleteWindowsExitProc, tsdPtr).

--

___
Python tracker 

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



[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-19 Thread Vitalii


New submission from Vitalii :

In [2]: from unittest import FunctionTestCase   

   

In [3]: loader.loadTestsFromTestCase(FunctionTestCase)  


Out[3]: ]>

In [4]: test = _._tests[0]; test 
Out[4]: 

In [5]: test._testFunc  

  
Out[5]: 'runTest'

In [6]: test._testFunc.__name__ 

  
*** AttributeError: 'str' object has no attribute '__name__'

--
components: Tests
messages: 369386
nosy: pwtail
priority: normal
severity: normal
status: open
title: unittest: if FunctionTestCase is imported, the loader loads "tests" from 
it
type: behavior
versions: 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



[issue40667] [Windows] Add global python and python3 commands

2020-05-19 Thread Eryk Sun


Eryk Sun  added the comment:

If .py files are associated with py.exe, handling the shebang "#!/usr/bin/env 
python[3]" might spawn the python[3].exe launcher recursively if it handles 
shebangs (see bpo-40687). To avoid this, process() can set a flag based on the 
image name that prevents calling maybe_handle_shebang(). 

I still think it would be for the best if the python3.exe launcher ran as "py 
-3", and the python.exe launcher ran as "py", based simply on checking the 
image name. Also, I think these two launchers should drop all command-line 
option support, i.e. -h, --help, --list, --list-paths, -0[p], and 
-X[.Y][-32|-64]. This keeps the command-line interface for the "python" command 
consistent across the board. PY_PYTHON3 would set the default for the 
"python3.exe" launcher, and PY_PYTHON would set the default for the 
"python.exe" launcher. For whatever reason, PY_PYTHON could be set to 2 to make 
the python.exe launcher run 2.x. (Even in Ubuntu I install the 
python-is-python3 package, but sadly some people are stuck maintaining 2.x 
code.)

--

___
Python tracker 

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



[issue40689] The only supported minidom attribute iteration (NamedNodeMap) is O(n^2)

2020-05-19 Thread Niels Thykier

New submission from Niels Thykier :

Hi,

The only official supported iteration over all attributes on an element via the 
minidom XML API require an O(n²) iterator.  It happens because the `item` 
method generates a list of all attribute names, look up the attribute name at 
the given index and then throws away the list (only to recompute it on next 
lookup).

There are also a `.values()` method that looks very promising, only it has 
"strings-attached" in the form of the following disclaimer:

"""There are also experimental methods that give this class more mapping 
behavior. [...]"""  
(source: https://docs.python.org/3/library/xml.dom.html)

The word "experimental" makes it hard for me to ask projects to migrate to 
`.values()` because I have to convince them to accept the risk of adopting the 
"unsupported APIs".


For me, any of the following would solve the issue:

 * Bless the mapping based API as supported to the same extend as `item` + 
`length` in the DOM API.

 * Optimize `item` to avoid the performance issue.

 * Provide an alternative (but supported) way of iterating over all attributes. 
 Preferably one that enables you to get the node directly without having to use 
`Element.getAttributeNode()` or similar.



The code in question highlighting the problematic code in the minidom API:

```
class NamedNodeMap(object):

[...]

def item(self, index):
try:
return self[list(self._attrs.keys())[index]]
except IndexError:
return None
```

--
components: XML
messages: 369384
nosy: nthykier
priority: normal
severity: normal
status: open
title: The only supported minidom attribute iteration (NamedNodeMap) is O(n^2)
type: performance
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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread E. Paine


E. Paine  added the comment:

I'm (sadly) not particularly familiar with C, though I have tried to trace the 
calls of TkClipCleanup. As @taleinat mentioned, it is called by the 
TkCloseDisplay, though, in turn, I believe this method is called by the 
DeleteWindowsExitProc method. The name "DeleteWindowsExitProc" is passed, in 
the Initialize method, to the TkCreateThreadExitHandler method (I assume method 
references work in a similar-enough way to Python?) along with the tsdPtr 
object.

I stopped tracing it at this point, and instead worked from the Python end. The 
Tkapp_New method calls the Tcl_CreateInterp method and I have three questions 
about this (each only applicable depending on the answer to the previous one):
1. Is the Tkapp_New method the correct one to be looking at for tcl/tk 
initialisation (I can't find where _tkinter.create is implemented)?
2. Is there a reason why the call is to tcl rather than tk?
3. Would changing this to tk cause the fix in tk to be applied?

--

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

The attached PR isn't exactly what you requested, but it's a very minimal code 
change that uses the existing __qualname__ functionality to change the message 
to

TypeError: A.foo() takes 1 positional argument but 2 were given

Does that address those problems?

--

___
Python tracker 

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



Re: Strings: double versus single quotes

2020-05-19 Thread Chris Angelico
On Wed, May 20, 2020 at 4:42 AM Joel Goldstick  wrote:
>
> On Tue, May 19, 2020 at 2:27 PM Chris Angelico  wrote:
> >
> > On Wed, May 20, 2020 at 4:21 AM Manfred Lotz  wrote:
> > >
> > > Hi there,
> > > I am asking myself if I should preferably use single or double quotes
> > > for strings?
> > >
> > > If I need a single quote in a string I would use double quotes for the
> > > whole string and vice versa. For f-strings I mostly see double
> > > quotes but single quotes would work as well I think.
> > >
> > > Is there a recommendation?
> > >
> >
> > Nothing strong. I tend to use double quotes because I have a
> > background in C (where double quotes are for strings, single quotes
> > for characters), and double quotes are the recommendation for
> > docstrings (see PEP 258). If you tend to work a lot with SQL, you
> > might prefer single quotes. Use whatever makes you happy.
> >
> I thought triple quotes are for docstrings?

Yes, but triple double quotes ==> """ <== not triple single quotes ==>
''' <== is what PEP 258 recommends. The description is awkward but
it's still a place where the double-quote character (U+0022 QUOTATION
MARK) is the recommendation.

On Wed, May 20, 2020 at 4:46 AM DL Neil via Python-list
 wrote:
> @Chris: are you on the night-shift?
Yes? :)

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


[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
keywords: +patch
nosy: +Dennis Sweeney
nosy_count: 2.0 -> 3.0
pull_requests: +19523
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20236

___
Python tracker 

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



[issue40688] PEG Generator: Fix scripts to always use the correct parser

2020-05-19 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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

___
Python tracker 

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



[issue40688] PEG Generator: Fix scripts to always use the correct parser

2020-05-19 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

All the scripts in Tools/peg_generator/scripts need to be updated, since they 
mostly assume that ast.parse and compile use the old parser. We can use the 
_peg_parser extension module instead, but it well need some enhancements so 
that it also supports compilation to bytecode.

--
assignee: lys.nikolaou
components: Demos and Tools
messages: 369381
nosy: gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: PEG Generator: Fix scripts to always use the correct parser
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



Re: Strings: double versus single quotes

2020-05-19 Thread Tim Chase
On 2020-05-19 20:10, Manfred Lotz wrote:
> Hi there,
> I am asking myself if I should preferably use single or double
> quotes for strings?

I'd say your consistency matters more than which one you choose.

According to a recent observation by Raymond H.

"""
  Over time, the #python world has shown increasing preference
  for double quotes:  "hello" versus 'hello'.

  Perhaps, this is due to the persistent influence of JSON,
  PyCharm, Black, and plain English.

  In contrast, the interpreter itself prefers single quotes:

  >>> "hello"
  'hello'
"""

https://twitter.com/raymondh/status/1259209765072154624

I think the worst choice is to be haphazard in your usage with a
hodgepodge of single/double quotes.

I personally use habits from my C days:  double-quotes for everything
except single characters for which I use a single-quote:

  if 'e' in "hello":

as in indicator that I'm using it as a single character rather than
as a string.

I don't have a firm rule for myself if a string contains
double-quotes.  It doesn't happen often for me in a case where I
couldn't use a triple-quoted string or that I am refering to it as a
single character.

-tkc


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


Re: Strings: double versus single quotes

2020-05-19 Thread DL Neil via Python-list

On 20/05/20 6:26 AM, Chris Angelico wrote:

On Wed, May 20, 2020 at 4:21 AM Manfred Lotz  wrote:


Hi there,
I am asking myself if I should preferably use single or double quotes
for strings?

If I need a single quote in a string I would use double quotes for the
whole string and vice versa. For f-strings I mostly see double
quotes but single quotes would work as well I think.

Is there a recommendation?



Nothing strong. I tend to use double quotes because I have a
background in C (where double quotes are for strings, single quotes
for characters), and double quotes are the recommendation for
docstrings (see PEP 258). If you tend to work a lot with SQL, you
might prefer single quotes. Use whatever makes you happy.



Have been finding myself doing somewhat the opposite:

"a literal string"
f'a string featuring computation of { result }'

(never managed to make it as far as C in my alphabet skills, but yes, 
maybe SQL influences)


@Chris: are you on the night-shift?
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Determining index of range of values in a matrix

2020-05-19 Thread DL Neil via Python-list

On 19/05/20 6:40 AM, swaroop.sahoo...@gmail.com wrote:

Hi All,
I am using python for doing the following:
I have a matrix which has dimension of 174*993.
Each row of the matrix has some numbers in the range of 30-30.5.
I would like to determine the index of the numbers in the range of 30-30.5 in 
each row.
I can determine the index of the numbers in each row by using 
result1=np.where(np.logical_and(R[i,:]>= 30, R[i,:]<= 30.3))
But I would like to put the indexes in a matrix.
That is difficult because the number of indexes in each row will be different.
Can anyone help.



I'm probably less than sure that I've understood the problem. How will 
the indexes be used once the second 'matrix' is built?


Might it help to include some examples of data-rows, plus the expected 
index-row?


Are we to assume that you are using np?


As you allude, the usual structure of a "matrix" is that the number of 
'columns' in each 'row' is the same. However, the indexes might 
constitute a "sparse matrix".


Python however, has no 'matrix' data-structure, but does allow lists to 
contain lists (or dict[ionaries] to contain dicts) as a 2D 
data-structure. A list has no constraint, and no expectation that each 
'row' has the same number of columns.

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2020-05-19 Thread Benjamin Peterson


Change by Benjamin Peterson :


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



Re: Strings: double versus single quotes

2020-05-19 Thread Joel Goldstick
On Tue, May 19, 2020 at 2:27 PM Chris Angelico  wrote:
>
> On Wed, May 20, 2020 at 4:21 AM Manfred Lotz  wrote:
> >
> > Hi there,
> > I am asking myself if I should preferably use single or double quotes
> > for strings?
> >
> > If I need a single quote in a string I would use double quotes for the
> > whole string and vice versa. For f-strings I mostly see double
> > quotes but single quotes would work as well I think.
> >
> > Is there a recommendation?
> >
>
> Nothing strong. I tend to use double quotes because I have a
> background in C (where double quotes are for strings, single quotes
> for characters), and double quotes are the recommendation for
> docstrings (see PEP 258). If you tend to work a lot with SQL, you
> might prefer single quotes. Use whatever makes you happy.
>
I thought triple quotes are for docstrings?
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list



-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Strings: double versus single quotes

2020-05-19 Thread Chris Angelico
On Wed, May 20, 2020 at 4:21 AM Manfred Lotz  wrote:
>
> Hi there,
> I am asking myself if I should preferably use single or double quotes
> for strings?
>
> If I need a single quote in a string I would use double quotes for the
> whole string and vice versa. For f-strings I mostly see double
> quotes but single quotes would work as well I think.
>
> Is there a recommendation?
>

Nothing strong. I tend to use double quotes because I have a
background in C (where double quotes are for strings, single quotes
for characters), and double quotes are the recommendation for
docstrings (see PEP 258). If you tend to work a lot with SQL, you
might prefer single quotes. Use whatever makes you happy.

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


Re: why no camelCase in PEP 8?

2020-05-19 Thread Chris Angelico
On Wed, May 20, 2020 at 4:03 AM Schachner, Joseph
 wrote:
>
> And, because '_' looks sort of like a space, the individual words are more 
> easily readable.  notEveyoneThinksReadingCamelCaseIsEasy.
>

Me: "What does casels mean?"

*beat*

Me: "Well, I guess that's the point then, isn't it."

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


Strings: double versus single quotes

2020-05-19 Thread Manfred Lotz
Hi there,
I am asking myself if I should preferably use single or double quotes
for strings?

If I need a single quote in a string I would use double quotes for the
whole string and vice versa. For f-strings I mostly see double
quotes but single quotes would work as well I think.

Is there a recommendation?


-- 
Manfred
 


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


[issue27501] Add typing.py class describing a PEP 3118 buffer object

2020-05-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



RE: why no camelCase in PEP 8?

2020-05-19 Thread Schachner, Joseph
I don't actually know, but I can take a guess.  CamelCase can be problematic 
with terms that are abbreviations and always upper case.  For example FIRFilter 
or USBPLL
The first violated camelCase because it has no lower case letters before 
Filter, and the second completely violates camelCase because both USB and PLL 
are well known always capitalized abbreviations so that name has no lower case 
letters.

On the other hand FIR_filter and USB_PLL have no problem showing where the 
split should be.

And, because '_' looks sort of like a space, the individual words are more 
easily readable.  notEveyoneThinksReadingCamelCaseIsEasy.

-- Joseph S.

-Original Message-
From: Lance E Sloan  
Sent: Monday, May 18, 2020 3:47 PM
To: python-list@python.org
Subject: why no camelCase in PEP 8?

I've been using Python for about 18 years.  Several things have changed in the 
language in those years.  I don't disagree with most of it, but one of the 
things that annoys me is the disapproval of using camelCase to name symbols 
such as variables, functions, etc.

I think PEP 8, the "Style Guide for Python Code" 
(https://www.python.org/dev/peps/pep-0008/), came out shortly after I began 
using Python.  I think the old habits of the people I worked with and the 
relative lack of tools like Flake8 and Pylint led to the standard being 
ignored.  However, now I see many developers really want to adhere to the 
standard.

My preference for using camelCase (in PEP 8, AKA mixedCase) is putting me at 
odds with my colleagues, who point to PEP 8 as "the rules".  I have reasons for 
my preferring camelCase.  I suspect the reasons the PEP 8 authors have for not 
using it are probably as strong as my reasons.  So our reasons probably nullify 
each other and what's left is simple preference.

So, I'd like to know what was the reason behind favoring snake_case (AKA 
lower_case_with_underscores) in PEP 8 instead of camelCase.

Does anyone in this group know?

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


[issue40684] make install doesn't respect configure --with-platlibdir=lib64

2020-05-19 Thread Arfrever Frehtes Taifersar Arahesis


Change by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim

2020-05-19 Thread Steve Dower


Steve Dower  added the comment:

If someone remembers where the other "shebangs on Windows don't make sense" 
issue is, I think we can close this one in favour of that.

Though it's also an important point for issue40667 - if "python.exe" becomes 
the launcher, then this will get stuck in an infinite loop (and process memory 
exhaustion is the worst kind of hang on Windows).

--
versions: +Python 3.10, Python 3.9 -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



[issue40028] Math module method to find prime factors for non-negative int n

2020-05-19 Thread Mark Dickinson


Change by Mark Dickinson :


--
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim

2020-05-19 Thread Ben Spiller


Change by Ben Spiller :


--
type:  -> behavior

___
Python tracker 

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



[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-05-19 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:


New changeset 9d17cbf33df7cfb67ca0f37f6463ba5c18676641 by Joannah Nanjekye in 
branch 'master':
bpo-32604: PEP 554 for use in test suite (GH-19985)
https://github.com/python/cpython/commit/9d17cbf33df7cfb67ca0f37f6463ba5c18676641


--

___
Python tracker 

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



[issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim

2020-05-19 Thread Ben Spiller


New submission from Ben Spiller :

The py.exe launcher doc states "If no relevant options are set, the commands 
python and python2 will use the latest Python 2.x version installed" ... which 
was indeed working reliably until Microsoft added their weird python.exe shim 
(which either terminates with no output or brings up the Microsoft Store page) 
as part of 
https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/

Now, I find scripts that start with "#!/usr/bin/env python" cause py.exe to run 
the Windows python.exe shim which confusingly terminates with no output (unless 
run with no arguments). 

I think to stop lots of developers banging theirs heads against this brick 
wall, py.exe should include some logic to ignore the 
C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe shim, since for 
someone with py.exe installed, running that is _never_ what you'd want. (or 
alternatively, work with Microsoft to get this decision reversed, but that may 
be harder!)

Lots of people are hitting this e.g. 
https://superuser.com/questions/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor
 , 
https://stackoverflow.com/questions/57485491/python-python3-executes-in-command-prompt-but-does-not-run-correctly

Here's the output:

py myscript.py
launcher build: 32bit
launcher executable: Console
File 'C:\Users\XXX\AppData\Local\py.ini' non-existent
Using global configuration file 'C:\WINDOWS\py.ini'
Called with command line: apama-build\build.py   -h
maybe_handle_shebang: read 256 bytes
maybe_handle_shebang: BOM not found, using UTF-8
parse_shebang: found command: python
searching PATH for python executable
Python on path: C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe
located python on PATH: 
C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe
run_child: about to run 
'C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe myscript.py'
child process exit code: 9009

>py -0
Installed Pythons found by py Launcher for Windows
 -3.8-64 *
 -3.7-64
 -3.6-64
 -2.7-64

(nb: was surprising that it didn't run any of those installed versions!)

--
components: Windows
messages: 369379
nosy: benspiller, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows py.exe launcher interacts badly with Windows store python.exe 
shim
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread Paul Ganssle

Paul Ganssle  added the comment:

No worries Łukasz, I figured it would be worth bringing up because normally the 
releases aren't so broken that they aren't usable in the common case. That 
said, this won't break any *existing* code, it'll just prevent people on Linux 
machines from using zoneinfo.

I don't think waiting 3 weeks is a big deal. I'm planning to release a backport 
soon anyway, and I expect people probably won't adopt new-in-3.9 modules 
without a backport during the beta period *anyway*, since they can't deploy any 
code using that feature to prod.

I'm going to resolve this issue. Thanks for the quick response Łukasz and for 
the quick review Victor!

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



[issue37616] [3.10 prep] zip path incorrect

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Interpreter Core
resolution:  -> fixed
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

The beta releases are every three weeks now because of the release schedule 
being adjusted to allow Linux distributions to release the new version in the 
Autumn distributions.

I understand that you're eager to have your feature up and running. I feel like 
shipping the fixed version in beta2 will be sufficient. If we released a 
beta1.5 later in the week, that would be overkill given the already aggressive 
schedule as you'd then have a beta2 two weeks later, no?

--

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

Compiler warning on 64-bit Windows:

c:\vstinner\python\3.9\modules\_hashopenssl.c(1427): warning C4244: 'function': 
conversion from 'Py_ssize_t' to 'int', possible loss of data

--
nosy: +vstinner

___
Python tracker 

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



  1   2   >