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

2020-11-20 Thread Andrew Svetlov
I'm not PyInstaller user but communicated with this tool about a year ago. The story is: I'm the maintainer of multidict library and once I had a bug report like "multidict 4.7.1 causes segfault when bundled with PyInstaller". The report author said that the previous "multidict" version works fine

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

2020-11-20 Thread Chris Angelico
On Fri, Nov 20, 2020 at 6:06 PM Brendan Barnwell wrote: > Yes, that's correct. All of what you described is how ordinary apps > work. If I install a program and it has a bug or security > vulnerability, then I am affected by that vulnerability. Having a way > to install a Python program

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

2020-11-20 Thread Steven D'Aprano
On Thu, Nov 19, 2020 at 11:24:32PM +, Paul Moore wrote: > I'm not sure about an installer. To me that means integrating with > system "installed apps" mechanisms. But I *would* support building an > "unzip and run" style of distribution. Don't zip files support self-extracting archives? Googl

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

2020-11-20 Thread Brendan Barnwell
On 2020-11-20 00:53, Chris Angelico wrote: So what you're saying is: "Everyone else who distributes native executables has these problems, so Python apps distributed as native executables will have these problems". Yes. Of course they will. But a Python app distributed as a .py file or a .pyz arc

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

2020-11-20 Thread Paul Moore
On Fri, 20 Nov 2020 at 08:55, Chris Angelico wrote: > > On Fri, Nov 20, 2020 at 6:06 PM Brendan Barnwell > wrote: > > You've mentioned this objection at least twice now and I still don't > > see it having any real relevance. All kinds of programs have bugs and > > vulnerabilities. Ther

[Python-ideas] Re: 'Infinity' constant in Python

