[Python-ideas] Re: Restricting access to sensitive APIs with a permission model like Deno

2023-03-03 Thread Filipe Laíns
m the unprotected thread to the protected one. [1] https://man.archlinux.org/man/seccomp.2 [2] https://lwn.net/Articles/634391/ Cheers, Filipe Laíns signature.asc Description: This is a digitally signed message part ___ Python-ideas mailin

[Python-ideas] Re: `importlib.resources` access whole directories as resources

2022-05-18 Thread Filipe Laíns
ee with the point that directories are not resources, in fact: https://github.com/python/importlib_resources/blob/main/importlib_resources/_adapters.py#L96-L100 Cheers, Filipe Laíns signature.asc Description: This is a digitally signed message part ___ Pyt

[Python-ideas] Re: `importlib.resources` access whole directories as resources

2022-05-17 Thread Filipe Laíns
abstracting the FS away. Packages are akin to directories, files are akin to resources, when operating on a FS. Cheers, Filipe Laíns signature.asc Description: This is a digitally signed message part ___ Python-ideas mailing list -- python-ideas@python.

[Python-ideas] Re: `importlib.resources` access whole directories as resources

2022-05-17 Thread Filipe Laíns
; > -- > Greg It's not contradictory. "the individual resources may not be files on disk at all" hints that the resource might be for eg. an entry on a database that contains binary data. Directory are not binary data, they cannot be a r

[Python-ideas] Re: `importlib.resources` access whole directories as resources

2022-05-09 Thread Filipe Laíns
se needing a file on the file system is sort of common, but from my experience the same is not true for directories. While I can see the value in what you propose, I worry it is not a common enough use-case. Some code examples would definitely help out here. Cheers, Filipe Laíns signature.asc

[Python-ideas] Re: os.workdir() context manager

2021-09-15 Thread Filipe Laíns
) method >   returning a context manager. > > Thoughts ? > > Thanks, bpo: https://bugs.python.org/issue25625 PR: https://github.com/python/cpython/pull/28271 Filipe Laíns signature.asc Description: This is a digitally signed message part ___

[Python-ideas] Re: Add @parametrize decorator to unittest library

2021-09-07 Thread Filipe Laíns
y exists natively in Python, please put some example > or documentation link below. > > Thanks in advance. Hi Leonardo, Please check out subtests, they allow you to achieve what you are looking for :) https://docs.python.org/3/library/unittest.html#distinguishing-test-iterations-using-subte

[Python-ideas] Re: The name Ellipsis should be a constant

2021-05-31 Thread Filipe Laíns
at `...` refers to, so that both could not be assigned a new value. > Perhaps Ellipsis could get the same treatment as None here, but I am not sure if there's enough reasoning to justify that, especially considering that it would be a backwards incompatible change.

[Python-ideas] Re: __init__ in module names

2020-12-08 Thread Filipe Laíns
ived at > https://mail.python.org/archives/list/python-ideas@python.org/message/UEHUJOH4WDYLH4QPN7RC3HXCEUK3OAMO/ > Code of Conduct: http://python.org/psf/codeofconduct/ I support this change. It would also be fairly trivial to make the hard error be descriptive and user- friendly, like the Pyth