[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Ronald Oussoren via Python-ideas
> On 22 Nov 2020, at 01:01, Greg Ewing wrote: > > On 21/11/20 3:59 pm, Christopher Barker wrote: >> On Fri, Nov 20, 2020 at 4:18 PM Greg Ewing > With venvs, it seems like it should be possible to have a very >>simple tool that just packages up everything in your venv. > > >> conda is simila

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Abdur-Rahmaan Janhangeer
Greetings, Finally 💯 What about native executables (without PyInstaller)? Kind Regards, Abdur-Rahmaan Janhangeer https://www.github.com/Abdur-RahmaanJ Mauritius sent from gmail client on Android, that's why the signature is so ugly. On Sun, 22 Nov 2020, 15:30 Hartmut Goebel, wrote: > Hi,

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Hartmut Goebel
Hi, > What do you think of adding PyInstaller as an official > part of CPython? Among the different native exports > options, PyInstaller holds a nice track of clean delivery. PyInstaller maintainer here. IMHO this is not a good idea. I see no benefit for either the stdlib nor for PyInstaller. -

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Hartmut Goebel
Am 20.11.20 um 11:01 schrieb Paul Moore: > 1. Add the ability for zipapp to prepend a launcher for Windows, so > zipapps can be built that "run natively" on Windows (Unix and MacOS > don't need this, because for them, shebangs are handled by the OS, not > by the language runtime). It *might* be pos

[Python-ideas] Re: PyInstaller funding

2020-11-22 Thread Hartmut Goebel
Am 19.11.20 um 10:29 schrieb M.-A. Lemburg: > Since the project appears to be struggling a bit, it may be > worthwhile having the project owners ask the PSF or major company > users for a grant. I tried this without much success. * The PSF offered to retweet my tweets - antic and no much of a h

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Paul Moore
On Sun, 22 Nov 2020 at 11:32, Hartmut Goebel wrote: > > Am 20.11.20 um 11:01 schrieb Paul Moore: > > 1. Add the ability for zipapp to prepend a launcher for Windows, so > > zipapps can be built that "run natively" on Windows (Unix and MacOS > > don't need this, because for them, shebangs are handl

[Python-ideas] Re: Matching TypedDicts and other values in JSON

2020-11-22 Thread Guido van Rossum
You nerd-sniped me there. :-) I think this is perhaps too complicated to attempt to make it all work. - We intentionally don't support things like `isinstance(x, List[str])` because that would require checking all the items with `isinstance(item, str)`, and that seems a speed trap. Reverting this

[Python-ideas] super() magic-methods.

2020-11-22 Thread Jonatan
```class A: def __eq__(self, other): return '__eq__' class B(A): def __eq__(self, other): print(super() == other) print(super().__eq__(other)) B() == ...``` OUTPUT: False __eq__ As you can see here, when you run the code, __uq__ does not get printed twice. someh

[Python-ideas] Re: super() magic-methods.

2020-11-22 Thread Chris Angelico
On Mon, Nov 23, 2020 at 6:29 AM Jonatan wrote: > > ```class A: > def __eq__(self, other): > return '__eq__' > > class B(A): > def __eq__(self, other): > print(super() == other) > print(super().__eq__(other)) > > B() == ...``` > > > OUTPUT: > False > __eq__ > > As yo

[Python-ideas] pathlib enhancements

2020-11-22 Thread Todd
I know enhancements to pathlib gets brought up occasionally, but it doesn't look like anyone has been willing to take the initiative and see things through to completion. I am willing to keep the ball rolling here and even implement these myself. I have some suggestions and I would like to discus

[Python-ideas] Re: super() magic-methods.

2020-11-22 Thread Steven D'Aprano
On Sun, Nov 22, 2020 at 07:28:00PM -, Jonatan wrote: > somehow, The expression "super() other" does not turn into > "super().__OPERATOR__(other)". Is there something documented that lead you to believe that it should? By the way, for most operators, there is no simple relationship between

[Python-ideas] Re: pathlib enhancements

2020-11-22 Thread Abdulla Al Kathiri
I really like these ideas. Effectively, we can use pathlib.Path without ever needing to import shutil. We would like also copyfile from shutil if we are only interested copying the file data. How about adding append_text and append_bytes with newLine similar to what you suggested? > On Nov 22,

[Python-ideas] Re: pathlib enhancements

2020-11-22 Thread Todd
On Sun, Nov 22, 2020 at 3:27 PM Abdulla Al Kathiri < [email protected]> wrote: > On Nov 22, 2020, at 11:53 PM, Todd wrote: > > I know enhancements to pathlib gets brought up occasionally, but it > doesn't look like anyone has been willing to take the initiative and see > things through

[Python-ideas] Re: Matching TypedDicts and other values in JSON

2020-11-22 Thread Samuel Colvin
> > Probably the best you can do is write your own recursive > isinstance-lookalike that has the behavior you need for validating JSON. > This is already done in the form of pydantic which is the backbone of one of the fastest growing python web frameworks, f

[Python-ideas] Re: pathlib enhancements

2020-11-22 Thread Chris Angelico
On Mon, Nov 23, 2020 at 6:54 AM Todd wrote: > > I know enhancements to pathlib gets brought up occasionally, but it doesn't > look like anyone has been willing to take the initiative and see things > through to completion. I am willing to keep the ball rolling here and even > implement these m

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Greg Ewing
On 22/11/20 4:31 pm, Christopher Barker wrote: unfortunately, that's not how most python packages are set up -- you install the whole thing at once. As an example, it's really tricky to use even one function from scipy without installing the whole thing. Something needs to change about how Pyt

[Python-ideas] Re: pathlib enhancements

2020-11-22 Thread Todd
On Sun, Nov 22, 2020 at 5:46 PM Chris Angelico wrote: > On Mon, Nov 23, 2020 at 6:54 AM Todd wrote: > > > > I know enhancements to pathlib gets brought up occasionally, but it > doesn't look like anyone has been willing to take the initiative and see > things through to completion. I am willing

[Python-ideas] Re: Matching TypedDicts and other values in JSON

2020-11-22 Thread Guido van Rossum
On Sun, Nov 22, 2020 at 1:55 PM Samuel Colvin wrote: > More generally, I think runtime type checking was never the intention for > type hints, in fact I think Guido specifically said somewhere that runtime > type checking was not an intended use case (am I right?). However > pydantic and a few ot

[Python-ideas] Re: pathlib enhancements

2020-11-22 Thread Chris Angelico
On Mon, Nov 23, 2020 at 11:37 AM Todd wrote: >> It might be worth looking at this as "making shutil support Path >> objects", and then have the Path objects grow methods that delegate to >> shutil. That'd avoid duplicating logic eg for rmtree and copyfile. > > > shutil already supports Path object

[Python-ideas] Re: pathlib enhancements

2020-11-22 Thread Matt Wozniski
> I suggest adding an "exist_ok" argument to all of these, with > the default being "True" for backwards-compatibility. This argument name > is already in use elsewhere in pathlib. If this is False and the file is > not present, a "FileNotFoundError" is raised. For Path.mkdir, exist_ok=True inhi

[Python-ideas] Re: pathlib enhancements

2020-11-22 Thread Todd
On Sun, Nov 22, 2020 at 9:49 PM Matt Wozniski wrote: > > I suggest adding an "exist_ok" argument to all of these, with > > the default being "True" for backwards-compatibility. This argument name > > is already in use elsewhere in pathlib. If this is False and the file is > > not present, a "Fi

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Christopher Barker
On Sun, Nov 22, 2020 at 6:34 AM Paul Moore wrote: > > Am 20.11.20 um 11:01 schrieb Paul Moore: > > > > 2. Add something that makes writing MacOS "app bundles" from zipapps > > > easier. That could be part of the zipapp module, or a standalone > > > module. > > Definitely not. I'm thinking of so

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Brendan Barnwell
On 2020-11-22 06:32, Paul Moore wrote: Definitely not. I'm thinking of something*far* more limited. Specifically, things I'm not suggesting be in the stdlib: 1. Bundling the Python binaries. 2. Stripping out unneeded modules. 3. Executables forms other than "single file". 4. Support for C exten

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-22 Thread Abdur-Rahmaan Janhangeer
Greetings list, > 3. Executables forms other than "single file". 4. Support for C extensions. @CHB, @Barnwell I haven't replied in full to a previous email of Mr Moore, but the no support for C extensions is a crucial point for packaging. If the stdlib has to support a packaging tool, it has to