2020-11-20 Thread Rob Cliffe via Python-ideas
Correction to previous post: On 11/10/2020 22:47, Wes Turner wrote: Which of these are you arguing should fail if Python changes to returning [+/-]inf instead of raising ZeroDivisionError? assert inf / inf == 1 That should raise an exception; inf/inf is meaningless (just as division b

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

2020-11-20 Thread Steven D'Aprano
On Thu, Nov 19, 2020 at 10:46:50PM -0800, Brendan Barnwell wrote: > Yes, that's correct. All of what you described is how ordinary apps > work. If I install a program and it has a bug or security > vulnerability, then I am affected by that vulnerability. Having a way > to install a Pyt

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

2020-11-20 Thread Paul Moore
On Fri, 20 Nov 2020 at 09:12, Steven D'Aprano wrote: > > On Thu, Nov 19, 2020 at 11:24:32PM +, Paul Moore wrote: > > > I'm not sure about an installer. To me that means integrating with > > system "installed apps" mechanisms. But I *would* support building an > > "unzip and run" style of distr

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

2020-11-20 Thread Steven D'Aprano
On Fri, Nov 20, 2020 at 01:06:11AM -0800, Brendan Barnwell wrote: > So are you suggesting that every single app should always be > distributed as source code, run by a separate interpreter that users > install separately? My system has approximately sixty gajillion[1] apps installed that

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

2020-11-20 Thread Abdur-Rahmaan Janhangeer
Greetings list, Since the thread is revolving around Zipapps, this thread might be useful: https://mail.python.org/archives/list/python-ideas@python.org/thread/EMP4PMT7AHUJPLYD2DN4MXKCMGDK3QSO/ The elaboration by Andrew Svetlov gives a full idea of how PyInstaller works. Not very clean for sure,

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

2020-11-20 Thread Paul Moore
On Fri, 20 Nov 2020 at 10:55, Abdur-Rahmaan Janhangeer wrote: > After the above thread I contacted a number of Zipapp-related persons > including the author of Shiv ( Loren Carvalho ) who was kind enough to reply. > Along the conversation he stated that > > > In fact, shiv itself sort of breaks a

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

2020-11-20 Thread Ronald Oussoren via Python-ideas
> On 19 Nov 2020, at 20:17, Steven D'Aprano wrote: > > On Fri, Nov 20, 2020 at 02:05:02AM +1300, Greg Ewing wrote: >> On 20/11/20 12:24 am, Chris Angelico wrote: >>> >>> Have you considered the value of using zipapp >> >>> You get all the advantages of a single runnable file, and >>> all the

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

2020-11-20 Thread Abdur-Rahmaan Janhangeer
Greetings list, While waiting to reply in full, just sharing this thread: https://github.com/linkedin/shiv/issues/32 Shipping the Interpreter with Shiv Barry Warsaw advocates PyOxidiser which ... requires rust to be installed on whoever is deploying the app. The accompanying article https://www.

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

2020-11-20 Thread Ronald Oussoren via Python-ideas
> On 20 Nov 2020, at 08:13, Abdur-Rahmaan Janhangeer > wrote: > > > - Some people, including me, don't think at this point this is a good idea > > to integrate PyInstaller in the Python code base. > > The maintainer of Py2App said > > > FWIW I don’t think that bundling any of these tools w

[Python-ideas] Re: Introduce "__python__" built-in attribute

2020-11-20 Thread Hedy Li
There's `platform.python_implementation()` (https://docs.python.org/3.8/library/platform.html). Although __implementation__ might be a better name if it was to be implemented. ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send a

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

2020-11-20 Thread Greg Ewing
On 20/11/20 9:17 pm, Andrew Svetlov wrote: Digging into the problem more, I've figured out that PyInstaller has hooks for a bunch of popular libraries to make them work. I've seen this sort of thing in other app bundl

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

2020-11-20 Thread Paul Moore
On Fri, 20 Nov 2020 at 13:47, Greg Ewing wrote: > > I've seen this sort of thing in other app bundlers too, e.g. > last time I looked py2app and py2exe had a bunch of special casing > for various libraries. > > This is quite a big problem, IMO. It makes these tools very > flakey. > > What is it ab

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

2020-11-20 Thread Ronald Oussoren via Python-ideas
> On 20 Nov 2020, at 14:45, Greg Ewing wrote: > > On 20/11/20 9:17 pm, Andrew Svetlov wrote: >> Digging into the problem more, I've figured out that PyInstaller has hooks >> >> for a bunch of popular libraries to make

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

2020-11-20 Thread Ronald Oussoren via Python-ideas
> On 20 Nov 2020, at 15:03, Paul Moore wrote: > > On Fri, 20 Nov 2020 at 13:47, Greg Ewing wrote: >> >> I've seen this sort of thing in other app bundlers too, e.g. >> last time I looked py2app and py2exe had a bunch of special casing >> for various libraries. >> >> This is quite a big probl

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

2020-11-20 Thread Matthew Einhorn
On Fri, Nov 20, 2020 at 8:48 AM Greg Ewing wrote: > On 20/11/20 9:17 pm, Andrew Svetlov wrote: > > Digging into the problem more, I've figured out that PyInstaller has > > hooks > > < > https://github.com/pyinstaller/pyinstaller/tree/develop/PyInstaller/hooks> > > > for a bunch of popular librari

[Python-ideas] A pypi-based app store solution for platform specific installation

2020-11-20 Thread Ricky Teachey
I was reading the pyinstaller thread and had this idea but didn't want to hijack. Maybe a wild idea, and very possible totally impractical or hopelessly complex, but: could the existing pypi infrastructure be leveraged into a set of platform-specific app stores? Maybe maybe we could make it as sim

[Python-ideas] Re: A pypi-based app store solution for platform specific installation

2020-11-20 Thread Paul Moore
On Fri, 20 Nov 2020 at 15:44, Ricky Teachey wrote: > > I was reading the pyinstaller thread and had this idea but didn't want to > hijack. > > Maybe a wild idea, and very possible totally impractical or hopelessly > complex, but: could the existing pypi infrastructure be leveraged into a set >

[Python-ideas] Re: A pypi-based app store solution for platform specific installation

2020-11-20 Thread Ricky Teachey
On Fri, Nov 20, 2020, 11:00 AM Paul Moore wrote: > On Fri, 20 Nov 2020 at 15:44, Ricky Teachey wrote: > > > > I was reading the pyinstaller thread and had this idea but didn't want > to hijack. > > > > Maybe a wild idea, and very possible totally impractical or hopelessly > complex, but: could t

[Python-ideas] One Type for pattern matching a sequence and dictionary

2020-11-20 Thread Abdulla Al Kathiri
Greetings all, We can do one type annotations like list[int] and dict[str, int], my question: why don’t we have a similar thing in matching patterns? Especially if you want to enforce a type on a sequence or a dictionary with unknown length. For example, ls = [3.14, ‘hello’, 1, 2, 3, 4, ...

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

2020-11-20 Thread Greg Ewing
On 21/11/20 3:03 am, Paul Moore wrote: For my own purposes, what I *actually* want is to specify a list of 3rd party packages ... I *don't* want clever logic to decide how to strip out "unused" bits. I concur. With venvs, it seems like it should be possible to have a very simple tool that just

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

2020-11-20 Thread Christopher Barker
I'm not sure I should get involved in this, but On Fri, Nov 20, 2020 at 12:53 AM Chris Angelico wrote: > Let's > suppose that there's a vulnerability discovered in the V8 JavaScript > interpreter (the one behind Node.js and Google Chrome and such). Does > everyone who's ever published a web

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

2020-11-20 Thread Christopher Barker
On Fri, Nov 20, 2020 at 4:18 PM Greg Ewing wrote: > On 21/11/20 3:03 am, Paul Moore wrote: > > For my own purposes, what I *actually* want is to specify a list of > > 3rd party packages ... > > I *don't* want clever logic to decide how to strip out "unused" bits. > I'm pretty sure that you can d

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

2020-11-20 Thread Matthew Einhorn
On Fri, Nov 20, 2020 at 7:20 PM Greg Ewing wrote: > On 21/11/20 3:03 am, Paul Moore wrote: > > For my own purposes, what I *actually* want is to specify a list of > > 3rd party packages ... > > I *don't* want clever logic to decide how to strip out "unused" bits. > > I concur. > > With venvs, it

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

2020-11-20 Thread Chris Angelico
On Sat, Nov 21, 2020 at 1:35 PM Christopher Barker wrote: > > I'm not sure I should get involved in this, but > > On Fri, Nov 20, 2020 at 12:53 AM Chris Angelico wrote: >> >> Let's >> suppose that there's a vulnerability discovered in the V8 JavaScript >> interpreter (the one behind Node.js

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

2020-11-20 Thread Brendan Barnwell
On 2020-11-20 20:00, Chris Angelico wrote: Please. Before you rehash all my arguments back at me again, READ THE THREAD. I have never said that native executables shouldn't ever exist. I have never said that zipapp is the one true way to distribute code. I have never once hinted at the notion tha

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

2020-11-20 Thread Brendan Barnwell
On 2020-11-20 01:51, Steven D'Aprano wrote: If that's really what you want, you probably should look at making a way to run Python apps in the browser. Everyone has an OS, everyone has a browser, GUI browsers have similar looking look-and-feels, the days when devs assumed Internet Explorer are lo

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

2020-11-20 Thread Chris Angelico
On Sat, Nov 21, 2020 at 3:35 PM Brendan Barnwell wrote: > So let me ask this: In what circumstances do you think producing > native > executables IS a bad thing, and in what circumstances do you think it > ISN'T a bad thing, and why do you think including such functionality in > the stdli

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

2020-11-20 Thread Brendan Barnwell
On 2020-11-20 20:53, Chris Angelico wrote: On Sat, Nov 21, 2020 at 3:35 PM Brendan Barnwell wrote: > So let me ask this: In what circumstances do you think producing native >executables IS a bad thing, and in what circumstances do you think it >ISN'T a bad thing, and why do you think i

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

2020-11-20 Thread Abdur-Rahmaan Janhangeer
Greetings all, > I'm as steadfastly negative about browser apps as Chris A. is about native executables. :-) I realize this is an unpopular view, but I think the browser is a terrible app platform. It provides no user-configurable widget sets, so every app looks the way the app

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

2020-11-20 Thread Abdur-Rahmaan Janhangeer
Greetings list, > Use the simpler options until you can't use them. Then use the more complicated options. The only thing i don't trust Mr Chris on is packaging. His technical Py views are sound and great. I have the impression that concerning packaging the view is: we can do with what we have, n

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

2020-11-20 Thread Hasan Diwan
Instead of adding pyInstaller, why not link with libpython as in the embedding section of the documentation? -- H On Fri, 20 Nov 2020 at 21:25, Abdur-Rahmaan Janhangeer wrote: > Greetings list, > > > Use the simpler options until you can't use them. Then use the more > complicated options. > > T

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

2020-11-20 Thread Chris Angelico
On Sat, Nov 21, 2020 at 4:07 PM Brendan Barnwell wrote: > > On 2020-11-20 20:53, Chris Angelico wrote: > > On Sat, Nov 21, 2020 at 3:35 PM Brendan Barnwell > > wrote: > >> > So let me ask this: In what circumstances do you think producing > >> > native > >> >executables IS a bad thing,