[issue39846] Register .whl as a unpack format in shutil unpack

2020-03-04 Thread Daniel Chimeno


New submission from Daniel Chimeno :

While working on project with Python wheels I found myself adding:


import shutil
shutil.register_unpack_format('whl', ['.whl'], shutil._unpack_zipfile)



Since PEP 427 explicitly says wheels are ZIP-format archive. 
https://www.python.org/dev/peps/pep-0427/

I wonder if it's loable to register the unpack format by default so the 
shutil.unpack_archive() function works without adding it.

--
components: Library (Lib)
messages: 363341
nosy: dchimeno
priority: normal
severity: normal
status: open
title: Register .whl as a unpack format in shutil unpack
type: enhancement
versions: Python 3.8, Python 3.9

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



[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno

New submission from Daniel Chimeno :

In the secrets module documentation, the examples in `15.3.4. Recipes and best 
practices` need change things, I think this examples must run after a copy & 
paste into user terminal.

Options for first example:
1:

import string
from secrets import choice
alphabet = string.ascii_letters + string.digits
password = ''.join(choice(alphabet) for i in range(8))


2:
```
import string
import secrets
alphabet = string.ascii_letters + string.digits
password = ''.join(secrets.choice(alphabet) for i in range(8))


I've looked in the devguide, but I haven't found what's the standard approach 
here.

First issue here, be nice :)

--
assignee: docs@python
components: Documentation
messages: 316200
nosy: dchimeno, docs@python
priority: normal
severity: normal
status: open
title: Import secrets module in secrets examples
type: enhancement
versions: Python 3.7, Python 3.8

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



[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno

Daniel Chimeno  added the comment:

Relevant link: 
https://docs.python.org/3.7/library/secrets.html#recipes-and-best-practices

--

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



[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno

Change by Daniel Chimeno :


--
keywords: +patch
pull_requests: +6397
stage:  -> patch review

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