Re: A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-09 Thread אורי via Python-list
Thank you.

Uri.
אורי
u...@speedy.net


On Tue, Jul 9, 2024 at 6:40 PM Barry Scott  wrote:

>
>
> On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨python-list@python.org⁩>
> wrote:
>
>  I tried to subscribe to Python-ideas
>
>
> These days ideas are discussed on https://discuss.python.org/
> It is rare to see an idea on the mailing list.
>
> Barry
>
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-09 Thread Barry Scott via Python-list


> On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨python-list@python.org⁩> 
> wrote:
> 
>  I tried to subscribe to Python-ideas

These days ideas are discussed on https://discuss.python.org/
It is rare to see an idea on the mailing list.

Barry


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


A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-08 Thread אורי via Python-list
Hi,

Please look at this Stack Overflow post:
https://stackoverflow.com/questions/78722378/parser-add-mutually-exclusive-group-how-can-i-set-a-default-value

1. Is there a way to add a default to parser add_mutually_exclusive_group
groups - a value that will be set by default? In this case I
want test-default-languages=True to be set as a default.

2. I tried to subscribe to Python-ideas python-id...@python.org, but I
can't login to
https://mail.python.org/mailman3/lists/python-ideas.python.org/. Although I
did login to https://mail.python.org/mailman/options/python-list . Do I
have to create a new account?

Thanks,
Uri.
אורי
u...@speedy.net
-- 
https://mail.python.org/mailman/listinfo/python-list


Request to Review: Tutorial about Python Packaging offering different use case

2023-12-13 Thread Christian Buhtz via Python-list

Hello,

I would like to point to my Python Packaging Tutorial explaining several 
common use cases using minimal demo projects.




I am not an expert and assume that some of my solutions might not be the 
best. So I would appreciate if you can review them.


Background of that project: I am member of FOSS maintainer team and 
prepare the migration of Back In Time 
(https://github.com/bit-team/backintime) from a makefile based 
build-system to a modern Python Build system using pyproject.toml & Co. 
To explore some expect able problems and possible solutions I created 
this minimal examples. I also do plan a tutorial repo about Debian 
Python Packaging using the same approach with minimal examples 
illustrating different use cases.


Thanks in advance,
Christian
--
https://mail.python.org/mailman/listinfo/python-list


Re: Request: inspect: signature & getfullargspec & getcallargs

2023-12-04 Thread Barry Scott via Python-list



> On 4 Dec 2023, at 02:29, Dom Grigonis via Python-list 
>  wrote:
> 
> Hello,
> 
> I have a request.
> 
> Would it be possible to include `follow_wrapper_chains` and `skip_bound_arg` 
> arguments to higher level functions of `inspect` module?
> 
> Would exposing them, but setting defaults to what they currently are, be 
> possible?
> 
> I sometimes need:
>   * `getcallargs`, but without `bound_arg`
>   * `getfullargspec` to `follow_wrapper_chains`
>   * `signature` to include `bound_arg`.

I suspect that you need to raise this as an idea on https://discuss.python.org/ 
to get the attention of the core devs.

Barry

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

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


Request: inspect: signature & getfullargspec & getcallargs

2023-12-03 Thread Dom Grigonis via Python-list
Hello,

I have a request.

Would it be possible to include `follow_wrapper_chains` and `skip_bound_arg` 
arguments to higher level functions of `inspect` module?

Would exposing them, but setting defaults to what they currently are, be 
possible?

I sometimes need:
* `getcallargs`, but without `bound_arg`
* `getfullargspec` to `follow_wrapper_chains`
* `signature` to include `bound_arg`.


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


[Python-announce] post to list request

2023-08-21 Thread Adam Schroeder
Hi there,
Can I please post this message to the email list.

Hi Everyone,

I'm Adam, the Community Manager at Plotly Dash - data visualizations and
data apps in Python.

To stay on top of this changing AI landscape, we recently challenged the
Plotly Community to build Dash apps that utilize the ChatGPT API. After
receiving many impressive Python apps, we are thrilled to announce that
several authors will be showcasing their top submissions on August 30.

If you're interested in seeing what Python community members were able to
build with open source, feel free to register for the live community
showcase!

https://go.plotly.com/dash-chatgpt


Thank you,
adam schroeder

-- 
Adam Schroeder
Community Manager, Plotly
A  Gaspe Ave #118, Montreal, QC, H2T 2A3
E a...@plot.ly* ­*W https://www.plotly.com/* ­*

___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-11 Thread Dennis Lee Bieber via Python-list
On Sat, 10 Jun 2023 11:32:53 -0500, Eryk Sun  declaimed
the following:

>On 6/10/23, Thomas Passin via Python-list  wrote:
>>
>> We can find pip.exe using good old-fashioned dir (we don't need any
>> new-fangled Powershell):
>>
>> C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find
>> "pip"|find "Scripts"
>
>CMD's `dir` and `for` commands support simple wildcard matching. For
>example, the following recursively searches for a file named
>"pip*.exe" under "%ProgramFiles%\Python311":
>

So far we've had examples of Python installed for current user, and
Python installed for all users /in Program Files/.

My install is for all users, but is in a top-level directory of its own
(Program Files causes problems when using pip and not remembering to open
an Admin shell).

>C:\>dir /b /s "%ProgramFiles%\Python311\pip*.exe"

So... Here are the results on my machine searching ALL of C:\

C:\Users\Owner>dir /b /s c:\pip*.exe
c:\Apps\ADW Software Modula-2\ASCII\pipedexec.exe
c:\Apps\ADW Software Modula-2\Unicode\pipedexec.exe
c:\GNAT\2019\share\gdb-8.3\python-2.7.16\Scripts\pip.exe
c:\GNAT\2019\share\gdb-8.3\python-2.7.16\Scripts\pip2.7.exe
c:\GNAT\2019\share\gdb-8.3\python-2.7.16\Scripts\pip2.exe
c:\Program Files (x86)\Common Files\Microsoft Shared\ink\pipanel.exe
c:\ProgramData\{F87E77CE-BAA2-49E1-AAE3-1F6B2704ABAA}\OFFLINE\8AFA5EE\A9DCCED0\Pipe.exe
c:\Users\All
Users\{F87E77CE-BAA2-49E1-AAE3-1F6B2704ABAA}\OFFLINE\8AFA5EE\A9DCCED0\Pipe.exe
c:\Users\Owner\AppData\Local\python\mu\mu_venv-38-20230331-155858\Scripts\pip-3.8.exe
c:\Users\Owner\AppData\Local\python\mu\mu_venv-38-20230331-155858\Scripts\pip.exe
c:\Users\Owner\AppData\Local\python\mu\mu_venv-38-20230331-155858\Scripts\pip3.8.exe
c:\Users\Owner\AppData\Local\python\mu\mu_venv-38-20230331-155858\Scripts\pip3.exe
c:\Users\Public\Programs\mblock\resources\app\mlink-v2\exec\python-env\win\Scripts\pip.exe
c:\Users\Public\Programs\mblock\resources\app\mlink-v2\exec\python-env\win\Scripts\pip3.6.exe
c:\Users\Public\Programs\mblock\resources\app\mlink-v2\exec\python-env\win\Scripts\pip3.exe
c:\Windows\WinSxS\wow64_microsoft-windows-t..acyinkingcomponents_31bf3856ad364e35_10.0.19041.1_none_023783a15d5391a7\pipanel.exe

C:\Users\Owner>

GNAT was the last AdaCore/Libre build that included the GPS IDE (I
believe AdaCore still does periodic source code releases of GPS to Linux,
putting the effort to get it working on the Linux distributions -- but that
doesn't help for Windows). Mu is an overly simplistic Python editor pushed
by AdaFruit as it is CircuitPython board-aware. MBlock is a graphical
(drag code templates, fill in any parameters) which I have for an
Arduino-powered robot vehicle.

NO pip*.exe anywhere for Python 3.10 -- and as I stated earlier in the
thread, I even ran the Python Org installer python-3.10.11-amd64.exe in
/repair/ mode; though if that just spawns off ensurepip the result does not
repair anything, as ensurepip finds the library module valid. (Maybe I
should rename the module to junk, and try again? *)

C:\Users\Owner>dir c:\p*
 Volume in drive C is Sys_OS
 Volume Serial Number is B650-6F92

 Directory of c:\

12/07/2019  05:14 AM  PerfLogs
05/16/2023  04:37 PM  Program Files
05/16/2023  04:37 PM  Program Files (x86)
04/26/2023  03:16 PM  ProgramData
01/01/2017  04:28 PM  PSFONTS
02/11/2020  02:50 PM  PSFONTS_Converted
06/08/2023  03:01 PM  Python310
   0 File(s)  0 bytes
   7 Dir(s)  1,881,417,326,592 bytes free



*
*   What a pain... Just renaming Lib\site-packages\pip =>
Lib\site-packages\pip-junk (and similar for the dist-info file) still had
ensurepip locating it. I had to /delete/ those files completely before
ensurepip would do any processing.

C:\Users\Owner>python -m ensurepip
Looking in links: c:\Users\Owner\AppData\Local\Temp\tmpfof5ikfr
Requirement already satisfied: setuptools in c:\python310\lib\site-packages
(67.6.1)
Requirement already satisfied: pip in c:\python310\lib\site-packages (junk)

C:\Users\Owner>python -m ensurepip
Looking in links: c:\Users\Owner\AppData\Local\Temp\tmpwtielpq_
Requirement already satisfied: setuptools in c:\python310\lib\site-packages
(67.6.1)
Processing
c:\users\owner\appdata\local\temp\tmpwtielpq_\pip-23.0.1-py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-23.0.1

That finally installed 

C:\Users\Owner>where pip*
C:\Python310\Scripts\pip3.10.exe
C:\Python310\Scripts\pip3.exe

(NO pip.exe, however).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Thomas Passin via Python-list

On 6/10/2023 3:20 PM, Eryk Sun wrote:

On 6/10/23, Thomas Passin via Python-list  wrote:


Yes; I didn't want to get too esoteric with commands that are hard to
figure out and remember, because then why not use Powershell, whose
commands are hard to figure out and remember?


Using `dir /s [/ad] [/b] "[path\]pattern"` with a wildcard pattern is
a simple way to recursively search for a filename or directory,
without needing to pipe the output to a findstr/grep/awk command. It's
also fast. Of course, CMD's wildcards aren't nearly as powerful as
regular expressions.


I used find to reduce the number of unwanted hits, which was helpful and 
easy to understand even if not very powerful.



The examples I included with `for` loops in CMD were for completeness
to show how to get the results in a loop variable for further
processing in a batch script. Personally, I use `for` loops a lot even
when working at the command prompt, but I'm a dinosaur in that regard.
Using PowerShell really should be preferred nowadays.


If one is doing them every day, and especially if it's for a script that 
will be reused, those loops expressions are valuable. For a one-shot 
use, and for the majority of users who (I'm sure) don't use them very 
often, they can be pretty obscure.


PowerShell has some kind of repulsive field effect on me. Plus it has an 
ugly console appearance and seems slow.  So I avoid it unless I find 
some particular case I really need it for, which is hardly ever.


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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Eryk Sun via Python-list
On 6/10/23, Thomas Passin via Python-list  wrote:
>
> Yes; I didn't want to get too esoteric with commands that are hard to
> figure out and remember, because then why not use Powershell, whose
> commands are hard to figure out and remember?

Using `dir /s [/ad] [/b] "[path\]pattern"` with a wildcard pattern is
a simple way to recursively search for a filename or directory,
without needing to pipe the output to a findstr/grep/awk command. It's
also fast. Of course, CMD's wildcards aren't nearly as powerful as
regular expressions.

The examples I included with `for` loops in CMD were for completeness
to show how to get the results in a loop variable for further
processing in a batch script. Personally, I use `for` loops a lot even
when working at the command prompt, but I'm a dinosaur in that regard.
Using PowerShell really should be preferred nowadays.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Thomas Passin via Python-list

On 6/10/2023 12:32 PM, Eryk Sun wrote:

On 6/10/23, Thomas Passin via Python-list  wrote:


We can find pip.exe using good old-fashioned dir (we don't need any
new-fangled Powershell):

C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find
"pip"|find "Scripts"


CMD's `dir` and `for` commands support simple wildcard matching. For
example, the following recursively searches for a file named
"pip*.exe" under "%ProgramFiles%\Python311":

 C:\>dir /b /s "%ProgramFiles%\Python311\pip*.exe"
 C:\Program Files\Python311\Scripts\pip.exe
 C:\Program Files\Python311\Scripts\pip3.11.exe
 C:\Program Files\Python311\Scripts\pip3.exe

 C:\>for /r "%ProgramFiles%\Python311" %f in (pip*.exe) do @(echo %f)
 C:\Program Files\Python311\Scripts\pip.exe
 C:\Program Files\Python311\Scripts\pip3.11.exe
 C:\Program Files\Python311\Scripts\pip3.exe

The following recursively searches for a directory named "pip" under
"%ProgramFiles%\Python311:

 C:\>dir /ad /b /s "%ProgramFiles%\Python311\pip"
 C:\Program Files\Python311\Lib\site-packages\pip

Or search for a directory name that starts with "pip":

 C:\>dir /ad /b /s "%ProgramFiles%\Python311\pip*"
 C:\Program Files\Python311\Lib\site-packages\pip
 C:\Program Files\Python311\Lib\site-packages\pip-22.3.1.dist-info
 C:\Program Files\Python311\Lib\site-packages\win32\Demos\pipes

With a recursive `for /r path [/d]` loop, the strings in the set have
to include wildcard characters to actually check for an existing file
or directory, else each string in the set simply gets appended to the
directory names in the recursive walk. For example, the following
recursively searches for a directory (i.e. /d) named "pip*" under
"%ProgramFiles%\Python311":

 C:\>for /r "%ProgramFiles%\Python311" /d %d in (pip*) do @(echo %d)
 C:\Program Files\Python311\Lib\site-packages\pip
 C:\Program Files\Python311\Lib\site-packages\pip-22.3.1.dist-info
 C:\Program Files\Python311\Lib\site-packages\win32\Demos\pipes

To match a specific name, you can filter the matches using an `if`
statement to compare the base filename of the loop variable (i.e.
[n]ame + e[x]tension) with the required name. For example:

 C:\>for /r "%ProgramFiles%\Python311" /d %d in (pip*) do @(
 More? if "%~nxd"=="pip" echo %d)
 C:\Program Files\Python311\Lib\site-packages\pip


Yes; I didn't want to get too esoteric with commands that are hard to 
figure out and remember, because then why not use Powershell, whose 
commands are hard to figure out and remember?


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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Eryk Sun via Python-list
On 6/10/23, Thomas Passin via Python-list  wrote:
>
> We can find pip.exe using good old-fashioned dir (we don't need any
> new-fangled Powershell):
>
> C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find
> "pip"|find "Scripts"

CMD's `dir` and `for` commands support simple wildcard matching. For
example, the following recursively searches for a file named
"pip*.exe" under "%ProgramFiles%\Python311":

C:\>dir /b /s "%ProgramFiles%\Python311\pip*.exe"
C:\Program Files\Python311\Scripts\pip.exe
C:\Program Files\Python311\Scripts\pip3.11.exe
C:\Program Files\Python311\Scripts\pip3.exe

C:\>for /r "%ProgramFiles%\Python311" %f in (pip*.exe) do @(echo %f)
C:\Program Files\Python311\Scripts\pip.exe
C:\Program Files\Python311\Scripts\pip3.11.exe
C:\Program Files\Python311\Scripts\pip3.exe

The following recursively searches for a directory named "pip" under
"%ProgramFiles%\Python311:

C:\>dir /ad /b /s "%ProgramFiles%\Python311\pip"
C:\Program Files\Python311\Lib\site-packages\pip

Or search for a directory name that starts with "pip":

C:\>dir /ad /b /s "%ProgramFiles%\Python311\pip*"
C:\Program Files\Python311\Lib\site-packages\pip
C:\Program Files\Python311\Lib\site-packages\pip-22.3.1.dist-info
C:\Program Files\Python311\Lib\site-packages\win32\Demos\pipes

With a recursive `for /r path [/d]` loop, the strings in the set have
to include wildcard characters to actually check for an existing file
or directory, else each string in the set simply gets appended to the
directory names in the recursive walk. For example, the following
recursively searches for a directory (i.e. /d) named "pip*" under
"%ProgramFiles%\Python311":

C:\>for /r "%ProgramFiles%\Python311" /d %d in (pip*) do @(echo %d)
C:\Program Files\Python311\Lib\site-packages\pip
C:\Program Files\Python311\Lib\site-packages\pip-22.3.1.dist-info
C:\Program Files\Python311\Lib\site-packages\win32\Demos\pipes

To match a specific name, you can filter the matches using an `if`
statement to compare the base filename of the loop variable (i.e.
[n]ame + e[x]tension) with the required name. For example:

C:\>for /r "%ProgramFiles%\Python311" /d %d in (pip*) do @(
More? if "%~nxd"=="pip" echo %d)
C:\Program Files\Python311\Lib\site-packages\pip
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Thomas Passin via Python-list

On 6/9/2023 1:43 PM, Dennis Lee Bieber via Python-list wrote:

On Thu, 8 Jun 2023 17:22:22 -0400, Thomas Passin 
declaimed the following:


On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote:
C:\Users\Owner>

-=-=-
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\Owner> Get-ChildItem -Path C:\Python310\ -Recurse -Name -Filter
"pip.*"
Lib\site-packages\pip
Lib\site-packages\pipenv\patched\pip
Lib\site-packages\pipenv\utils\pip.py
Lib\site-packages\pipenv\utils\__pycache__\pip.cpython-310.pyc
PS C:\Users\Owner>
-=-=-

I've just run the installer -- python-3.10.11-amd64.exe -- as admin, in
"repair" mode! There is NO pip.exe under the Python install directory.


It's in the Scripts directory:

C:\Users\tom\AppData\Local\Programs\Python\Python311\Scripts\pip3.exe


I copied the wrong line of my output - pip.exe is in the same place as 
pip3.exe.



Note that this installation was made for a single user, not "All Users"
- this is an install-time option.  For an "All Users" location (I
happened to install 3.9 for "All Users"), it does go into %PROGRAMFILES%:


I always install in "All Users" mode, but specify a directory that is
NOT under "Program Files" -- in this case, C:\Python310

The PowerShell command recurses into all subdirectories of the -path
argument. As it shows, the ONLY "pip" found is the actual library module.

PS C:\Users\Owner> Get-ChildItem -Path C:\P*\ -Recurse -Name -Filter
"pip.*"
R\R-4.2.3\library\climextRemes\pip
R\R-4.2.3\library\vICC\help\figures\pip.png
Package Cache\{5C3F818F-9EF5-444C-9386-77A0063A383A}v3.10.11150.0\pip.msi
Package Cache\{861EF849-90A5-4F4A-BAD4-479141466551}v3.10.10150.0\pip.msi
Lib\site-packages\pip
Lib\site-packages\pipenv\patched\pip
Lib\site-packages\pipenv\utils\pip.py
Lib\site-packages\pipenv\utils\__pycache__\pip.cpython-310.pyc
PS C:\Users\Owner> Get-ChildItem -Path C:\P*\ -Recurse -Name -Filter
"pip*.exe"
Common Files\Microsoft Shared\ink\pipanel.exe
{F87E77CE-BAA2-49E1-AAE3-1F6B2704ABAA}\OFFLINE\8AFA5EE\A9DCCED0\Pipe.exe
PS C:\Users\Owner>

Two variations, both now including "Program Files" (and x86),
"ProgramData", and the Python install; one looking for
"pip", the other "pipexe". Again, nothing
found except the library module.

"ensurepip" appears to only verify that the library module is installed
and does not seem to look for any .exe or other convenience access file.

PS C:\Users\Owner> python -m ensurepip
Looking in links: c:\Users\Owner\AppData\Local\Temp\tmp0cr7yu4s
Requirement already satisfied: setuptools in c:\python310\lib\site-packages
(67.6.1)
Requirement already satisfied: pip in c:\python310\lib\site-packages
(23.0.1)
PS C:\Users\Owner>


The standard python.org installs pip.exe in the Scripts directory and a 
pip folder in the Lib\site-packages directory. The pip directory does 
not include an actual file named "pip.py", but through Python invocation 
magic (involving __main__), py -m pip finds the right entry point and 
runs what you want.


We can find pip.exe using good old-fashioned dir (we don't need any 
new-fangled Powershell):


C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find 
"pip"|find "Scripts"

C:\Users\tom\AppData\Local\Programs\Python\Python310\Scripts\pip.exe
C:\Users\tom\AppData\Local\Programs\Python\Python310\Scripts\pip3.10.exe
C:\Users\tom\AppData\Local\Programs\Python\Python310\Scripts\pip3.exe
C:\Users\tom\AppData\Local\Programs\Python\Python310\Scripts\pipx.exe
C:\Users\tom\AppData\Local\Programs\Python\Python311\Scripts\pip.exe
C:\Users\tom\AppData\Local\Programs\Python\Python311\Scripts\pip3.11.exe
C:\Users\tom\AppData\Local\Programs\Python\Python311\Scripts\pip3.exe
C:\Users\tom\AppData\Local\Programs\Python\Python37\Scripts\pip.exe
C:\Users\tom\AppData\Local\Programs\Python\Python37\Scripts\pip3.10.exe
C:\Users\tom\AppData\Local\Programs\Python\Python37\Scripts\pip3.7.exe
C:\Users\tom\AppData\Local\Programs\Python\Python37\Scripts\pip3.exe

Searching for a "pip" directory:

C:\Users\tom>dir AppData\Local\Programs\Python /Ad /S /W /B |find "pip" 
|find /V "_"

C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\ensurepip
C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\site-packages\pip
C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\site-packages\pip-23.1.dist-info
C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\site-packages\pipx
C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\site-packages\pipx-1.1.0.dist-info
C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\site-packages\mypy\typeshed\stdlib\ensurepip
C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\site-packages\mypy\typeshed\stdlib\@python2\ensurepip
C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\site-packages\pipx\commands
C:\Users\tom\AppData\Local\Programs\Python\Python310\Lib\site-packages\win32\Demos\pipes

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-09 Thread Dennis Lee Bieber via Python-list
On Thu, 8 Jun 2023 17:22:22 -0400, Thomas Passin 
declaimed the following:

>On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote:
> C:\Users\Owner>
>> -=-=-
>> Windows PowerShell
>> Copyright (C) Microsoft Corporation. All rights reserved.
>> 
>> Try the new cross-platform PowerShell https://aka.ms/pscore6
>> 
>> PS C:\Users\Owner> Get-ChildItem -Path C:\Python310\ -Recurse -Name -Filter
>> "pip.*"
>> Lib\site-packages\pip
>> Lib\site-packages\pipenv\patched\pip
>> Lib\site-packages\pipenv\utils\pip.py
>> Lib\site-packages\pipenv\utils\__pycache__\pip.cpython-310.pyc
>> PS C:\Users\Owner>
>> -=-=-
>> 
>>  I've just run the installer -- python-3.10.11-amd64.exe -- as admin, in
>> "repair" mode! There is NO pip.exe under the Python install directory.
>
>It's in the Scripts directory:
>
>C:\Users\tom\AppData\Local\Programs\Python\Python311\Scripts\pip3.exe
>
>Note that this installation was made for a single user, not "All Users" 
>- this is an install-time option.  For an "All Users" location (I 
>happened to install 3.9 for "All Users"), it does go into %PROGRAMFILES%:
>
I always install in "All Users" mode, but specify a directory that is
NOT under "Program Files" -- in this case, C:\Python310

The PowerShell command recurses into all subdirectories of the -path
argument. As it shows, the ONLY "pip" found is the actual library module.

PS C:\Users\Owner> Get-ChildItem -Path C:\P*\ -Recurse -Name -Filter
"pip.*"
R\R-4.2.3\library\climextRemes\pip
R\R-4.2.3\library\vICC\help\figures\pip.png
Package Cache\{5C3F818F-9EF5-444C-9386-77A0063A383A}v3.10.11150.0\pip.msi
Package Cache\{861EF849-90A5-4F4A-BAD4-479141466551}v3.10.10150.0\pip.msi
Lib\site-packages\pip
Lib\site-packages\pipenv\patched\pip
Lib\site-packages\pipenv\utils\pip.py
Lib\site-packages\pipenv\utils\__pycache__\pip.cpython-310.pyc
PS C:\Users\Owner> Get-ChildItem -Path C:\P*\ -Recurse -Name -Filter
"pip*.exe"
Common Files\Microsoft Shared\ink\pipanel.exe
{F87E77CE-BAA2-49E1-AAE3-1F6B2704ABAA}\OFFLINE\8AFA5EE\A9DCCED0\Pipe.exe
PS C:\Users\Owner>

Two variations, both now including "Program Files" (and x86),
"ProgramData", and the Python install; one looking for
"pip", the other "pipexe". Again, nothing
found except the library module.

"ensurepip" appears to only verify that the library module is installed
and does not seem to look for any .exe or other convenience access file.

PS C:\Users\Owner> python -m ensurepip
Looking in links: c:\Users\Owner\AppData\Local\Temp\tmp0cr7yu4s
Requirement already satisfied: setuptools in c:\python310\lib\site-packages
(67.6.1)
Requirement already satisfied: pip in c:\python310\lib\site-packages
(23.0.1)
PS C:\Users\Owner>

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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-09 Thread Gisle Vanem via Python-list

Dennis Lee Bieber wrote:


Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\Owner> Get-ChildItem -Path C:\Python310\ -Recurse -Name -Filter
"pip.*"


Tried it. Oh man what a slow process:
  sync & timer &
  pwsh -Command Get-ChildItem -Path F:\gv\Python310\ -Recurse -Name -Filter "pip.*" 
&
  timer

  (15 results stripped). Completed in 12.44 sec!

As opposed to my own Envtool:
  sync & timer &
  envtool.exe --evry pip.* | grep "Python310" &
  timer

  (15 results stripped) Completed in 0.57 sec!

But I have 5 GByte of stuff under 'f:\gv\Python310\'

Envtool is at https://github.com/gvanem/Envtool
Works best together with the amazing EveryThing search engine
by David Carpenter at https://www.voidtools.com

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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Thomas Passin via Python-list

On 6/8/2023 6:23 PM, Eryk Sun wrote:

on 6/8/23, Thomas Passin via Python-list  wrote:


It always gets installed, though.


By default, the option to install pip is enabled. It's implemented by
executing ensurepip after the interpreter is installed. However,
ensurepip may silently fail during installation. As a CPython triager
I've come across this problem a couple of times, but it should be
rare. It can possibly be resolved by manually executing ensurepip via
the following command:

 py [-3[.X]] -m ensurepip --default-pip --upgrade --verbose

If Python is installed for all users, the latter should be executed
from a shell that has administrator access. Even if this command also
fails, the verbose output in the console may be helpful to further
diagnose the problem.


Hah! I *knew* someone would come up with an exceptional case.  It would 
be pretty hard for an ordinary user to know about this encantation or 
make progress if something does go wrong.   Lucky for me I've always had 
the python.org installer work smoothly.


"By default, the option to install pip is enabled" - Why would someone 
opt not to install pip, though?  Would that be an attempt to prevent 
users from installing packages on their own?



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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Eryk Sun via Python-list
On 6/8/23, Thomas Passin via Python-list  wrote:
>
> It always gets installed, though.

By default, the option to install pip is enabled. It's implemented by
executing ensurepip after the interpreter is installed. However,
ensurepip may silently fail during installation. As a CPython triager
I've come across this problem a couple of times, but it should be
rare. It can possibly be resolved by manually executing ensurepip via
the following command:

py [-3[.X]] -m ensurepip --default-pip --upgrade --verbose

If Python is installed for all users, the latter should be executed
from a shell that has administrator access. Even if this command also
fails, the verbose output in the console may be helpful to further
diagnose the problem.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Thomas Passin via Python-list

On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote:

On Wed, 7 Jun 2023 10:36:22 -0600, Mats Wichmann 
declaimed the following:



I'm assuming you checked - say, with Explorer - that pip.exe really is
where you think it is?
Anyway,  if you ask a Windows shell (cmd) to locate it, and it doesn't,
then your PATH is not set up correctly after all.

where pip

should give you back a path that ends witn ...\Scripts\pip.exe



I'm having a suspicion that recent Windows installers are not including
a pip.exe...

-=-=-
C:\Users\Owner>echo %path%
C:\Python310\Scripts\;C:\Python310\;C:\Python310\Tools\Scripts;C:\Program
Files\PuTTY\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program
Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common
Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common
Files\Acronis\FileProtector\;C:\Program Files (x86)\Common
Files\Acronis\FileProtector64\;C:\Program Files (x86)\Common
Files\Acronis\SnapAPI\;C:\Program Files\ooRexx;C:\Program
Files\rexx.org\Regina;C:\Program Files\Microchip\xc8\v2.41\bin;C:\Program
Files\Microchip\xc8\v2.36\bin;C:\Program
Files\Microchip\xc16\v2.00\bin;C:\Program
Files\Microchip\xc32\v4.21\bin;C:\Program Files\Microsoft VS
Code\bin;C:\Program Files\dotnet\;C:\Program Files\TortoiseHg\;C:\Program
Files\Calibre2\;C:\Program Files\Microsoft SQL
Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client
SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\IVI
Foundation\VISA\WinNT\Bin\;C:\Users\Owner\AppData\Local\Microsoft\WindowsApps;C:\Program
Files\JetBrains\PyCharm Community Edition
2021.1.2\bin;;C:\Users\Owner\.dotnet\tools

C:\Users\Owner>where pip.*
INFO: Could not find files for the given pattern(s).

C:\Users\Owner>
-=-=-
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\Owner> Get-ChildItem -Path C:\Python310\ -Recurse -Name -Filter
"pip.*"
Lib\site-packages\pip
Lib\site-packages\pipenv\patched\pip
Lib\site-packages\pipenv\utils\pip.py
Lib\site-packages\pipenv\utils\__pycache__\pip.cpython-310.pyc
PS C:\Users\Owner>
-=-=-

I've just run the installer -- python-3.10.11-amd64.exe -- as admin, in
"repair" mode! There is NO pip.exe under the Python install directory.


It's in the Scripts directory:

C:\Users\tom\AppData\Local\Programs\Python\Python311\Scripts\pip3.exe

Note that this installation was made for a single user, not "All Users" 
- this is an install-time option.  For an "All Users" location (I 
happened to install 3.9 for "All Users"), it does go into %PROGRAMFILES%:


C:\Program Files\Python39\Scripts\pip.exe

Whether this directory ends up on the PATH depends on a user option 
during installation. That's one among several reasons to invoke pip with 
py -m pip.


It always gets installed, though.


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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Dennis Lee Bieber via Python-list
On Wed, 7 Jun 2023 10:36:22 -0600, Mats Wichmann 
declaimed the following:


>I'm assuming you checked - say, with Explorer - that pip.exe really is 
>where you think it is?
>Anyway,  if you ask a Windows shell (cmd) to locate it, and it doesn't, 
>then your PATH is not set up correctly after all.
>
>where pip
>
>should give you back a path that ends witn ...\Scripts\pip.exe
>

I'm having a suspicion that recent Windows installers are not including
a pip.exe...

-=-=-
C:\Users\Owner>echo %path%
C:\Python310\Scripts\;C:\Python310\;C:\Python310\Tools\Scripts;C:\Program
Files\PuTTY\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program
Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common
Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common
Files\Acronis\FileProtector\;C:\Program Files (x86)\Common
Files\Acronis\FileProtector64\;C:\Program Files (x86)\Common
Files\Acronis\SnapAPI\;C:\Program Files\ooRexx;C:\Program
Files\rexx.org\Regina;C:\Program Files\Microchip\xc8\v2.41\bin;C:\Program
Files\Microchip\xc8\v2.36\bin;C:\Program
Files\Microchip\xc16\v2.00\bin;C:\Program
Files\Microchip\xc32\v4.21\bin;C:\Program Files\Microsoft VS
Code\bin;C:\Program Files\dotnet\;C:\Program Files\TortoiseHg\;C:\Program
Files\Calibre2\;C:\Program Files\Microsoft SQL
Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client
SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\IVI
Foundation\VISA\WinNT\Bin\;C:\Users\Owner\AppData\Local\Microsoft\WindowsApps;C:\Program
Files\JetBrains\PyCharm Community Edition
2021.1.2\bin;;C:\Users\Owner\.dotnet\tools

C:\Users\Owner>where pip.*
INFO: Could not find files for the given pattern(s).

C:\Users\Owner>
-=-=-
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\Owner> Get-ChildItem -Path C:\Python310\ -Recurse -Name -Filter
"pip.*"
Lib\site-packages\pip
Lib\site-packages\pipenv\patched\pip
Lib\site-packages\pipenv\utils\pip.py
Lib\site-packages\pipenv\utils\__pycache__\pip.cpython-310.pyc
PS C:\Users\Owner>
-=-=-

I've just run the installer -- python-3.10.11-amd64.exe -- as admin, in
"repair" mode! There is NO pip.exe under the Python install directory.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Eryk Sun via Python-list
On 6/7/23, Thomas Passin via Python-list  wrote:
> On 6/7/2023 6:28 PM, Eryk Sun wrote:
>
>> That won't be of any help if pip isn't installed. By default, Python's
>> installer attempts to install pip by running the ensurepip package,
>> but sometimes it fails. It can help to try to manually run ensurepip
>> in the shell. For example:
>>
>>  py -m ensurepip --default-pip --upgrade --verbose
>
> Yes, but why should anyone besides the OP think pip isn't installed? Let
> him try py -m pip.  If pip isn't installed he will see something like

I didn't mean to imply that the OP shouldn't first try to run `py -m
pip` or `py -3.10 -m pip`.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Thomas Passin via Python-list

On 6/7/2023 6:28 PM, Eryk Sun wrote:

On 6/7/23, Thomas Passin via Python-list  wrote:


You have by now seen several responses, and the one most likely to be
helpful is to run pip with

py -m pip


That won't be of any help if pip isn't installed. By default, Python's
installer attempts to install pip by running the ensurepip package,
but sometimes it fails. It can help to try to manually run ensurepip
in the shell. For example:

 py -m ensurepip --default-pip --upgrade --verbose


Yes, but why should anyone besides the OP think pip isn't installed? Let 
him try py -m pip.  If pip isn't installed he will see something like


C:\Users\tom\AppData\Local\Programs\Python\Python311\python.exe: No 
module named pip


Then ensurepip should take care of it. Otherwise it's just that he 
hasn't tried the one thing that will certainly work as expected if pip 
is present.

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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Eryk Sun via Python-list
On 6/7/23, Thomas Passin via Python-list  wrote:
>
> You have by now seen several responses, and the one most likely to be
> helpful is to run pip with
>
> py -m pip

That won't be of any help if pip isn't installed. By default, Python's
installer attempts to install pip by running the ensurepip package,
but sometimes it fails. It can help to try to manually run ensurepip
in the shell. For example:

py -m ensurepip --default-pip --upgrade --verbose
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Thomas Passin via Python-list

On 6/7/2023 10:54 AM, Florian Guilbault via Python-list wrote:

Dear Python Technical Team,

I hope this email finds you well. I am reaching out to you today to seek
assistance with an issue I am facing regarding the installation of 'pip'
despite my numerous attempts to resolve the problem.

Recently, I performed installation, uninstallation, and even repair
operations on Python 3.10 on my computer. However, I have noticed that
'pip' has never been installed successfully. When I check via the command
prompt, I receive the following error: "'pip' is not recognized as an
internal or external command, operable program, or batch file."

I have tried several approaches to resolve this issue. I have verified that
the PATH environment variable is correctly configured to include the path
to the Python Scripts directory. I have also attempted to run the
'get-pip.py' installation script from the command line, but it did not work
either.

I am aware that 'pip' is typically installed automatically with Python, but
I am encountering this persistent difficulty. Therefore, I would like to
request your assistance and expertise in resolving this 'pip' installation
issue. I would like to be able to use 'pip' to manage my Python packages
efficiently.

I am open to any suggestions and steps you can provide to help me resolve
this problem. Please note that I am a user on the Windows operating system.

Thank you sincerely for your attention and support. I eagerly await your
guidance to resolve this situation.


You have by now seen several responses, and the one most likely to be 
helpful is to run pip with


py -m pip

I would like to suggest some ways you can make it more likely that  you 
will get useful suggestions in the future.  Basically, please fill in 
details about your situation.


1. Say what operating system your computer is running.  All the 
responses so far have assumed that it is some version of Windows.  This 
may or may not be correct.  We can infer it in this case from the 
message you reported ("'pip' is not recognized as an internal or 
external command, operable program, or batch file."), but you should say 
so that we don't need to guess.


2. Since this question is about your python installation, say how you 
installed it, since there are several possibilities.  For example, you 
may have used the installer from python.org, you may have installed it 
from the Microsoft store, etc.  These different installations are not 
always the same.


3.  When you wrote that you "verified that the PATH environment variable 
is correctly configured to include the path to the Python Scripts 
directory", tell us what that PATH actually is, not just that it is 
"correct".  We don't know if your idea of "correct" matches ours.


4.  Say how you tried to run programs that appeared to fail - running 
"python" in a console may launch a different version from the one you 
expect.  On Windows, running "py" will run the most recent one.


BTW, my own python.org installation of Python 3.11 on Windows 10 does 
not include a get-pip.exe or a get-pip.py in its Python311\Scripts 
directory (not that it was needed).


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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Mats Wichmann via Python-list

On 6/7/23 10:08, MRAB via Python-list wrote:

On 2023-06-07 15:54, Florian Guilbault via Python-list wrote:

Dear Python Technical Team,

I hope this email finds you well. I am reaching out to you today to seek
assistance with an issue I am facing regarding the installation of 'pip'
despite my numerous attempts to resolve the problem.

Recently, I performed installation, uninstallation, and even repair
operations on Python 3.10 on my computer. However, I have noticed that
'pip' has never been installed successfully. When I check via the command
prompt, I receive the following error: "'pip' is not recognized as an
internal or external command, operable program, or batch file."

I have tried several approaches to resolve this issue. I have verified 
that

the PATH environment variable is correctly configured to include the path
to the Python Scripts directory. 


I'm assuming you checked - say, with Explorer - that pip.exe really is 
where you think it is?
Anyway,  if you ask a Windows shell (cmd) to locate it, and it doesn't, 
then your PATH is not set up correctly after all.


where pip

should give you back a path that ends witn ...\Scripts\pip.exe

That said, the suggestions already given are on point.  Running pip as a 
module (rather than as a standalone command) assures that it's 
associated with the Python you want it associated with.  In today's 
world, a lot of developer systems end up with multiple Python 
installations (*), and you don't want to use a pip that is bound to the 
wrong one, or the next email will be "I installed foo module but my 
Python fails to import it".


(*) You can have different Python versions for compat checking, you can 
have project-specific virtualenvs, you can have Pythons that come 
bundled with a subsystem like Conda, etc.



On Windows, it's recommended to use the Python Launcher and the pip module:

py -m pip install whatever



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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread MRAB via Python-list

On 2023-06-07 15:54, Florian Guilbault via Python-list wrote:

Dear Python Technical Team,

I hope this email finds you well. I am reaching out to you today to seek
assistance with an issue I am facing regarding the installation of 'pip'
despite my numerous attempts to resolve the problem.

Recently, I performed installation, uninstallation, and even repair
operations on Python 3.10 on my computer. However, I have noticed that
'pip' has never been installed successfully. When I check via the command
prompt, I receive the following error: "'pip' is not recognized as an
internal or external command, operable program, or batch file."

I have tried several approaches to resolve this issue. I have verified that
the PATH environment variable is correctly configured to include the path
to the Python Scripts directory. I have also attempted to run the
'get-pip.py' installation script from the command line, but it did not work
either.

I am aware that 'pip' is typically installed automatically with Python, but
I am encountering this persistent difficulty. Therefore, I would like to
request your assistance and expertise in resolving this 'pip' installation
issue. I would like to be able to use 'pip' to manage my Python packages
efficiently.

I am open to any suggestions and steps you can provide to help me resolve
this problem. Please note that I am a user on the Windows operating system.

Thank you sincerely for your attention and support. I eagerly await your
guidance to resolve this situation.


On Windows, it's recommended to use the Python Launcher and the pip module:

py -m pip install whatever

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


Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Barry via Python-list


> On 7 Jun 2023, at 16:39, Florian Guilbault via Python-list 
>  wrote:
> 
> Dear Python Technical Team,
> 
> I hope this email finds you well. I am reaching out to you today to seek
> assistance with an issue I am facing regarding the installation of 'pip'
> despite my numerous attempts to resolve the problem.
> 
> Recently, I performed installation, uninstallation, and even repair
> operations on Python 3.10 on my computer. However, I have noticed that
> 'pip' has never been installed successfully. When I check via the command
> prompt, I receive the following error: "'pip' is not recognized as an
> internal or external command, operable program, or batch file."
> 
> I have tried several approaches to resolve this issue. I have verified that
> the PATH environment variable is correctly configured to include the path
> to the Python Scripts directory. I have also attempted to run the
> 'get-pip.py' installation script from the command line, but it did not work
> either.
> 
> I am aware that 'pip' is typically installed automatically with Python, but
> I am encountering this persistent difficulty. Therefore, I would like to
> request your assistance and expertise in resolving this 'pip' installation
> issue. I would like to be able to use 'pip' to manage my Python packages
> efficiently.
> 
> I am open to any suggestions and steps you can provide to help me resolve
> this problem. Please note that I am a user on the Windows operating system.
> 
> Thank you sincerely for your attention and support. I eagerly await your
> guidance to resolve this situation.

You can run pip like this, that works with needing to mess with your PATH.

py -m pip

Barty


> 
> Best regards,
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

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


Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Florian Guilbault via Python-list
Dear Python Technical Team,

I hope this email finds you well. I am reaching out to you today to seek
assistance with an issue I am facing regarding the installation of 'pip'
despite my numerous attempts to resolve the problem.

Recently, I performed installation, uninstallation, and even repair
operations on Python 3.10 on my computer. However, I have noticed that
'pip' has never been installed successfully. When I check via the command
prompt, I receive the following error: "'pip' is not recognized as an
internal or external command, operable program, or batch file."

I have tried several approaches to resolve this issue. I have verified that
the PATH environment variable is correctly configured to include the path
to the Python Scripts directory. I have also attempted to run the
'get-pip.py' installation script from the command line, but it did not work
either.

I am aware that 'pip' is typically installed automatically with Python, but
I am encountering this persistent difficulty. Therefore, I would like to
request your assistance and expertise in resolving this 'pip' installation
issue. I would like to be able to use 'pip' to manage my Python packages
efficiently.

I am open to any suggestions and steps you can provide to help me resolve
this problem. Please note that I am a user on the Windows operating system.

Thank you sincerely for your attention and support. I eagerly await your
guidance to resolve this situation.

Best regards,
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-10 Thread Thomas Passin

On 4/10/2023 2:19 AM, Yogesh Tirthkar wrote:

Hello,

Thank you for your response.

May I know how to uninstall it from user A profile – if user A is no longer 
available.

Is there any means - where I can use local admin account to uninstall the app 
(installed in User A profile, without user A’s intervention)


If user A is no longer available, then an administrator can change the 
password for User A and then, logged into the A account, perform the 
un-install.




From: Sravan Kumar Chitikesi 
Sent: Monday, April 10, 2023 2:17 PM
To: Yogesh Tirthkar 
Cc: python-list@python.org
Subject: Re: [Request for Assistance] To uninstall python installed in other 
user profile (Win 10)

[cid:image001.png@01D96BB7.7B62F3D0]

If Python was installed by user A in their own profile folder, it is likely 
that it was installed just for that user. In this case, you may need to log in 
as user A to uninstall Python from their profile. Have you tried logging in as 
user A and uninstalling Python from there?

Regards,
Sravan Chitikesi
AWS Solutions Architect - Associate


On Tue, Mar 28, 2023 at 11:30 AM Yogesh Tirthkar 
mailto:yogeshtirthkar-ven...@gic.com.sg>> 
wrote:
Hi Team,

Could you please advise on the scenario in windows 10 machine : Where we need 
to uninstall/remove python from user profile A (installed by user A in its own 
profile folder) - via an admin user or system account.

Currently when we try to uninstall it via admin/system account - it displays 
that the python product is not installed for this user (admin/system).



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


Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-10 Thread Sravan Kumar Chitikesi
If Python was installed by user A in their own profile folder, it is likely
that it was installed just for that user. In this case, you may need to log
in as user A to uninstall Python from their profile. Have you tried logging
in as user A and uninstalling Python from there?

Regards,
*Sravan Chitikesi*
AWS Solutions Architect - Associate


On Tue, Mar 28, 2023 at 11:30 AM Yogesh Tirthkar <
yogeshtirthkar-ven...@gic.com.sg> wrote:

> Hi Team,
>
> Could you please advise on the scenario in windows 10 machine : Where we
> need to uninstall/remove python from user profile A (installed by user A in
> its own profile folder) - via an admin user or system account.
>
> Currently when we try to uninstall it via admin/system account - it
> displays that the python product is not installed for this user
> (admin/system).
>
> Appreciate your assistance.
>
>
> Regards,
> Yogesh.
>
> _
> Technology Group | GIC Private Limited | 168 Robinson Road, #37-01,
> Capital Tower, Singapore 068912
>
>
> This email from GIC may contain confidential information. Unauthorised
> communication and disclosure of any information in this email is
> prohibited. If you are not the intended recipient, please notify the sender
> and delete this email immediately.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-10 Thread Yogesh Tirthkar
Hello,

Thank you for your response.

May I know how to uninstall it from user A profile – if user A is no longer 
available.

Is there any means - where I can use local admin account to uninstall the app 
(installed in User A profile, without user A’s intervention)

Regards,
Yogesh.

From: Sravan Kumar Chitikesi 
Sent: Monday, April 10, 2023 2:17 PM
To: Yogesh Tirthkar 
Cc: python-list@python.org
Subject: Re: [Request for Assistance] To uninstall python installed in other 
user profile (Win 10)

[cid:image001.png@01D96BB7.7B62F3D0]

If Python was installed by user A in their own profile folder, it is likely 
that it was installed just for that user. In this case, you may need to log in 
as user A to uninstall Python from their profile. Have you tried logging in as 
user A and uninstalling Python from there?

Regards,
Sravan Chitikesi
AWS Solutions Architect - Associate


On Tue, Mar 28, 2023 at 11:30 AM Yogesh Tirthkar 
mailto:yogeshtirthkar-ven...@gic.com.sg>> 
wrote:
Hi Team,

Could you please advise on the scenario in windows 10 machine : Where we need 
to uninstall/remove python from user profile A (installed by user A in its own 
profile folder) - via an admin user or system account.

Currently when we try to uninstall it via admin/system account - it displays 
that the python product is not installed for this user (admin/system).

Appreciate your assistance.


Regards,
Yogesh.
_
Technology Group | GIC Private Limited | 168 Robinson Road, #37-01, Capital 
Tower, Singapore 068912


This email from GIC may contain confidential information. Unauthorised 
communication and disclosure of any information in this email is prohibited. If 
you are not the intended recipient, please notify the sender and delete this 
email immediately.
--
https://mail.python.org/mailman/listinfo/python-list

This email from GIC may contain confidential information. Unauthorised 
communication and disclosure of any information in this email is prohibited. If 
you are not the intended recipient, please notify the sender and delete this 
email immediately.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-10 Thread Thomas Passin

On 4/9/2023 10:14 PM, Yogesh Tirthkar wrote:

Hi,

Is there any way I can uninstall python installed (as user) in someone else' 
account - without login as that user, but login as local admin ?


It depends on whether you can use that user's password. With the 
password, it's very feasible.  Without it, some people seem to have 
found ways.  There some discussion of this here -


https://serverfault.com/questions/773038/run-as-a-different-user-without-a-password-from-an-elevated-prompt-in-windows


Technology Group | GIC Private Limited | 168 Robinson Road, #37-01, Capital 
Tower, Singapore 068912

-Original Message-
From: Python-list 
 On Behalf Of 
Thomas Passin
Sent: Wednesday, March 29, 2023 12:19 AM
To: python-list@python.org
Subject: Re: [Request for Assistance] To uninstall python installed in other 
user profile (Win 10)

[[External Mail] Do not click on links or attachment from unknown senders.]


On 3/28/2023 12:56 AM, Yogesh Tirthkar wrote:

Hi Team,

Could you please advise on the scenario in windows 10 machine : Where we need 
to uninstall/remove python from user profile A (installed by user A in its own 
profile folder) - via an admin user or system account.

Currently when we try to uninstall it via admin/system account - it displays 
that the python product is not installed for this user (admin/system).

Appreciate your assistance.


It depends on where the Python installation is located, but I would just delete 
the entire folder tree at %APPDATA%\Python\Python3xxx.

If Python was installed for all users, its main set of files will probably be in "c:\Program 
Files" and Window's "Add or Remove" page should remove it.

If it was installed just for User A, then the "Add or Remove" page will find it if run 
from User A's account.  If for some reason User A will not or cannot cooperate, the admin could 
change User A's password and then run "Add or Remove".  Of course the admin would not be 
able to change the pw back, but if User A is not cooperating maybe that wouldn't matter.

--
https://mail.python.org/mailman/listinfo/python-list
This email from GIC may contain confidential information. Unauthorised 
communication and disclosure of any information in this email is prohibited. If 
you are not the intended recipient, please notify the sender and delete this 
email immediately.



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


RE: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-09 Thread Yogesh Tirthkar
Hi,

Is there any way I can uninstall python installed (as user) in someone else' 
account - without login as that user, but login as local admin ?

Regards,
Yogesh.
_
Technology Group | GIC Private Limited | 168 Robinson Road, #37-01, Capital 
Tower, Singapore 068912

-Original Message-
From: Python-list 
 On Behalf Of 
Thomas Passin
Sent: Wednesday, March 29, 2023 12:19 AM
To: python-list@python.org
Subject: Re: [Request for Assistance] To uninstall python installed in other 
user profile (Win 10)

[[External Mail] Do not click on links or attachment from unknown senders.]


On 3/28/2023 12:56 AM, Yogesh Tirthkar wrote:
> Hi Team,
>
> Could you please advise on the scenario in windows 10 machine : Where we need 
> to uninstall/remove python from user profile A (installed by user A in its 
> own profile folder) - via an admin user or system account.
>
> Currently when we try to uninstall it via admin/system account - it displays 
> that the python product is not installed for this user (admin/system).
>
> Appreciate your assistance.

It depends on where the Python installation is located, but I would just delete 
the entire folder tree at %APPDATA%\Python\Python3xxx.

If Python was installed for all users, its main set of files will probably be 
in "c:\Program Files" and Window's "Add or Remove" page should remove it.

If it was installed just for User A, then the "Add or Remove" page will find it 
if run from User A's account.  If for some reason User A will not or cannot 
cooperate, the admin could change User A's password and then run "Add or 
Remove".  Of course the admin would not be able to change the pw back, but if 
User A is not cooperating maybe that wouldn't matter.

--
https://mail.python.org/mailman/listinfo/python-list
This email from GIC may contain confidential information. Unauthorised 
communication and disclosure of any information in this email is prohibited. If 
you are not the intended recipient, please notify the sender and delete this 
email immediately.

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


Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-03-28 Thread Thomas Passin

On 3/28/2023 12:56 AM, Yogesh Tirthkar wrote:

Hi Team,

Could you please advise on the scenario in windows 10 machine : Where we need 
to uninstall/remove python from user profile A (installed by user A in its own 
profile folder) - via an admin user or system account.

Currently when we try to uninstall it via admin/system account - it displays 
that the python product is not installed for this user (admin/system).

Appreciate your assistance.


It depends on where the Python installation is located, but I would just 
delete the entire folder tree at %APPDATA%\Python\Python3xxx.


If Python was installed for all users, its main set of files will 
probably be in "c:\Program Files" and Window's "Add or Remove" page 
should remove it.


If it was installed just for User A, then the "Add or Remove" page will 
find it if run from User A's account.  If for some reason User A will 
not or cannot cooperate, the admin could change User A's password and 
then run "Add or Remove".  Of course the admin would not be able to 
change the pw back, but if User A is not cooperating maybe that wouldn't 
matter.


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


[Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-03-28 Thread Yogesh Tirthkar
Hi Team,

Could you please advise on the scenario in windows 10 machine : Where we need 
to uninstall/remove python from user profile A (installed by user A in its own 
profile folder) - via an admin user or system account.

Currently when we try to uninstall it via admin/system account - it displays 
that the python product is not installed for this user (admin/system).

Appreciate your assistance.


Regards,
Yogesh.
_
Technology Group | GIC Private Limited | 168 Robinson Road, #37-01, Capital 
Tower, Singapore 068912


This email from GIC may contain confidential information. Unauthorised 
communication and disclosure of any information in this email is prohibited. If 
you are not the intended recipient, please notify the sender and delete this 
email immediately.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Help Request] Embedding Python in a CPP Application Responsibly & Functionally

2023-01-26 Thread Dieter Maurer
John McCardle wrote at 2023-1-25 22:31 -0500:
> ...
>1) To get the compiled Python to run independently, I have to hack
>LD_LIBRARY_PATH to get it to execute. `LD_LIBRARY_PATH=./Python-3.11.1
>./Python-3.11.1/python` .

The need to set `LD_LIBRARY_PATH` usually can be avoided via
a link time option: it tells the linker to add library path
information into the created shared object.

Read the docs to find out which option this is (I think it
was `-r` but I am not sure).

>Even when trying to execute from the same
>directory as the binary & executable, I get an error, `/python: error
>while loading shared libraries: libpython3.11.so.1.0: cannot open shared
>object file: No such file or directory`.

It might be necessary, to provide the option mentioned above
for all shared libraries involved in your final application.

Alternatively, you could try to put the shared objects
into a stadard place (searched by default).

>2) When running the C++ program that embeds Python, I see these messages
>after initializing:
>`Could not find platform independent libraries 
>Could not find platform dependent libraries `

Again: either put your installation in a standard place
or tell the Python generation process about your non-standard place.


>This is seemingly connected to some issues regarding libraries: When I
>run the Python interpreter directly, I can get some of the way through
>the process of creating a virtual environment, but it doesn't seem to
>leave me with a working pip:
>
>`$ LD_LIBRARY_PATH=./Python-3.11.1 ./Python-3.11.1/python
> >>> import venv
> >>> venv.create("./venv", with_pip=True)
>subprocess.CalledProcessError: Command
>'['/home/john/Development/7DRL/cpp_embedded_python/venv/bin/python',
>'-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit
>status 127.`

Run the command manually and see what errors this gives.

> ...

>3) I'm not sure I even need to be statically linking the interpreter.

There should be no need (if all you want in the embedding).
-- 
https://mail.python.org/mailman/listinfo/python-list


[Help Request] Embedding Python in a CPP Application Responsibly & Functionally

2023-01-25 Thread John McCardle

Greetings,

I'm working on embedding a Python interpreter into a C++ application. My 
embedding example program is here, largely taken from Python docs: 
https://gist.github.com/jmccardle/f3f19d3753ae023aa52b927f0d181c43


I'm simply not interested in writing in Lua, so regardless of any 
particular downsides like `sys` in the standard library or performance 
issues, I'm committed to Python itself as what I want to hack in. This 
is for fun.


I started by compiling Python:

`./configure --enable-shared --enable-optimizations`

Then I can compile my example embedded program:

`g++ -I Python-3.11.1/Include -I Python-3.11.1 -L Python-3.11.1 -pthread 
scripting_engine.cpp libpython3.11.a -o scripteng -lm -ldl -lutil`


This is working not so bad! I can control what C++ functionality is 
exposed and I seemingly don't need anything but the Python shared object 
to execute. But the finer details of making this work truly correctly 
are eluding me.


1) To get the compiled Python to run independently, I have to hack 
LD_LIBRARY_PATH to get it to execute. `LD_LIBRARY_PATH=./Python-3.11.1 
./Python-3.11.1/python` . Even when trying to execute from the same 
directory as the binary & executable, I get an error, `/python: error 
while loading shared libraries: libpython3.11.so.1.0: cannot open shared 
object file: No such file or directory`.


2) When running the C++ program that embeds Python, I see these messages 
after initializing:

`Could not find platform independent libraries 
Could not find platform dependent libraries `

This is seemingly connected to some issues regarding libraries: When I 
run the Python interpreter directly, I can get some of the way through 
the process of creating a virtual environment, but it doesn't seem to 
leave me with a working pip:


`$ LD_LIBRARY_PATH=./Python-3.11.1 ./Python-3.11.1/python
>>> import venv
>>> venv.create("./venv", with_pip=True)
subprocess.CalledProcessError: Command 
'['/home/john/Development/7DRL/cpp_embedded_python/venv/bin/python', 
'-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit 
status 127.`


Meanwhile, if I try to run a script from the C++ program that includes 
`import venv`, I get a traceback about a platform library:


`Traceback (most recent call last):
  File "engine_user.py", line 7, in 
    import venv
  File 
"/home/john/Development/7DRL/cpp_embedded_python/Python-3.11.1/Lib/venv/__init__.py", 
line 10, in 

    import subprocess
  File 
"/home/john/Development/7DRL/cpp_embedded_python/Python-3.11.1/Lib/subprocess.py", 
line 104, in 

    from _posixsubprocess import fork_exec as _fork_exec
ModuleNotFoundError: No module named '_posixsubprocess'
`

3) I'm not sure I even need to be statically linking the interpreter.

My desired end state is this:
* Deploy a C++ program that doesn't rely on a system Python. I'm not 
sure if I need just the shared object / DLLs, or a Python executable in 
a subdirectory - I'd like to "do it the right way".
* C++ program can run a script to create a virtual environment, which 
the embedded Python environment will use. Users can activate the venv 
like any other Python environment and install packages with pip.
* ideally, some sort of "inside-out" runnable mode, where the API 
exposed by the C++ executable is available in that venv, so that I can 
test a script in Thonny or other IDE. I think I'd do this by providing a 
separate test-mode library in the venv, and when C++ executes 
`PyImport_AppendInittab("scriptable", _scriptable);` then the 
module of the same name should be overwritten with the C++ program's 
functionality.


I've been through the embedded programming docs a bit, and they seem 
quite good as a reference, but I don't know what I'm doing well enough 
to solve my problems using them. Thanks for reading.


My ultimate goal is to expose features written in C++ for a game engine 
using SFML, and run .py files in a subdirectory to generate maps, 
control NPC dialogue and actions, etc. I'm hoping to have something 
usable for this year's 7DRL, which starts March 4th. I'd like to spend 
the time until then getting this engine working smoothly and porting it 
to Windows, so I can focus exclusively on "game content" for the 
timeboxed 7-day portion.


Kind Regards,
-John McCardle

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


Re: Request for assistance (hopefully not OT)

2022-05-21 Thread Michael Torrie
On 5/21/22 06:19, o1bigtenor wrote:
> more useful - - - - well - - - - I don't have to wonder why 'linux' is
> used as much
> by the general populace as it is. The community likes to destroy
> itself - - - it
> is a pity - - - - the community has so much to offer.

As far as community goes, the Linux community (whatever that might refer
to) is pretty typical of all communities, including communities that
surround proprietary systems like Windows. For those that realize that
communication is two-way and individual effort is required, the
community is a wonderful resource of help and support.  For those that
approach it with impatience and demands for support without evidence of
individual effort, community members respond with much less alacrity.
This is true of *all* communities of all types.

I think in the Windows world people don't seem to have as many community
problems because most people simply aren't a part of the community--the
most impatient, grumpy people seem to have enough young relatives they
can coax to solve their problems for them.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request for assistance (hopefully not OT)

2022-05-21 Thread o1bigtenor
On Tue, May 17, 2022 at 6:20 AM o1bigtenor  wrote:
>
> Greetings
>
> I was having space issues in my /usr directory so I deleted some
> programs thinking that the space taken was more an issue than having
> older versions of the program.
>

Found the responses to my request quite interesting - - - actually fascinating.
To me a computer has to date been a tool - - - - not a tool kit - - -
- nor a place
to spend a life. This means that I have had to rely on other more knowledgeable
with the 'under the hood' material for advice. Have found that in the computer
world - - - - and especially the 'Linux' world that the idea of
assisting a requester,
well - - - it seems to be a foreign concept. To wit - - - in this
thread 50% of the
posts were of the variety - - - why would you do such a stupid thing. 40% of
the posts had some suggestions for at the least avenues of inquiry and only
1 post gave a carefully written response that not only gave ideas but suggested
a possible process to finding a solution.

It was necessary to manually install (download from the repository and
then using
dpkg -i to install) all of the necessary bits to each version that was
listed in the
complaint. I tried to use apt but that option did not produce useful results.
This was a lot more involved that one might think as there is not only
the pythonx.xx version but pythonx.xx-minimal and -dev and sometimes even -dbg.
The order of install was also important.

So even though the request for assistance was to much met by kvetching there
was enough 'help' so that it was possible to 'fix' the issue.

Thanks and kudus to those that did 'help' and those who found the kvetching
more useful - - - - well - - - - I don't have to wonder why 'linux' is
used as much
by the general populace as it is. The community likes to destroy
itself - - - it
is a pity - - - - the community has so much to offer.

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


Re: Request for assistance (hopefully not OT)

2022-05-18 Thread Loris Bennett
Chris Angelico  writes:

> On Wed, 18 May 2022 at 04:05, Loris Bennett  
> wrote:
>>
>> [snip (26 lines)]
>>
>> > I think you had a problem before that.  Debian testing is not an
>> > operating system you should be using if you have a fairly good
>> > understanding of how Debian (or Linux in general) works.
>>
>> Should be
>>
>>   I think you had a problem before that.  Debian testing is not an
>>   operating system you should be using *unless* you have a fairly good
>>   understanding of how Debian (or Linux in general) works.
>>
>> [snip (62 lines)]
>>
>
> Oh! My bad, didn't see this correction, sorry. With this adjustment,
> the comment is a bit more reasonable, although I'd still say it's
> generally fine to run Debian Testing on a personal desktop machine;
> there are a number of distros that base themselves on Testing.
>
> But yes, "unless" makes much more sense there.

It's lucky I never got "if" and "unless" mixed up when I used to program
in Perl ;-)

Yes, there are a number of distros based on Debian Testing, but those
tend to be aimed more at sysadmins (e.g. Kali and Grml) than people just
starting out with Linux.  However, with plain old Debian Testing you
need to be able to deal with things occasionally not working properly.
As the Debian people say about Testing: "If it doesn't work for you,
then there's a good chance it's broken."  And that's even before you
delete part of the OS with 'rm'.

Cheers,

Loris

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


Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Michael Torrie
On 5/17/22 05:20, o1bigtenor wrote:
> What can I do to correct this self-inflicted problem?

Those are always the fun ones.  Reminds me of when I was first learning
Linux using Red Hat Linux 5.0 or 5.1.  This was long before nice
dependency-solving tools like apt.  I wanted to install and run
StarOffice, but it needed a newer libc (this was during the painful
transition from libc5 to glibc6).  I ended up removing libc which
*everything depends on, trying to get the glibc update installed.
Needless to say that broke the entire system. Nothing but a reinstall
could be done in those days.

Anyway, good luck. I think you can rescue it yet following the advice
others have given.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Chris Angelico
On Wed, 18 May 2022 at 04:05, Loris Bennett  wrote:
>
> [snip (26 lines)]
>
> > I think you had a problem before that.  Debian testing is not an
> > operating system you should be using if you have a fairly good
> > understanding of how Debian (or Linux in general) works.
>
> Should be
>
>   I think you had a problem before that.  Debian testing is not an
>   operating system you should be using *unless* you have a fairly good
>   understanding of how Debian (or Linux in general) works.
>
> [snip (62 lines)]
>

Oh! My bad, didn't see this correction, sorry. With this adjustment,
the comment is a bit more reasonable, although I'd still say it's
generally fine to run Debian Testing on a personal desktop machine;
there are a number of distros that base themselves on Testing.

But yes, "unless" makes much more sense there.

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


Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Chris Angelico
On Wed, 18 May 2022 at 04:05, Loris Bennett  wrote:
> > So now I have problems.
>
> I think you had a problem before that.  Debian testing is not an
> operating system you should be using if you have a fairly good
> understanding of how Debian (or Linux in general) works.

I take issue with that! Debian Testing is a perfectly viable operating
system! I wouldn't use it on a server, but it's perfectly fine to use
it on a personal machine. You can generally consider Debian Testing to
be broadly as stable as Ubuntu non-LTS releases, although in my
opinion, it's actually quite a bit more dependable than them.

(Perhaps you're thinking of Debian Unstable?)

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


Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Grant Edwards
On 2022-05-17, Loris Bennett  wrote:

> It might be possible to fix the system.  If will probably be fairly
> difficult, but you would probably learn a lot doing it.  However, if I
> were you, I would just install Debian stable over your borked system and
> then learn a bit more about package management.

Other then reinstalling, the easiest way to fix a broken system like
that requires access to a similarly configured system that isn't
broken. Find one of those, and start copying binaries from the working
system to the broken system. At some point, the broken system should
start to work well enough that you can re-install the packages you
broke by removing files behind the back of the package manager.

Whether that's going to be faster/easier than backing up your
configuration and data files and reinstalling Debian is another
question. My guess is that reinstalling would probably be faster.

FWIW, this is indeed off-topic for this group. It isn't a really
Python question, it's a Debian question.

--
Grant


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


Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Loris Bennett
o1bigtenor  writes:

> Greetings
>
> I was having space issues in my /usr directory so I deleted some
> programs thinking that the space taken was more an issue than having
> older versions of the program.
>
> So one of the programs I deleted (using rm -r) was python3.9.

Deleting anything from /usr via 'rm -r' which was installed via the
package manager is an extremely bad idea.  If you want to remove stuff,
use the package manager.
 
> Python3.10 was already installed so I thought (naively!!!) that things
> should continue working.
> (Python 3.6, 3.7 and 3.8 were also part of this cleanup.)

Python 3.10 may be installed, but a significant number of packages
depend on Python 3.9.  That's why you should use the package manager -
it knows all about the dependencies.

> So now I have problems.

I think you had a problem before that.  Debian testing is not an
operating system you should be using if you have a fairly good
understanding of how Debian (or Linux in general) works.

> Following is the system barf that I get when I run '# apt upgrade'.
>
> What can I do to correct this self-inflicted problem?
>
> (running on debian testing 5.17

I think you mean just 'Debian testing', which is what will become the
next version of Debian, i.e. Debian 12.  The '5.17' is just the kernel
version, not a version of Debian. 

> Setting up python2.7-minimal (2.7.18-13.1) ...
> Could not find platform independent libraries 
> Could not find platform dependent libraries 
> Consider setting $PYTHONHOME to [:]
> /usr/bin/python2.7: can't open file
> '/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or
> directory
> dpkg: error processing package python2.7-minimal (--configure):
>  installed python2.7-minimal package post-installation script
> subprocess returned error exit status 2
> Setting up python3.9-minimal (3.9.12-1) ...
> update-binfmts: warning: /usr/share/binfmts/python3.9: no executable
> /usr/bin/python3.9 found, but continuing anyway as you request
> /var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/bin/python3.9: not 
> found
> dpkg: error processing package python3.9-minimal (--configure):
>  installed python3.9-minimal package post-installation script
> subprocess returned error exit status 127
> dpkg: dependency problems prevent configuration of python3.9:
>  python3.9 depends on python3.9-minimal (= 3.9.12-1); however:
>   Package python3.9-minimal is not configured yet.
>
> dpkg: error processing package python3.9 (--configure):
>  dependency problems - leaving unconfigured
> dpkg: dependency problems prevent configuration of python2.7:
>  python2.7 depends on python2.7-minimal (= 2.7.18-13.1); however:
>   Package python2.7-minimal is not configured yet.
>
> dpkg: error processing package python2.7 (--configure):
>  dependency problems - leaving unconfigured
> dpkg: dependency problems prevent configuration of python3.9-dev:
>  python3.9-dev depends on python3.9 (= 3.9.12-1); however:
>   Package python3.9 is not configured yet.
>
> dpkg: error processing package python3.9-dev (--configure):
>  dependency problems - leaving unconfigured
> . . .
> Errors were encountered while processing:
>  python2.7-minimal
>  python3.9-minimal
>  python3.9
>  python2.7
>  python3.9-dev

It might be possible to fix the system.  If will probably be fairly
difficult, but you would probably learn a lot doing it.  However, if I
were you, I would just install Debian stable over your borked system and
then learn a bit more about package management.

Cheers,

Loris

-- 
This signature is currently under construction.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Loris Bennett
[snip (26 lines)]

> I think you had a problem before that.  Debian testing is not an
> operating system you should be using if you have a fairly good
> understanding of how Debian (or Linux in general) works.

Should be

  I think you had a problem before that.  Debian testing is not an
  operating system you should be using *unless* you have a fairly good
  understanding of how Debian (or Linux in general) works.

[snip (62 lines)]

-- 
This signature is currently under construction.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Chris Angelico
On Tue, 17 May 2022 at 21:22, o1bigtenor  wrote:
>
> Greetings
>
> I was having space issues in my /usr directory so I deleted some
> programs thinking that the space taken was more an issue than having
> older versions of the program.
>
> So one of the programs I deleted (using rm -r) was python3.9.
> Python3.10 was already installed so I thought (naively!!!) that things
> should continue working.
> (Python 3.6, 3.7 and 3.8 were also part of this cleanup.)

Did you install Python 3.9 using apt? If so, you should definitely
have removed it using apt - if for no reason than to find out if
something's depending on it.

Generally, Linux systems have just one "system Python" that other
applications depend on. Any other installed version is completely
independent.

> So now I have problems.
>
> Following is the system barf that I get when I run '# apt upgrade'.
>
> What can I do to correct this self-inflicted problem?
>
> (running on debian testing 5.17

I presume 5.17 is the Linux kernel version? Depending on how
up-to-date your Debian Testing is, that should theoretically mean that
the system Python is 3.10, which would imply that it should have been
safe to remove 3.9... but only if you had done it with apt.

> Setting up python2.7-minimal (2.7.18-13.1) ...
> Could not find platform independent libraries 
> Could not find platform dependent libraries 
> Consider setting $PYTHONHOME to [:]
> /usr/bin/python2.7: can't open file
> '/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or
> directory

Did you also use rm to get rid of Python 2.7?

> dpkg: error processing package python2.7-minimal (--configure):
>  installed python2.7-minimal package post-installation script
> subprocess returned error exit status 2
> Setting up python3.9-minimal (3.9.12-1) ...
> update-binfmts: warning: /usr/share/binfmts/python3.9: no executable
> /usr/bin/python3.9 found, but continuing anyway as you request
> /var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/bin/python3.9: not 
> found
> dpkg: error processing package python3.9-minimal (--configure):
>  installed python3.9-minimal package post-installation script
> subprocess returned error exit status 127
> dpkg: dependency problems prevent configuration of python3.9:
>  python3.9 depends on python3.9-minimal (= 3.9.12-1); however:
>   Package python3.9-minimal is not configured yet.
>
> dpkg: error processing package python3.9 (--configure):
>  dependency problems - leaving unconfigured
> dpkg: dependency problems prevent configuration of python2.7:
>  python2.7 depends on python2.7-minimal (= 2.7.18-13.1); however:
>   Package python2.7-minimal is not configured yet.
>
> dpkg: error processing package python2.7 (--configure):
>  dependency problems - leaving unconfigured
> dpkg: dependency problems prevent configuration of python3.9-dev:
>  python3.9-dev depends on python3.9 (= 3.9.12-1); however:
>   Package python3.9 is not configured yet.
>
> dpkg: error processing package python3.9-dev (--configure):
>  dependency problems - leaving unconfigured
> . . .
> Errors were encountered while processing:
>  python2.7-minimal
>  python3.9-minimal
>  python3.9
>  python2.7
>  python3.9-dev

So, yeah, you're definitely going to need to reinstate some parts of
Python to get this going.

If you can figure out which exact Python versions you need, it might
be possible to restore them manually. Download the packages from
packages.debian.org, then try to manually install them with dpkg, and
if that fails, unpack them and put the files into the right places.

It's going to be a pain. A lot of pain. And next time, use apt to
uninstall what apt installed :)

Something else to consider, though: It might not be Python that's
taking up all the space. On my system, /usr is dominated by /usr/lib
and /usr/local/lib, and while it might look like the pythonx.y
directories there are the large part, it's actually not Python itself
that's so big: it's other libraries, installed using either apt or
pip. So when you're trying to free up space, look to see whether you
have packages installed into every version of Python you have; the
largest directories in my python3.9/site-packages are scipy, plotly,
numpy, pandas, speech_recognition, matplotlib, and Cython - all great
tools, but if you have a copy for 3.9, a copy for 3.10, a copy for
3.11, etc, it adds up fast.

"Ten minutes with a hacksaw will save you thirty with a shovel"
-- Miss Pauling, discussing the art of uninstalling something

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


Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Martin Di Paola

Try to reinstall python and only python and if you succeeds, then try to
reinstall the other tools.

For this, use "apt-get" instead of "apt"

$ sudo apt-get reinstall python3

When a system is heavily broken, be extra careful and read the output of
the programs. If "apt-get" says than in order to reinstall python it will have
to remove half of your computer, abort. Better ask than sorry.

Best of the lucks.

Martin.

On Tue, May 17, 2022 at 06:20:39AM -0500, o1bigtenor wrote:

Greetings

I was having space issues in my /usr directory so I deleted some
programs thinking that the space taken was more an issue than having
older versions of the program.

So one of the programs I deleted (using rm -r) was python3.9.
Python3.10 was already installed so I thought (naively!!!) that things
should continue working.
(Python 3.6, 3.7 and 3.8 were also part of this cleanup.)

So now I have problems.

Following is the system barf that I get when I run '# apt upgrade'.

What can I do to correct this self-inflicted problem?

(running on debian testing 5.17

Setting up python2.7-minimal (2.7.18-13.1) ...
Could not find platform independent libraries 
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
/usr/bin/python2.7: can't open file
'/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or
directory
dpkg: error processing package python2.7-minimal (--configure):
installed python2.7-minimal package post-installation script
subprocess returned error exit status 2
Setting up python3.9-minimal (3.9.12-1) ...
update-binfmts: warning: /usr/share/binfmts/python3.9: no executable
/usr/bin/python3.9 found, but continuing anyway as you request
/var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/bin/python3.9: not found
dpkg: error processing package python3.9-minimal (--configure):
installed python3.9-minimal package post-installation script
subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of python3.9:
python3.9 depends on python3.9-minimal (= 3.9.12-1); however:
 Package python3.9-minimal is not configured yet.

dpkg: error processing package python3.9 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python2.7:
python2.7 depends on python2.7-minimal (= 2.7.18-13.1); however:
 Package python2.7-minimal is not configured yet.

dpkg: error processing package python2.7 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.9-dev:
python3.9-dev depends on python3.9 (= 3.9.12-1); however:
 Package python3.9 is not configured yet.

dpkg: error processing package python3.9-dev (--configure):
dependency problems - leaving unconfigured
. . .
Errors were encountered while processing:
python2.7-minimal
python3.9-minimal
python3.9
python2.7
python3.9-dev
--
https://mail.python.org/mailman/listinfo/python-list

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


Request for assistance (hopefully not OT)

2022-05-17 Thread o1bigtenor
Greetings

I was having space issues in my /usr directory so I deleted some
programs thinking that the space taken was more an issue than having
older versions of the program.

So one of the programs I deleted (using rm -r) was python3.9.
Python3.10 was already installed so I thought (naively!!!) that things
should continue working.
(Python 3.6, 3.7 and 3.8 were also part of this cleanup.)

So now I have problems.

Following is the system barf that I get when I run '# apt upgrade'.

What can I do to correct this self-inflicted problem?

(running on debian testing 5.17

Setting up python2.7-minimal (2.7.18-13.1) ...
Could not find platform independent libraries 
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
/usr/bin/python2.7: can't open file
'/usr/lib/python2.7/py_compile.py': [Errno 2] No such file or
directory
dpkg: error processing package python2.7-minimal (--configure):
 installed python2.7-minimal package post-installation script
subprocess returned error exit status 2
Setting up python3.9-minimal (3.9.12-1) ...
update-binfmts: warning: /usr/share/binfmts/python3.9: no executable
/usr/bin/python3.9 found, but continuing anyway as you request
/var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/bin/python3.9: not found
dpkg: error processing package python3.9-minimal (--configure):
 installed python3.9-minimal package post-installation script
subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of python3.9:
 python3.9 depends on python3.9-minimal (= 3.9.12-1); however:
  Package python3.9-minimal is not configured yet.

dpkg: error processing package python3.9 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python2.7:
 python2.7 depends on python2.7-minimal (= 2.7.18-13.1); however:
  Package python2.7-minimal is not configured yet.

dpkg: error processing package python2.7 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.9-dev:
 python3.9-dev depends on python3.9 (= 3.9.12-1); however:
  Package python3.9 is not configured yet.

dpkg: error processing package python3.9-dev (--configure):
 dependency problems - leaving unconfigured
. . .
Errors were encountered while processing:
 python2.7-minimal
 python3.9-minimal
 python3.9
 python2.7
 python3.9-dev
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue414029] Request for time.standardtime(secs)

2022-04-10 Thread admin


Change by admin :


--
github: None -> 34283

___
Python tracker 

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



[issue491331] request sys.required_version

2022-04-10 Thread admin


Change by admin :


--
github: None -> 35713

___
Python tracker 

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



[issue436376] C API Request

2022-04-10 Thread admin


Change by admin :


--
github: None -> 34673

___
Python tracker 

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



[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Eric V. Smith


Eric V. Smith  added the comment:

As Jelle says, this can't be a runtime Exception.

At best mypy or a linter could make iterating over an known empty list (like a 
literal []) a warning, not an error as suggested by the OP. I sometimes 
"comment out" loops by doing something like:

for i in []: # long_list_returning_function():
# lots of code here

I do this just to avoid re-indenting everything if I want to skip the loop 
during development.

--
nosy: +eric.smith

___
Python tracker 

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



[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Luminair


Luminair  added the comment:

Thank you for the quick response Jelle! I do like mypy, and I will file this 
with them. Good luck with the migration to GitHub :)

--

___
Python tracker 

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



[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

This sort of thing would be better caught by a linter or type checker. For 
example, mypy with the `--warn-unreachable` option will flag the `while None:` 
example.

Iterating over an empty list will not currently be caught by mypy, but it's 
common in real code to iterate over a list that may be empty, so it would be a 
major compatibility break for Python to error when iterating over an empty list.

--
nosy: +JelleZijlstra
resolution:  -> rejected
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



[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Luminair


New submission from Luminair :

Below are four examples of impossible code that operates on nothing. The latter 
two continue silently, throwing no errors. I saw a bug sneak by because of 
this. I wonder if it is within the scope of Python's design to throw Exceptions 
in these situations? 

x = 

for x in : print("This code is never reached")

while(None): print("This code is never reached")

emptylist = []
for x in emptylist:
if emptylist[x] == "This code is never reached":
print("This code is never reached")
else: print("This code is never reached")

--
components: Parser
messages: 416559
nosy: Luminair, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Feature request: Throw an error when making impossible evaluation 
against an empty list
type: enhancement
versions: Python 3.11

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-03-30 Thread Logan Jones


Logan Jones  added the comment:

Ok I now have a PR up with the features requested. Let me know if you need 
anything else!

--

___
Python tracker 

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



[issue32754] feature request: asyncio.gather/wait cancel children on first exception

2022-03-30 Thread Irit Katriel


Change by Irit Katriel :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-03-29 Thread Logan Jones


Change by Logan Jones :


--
pull_requests: +30264
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/32187

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-03-29 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

yep, branch off of a recent main.

--

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-03-29 Thread Logan Jones


Logan Jones  added the comment:

Okay, I'm actually able to work on this again. What is the best way to make 
this change real. Should I be working off of main?

--

___
Python tracker 

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



Re: Feature Request

2022-03-23 Thread Dennis Lee Bieber
On Wed, 23 Mar 2022 01:55:37 -0700 (PDT), Kazuya Ito
 declaimed the following:

>Add "trun()" function to Python to truncate decimal part.

You'll have to define what specific behavior you think is missing from
the currently available functions?

>>> plusover = 2.78
>>> plusunder = 3.14
>>> minusover = -2.78
>>> minusunder = -3.14
>>> import math
>>> for v in (plusover, plusunder, minusover, minusunder):
... print("%s: int %s, round %s, math.trunc %s, math.floor %s,
math.ceil %s"
... % (v, int(v), round(v), math.trunc(v), math.floor(v),
math.ceil(v)))
... 
2.78: int 2, round 3, math.trunc 2, math.floor 2, math.ceil 3
3.14: int 3, round 3, math.trunc 3, math.floor 3, math.ceil 4
-2.78: int -2, round -3, math.trunc -2, math.floor -3, math.ceil -2
-3.14: int -3, round -3, math.trunc -3, math.floor -4, math.ceil -3
>>> 

int() and .trunc() move toward 0, .floor() moves to less positive,
.ceil() moves to more positive.


-- 
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Feature Request

2022-03-23 Thread Michael F. Stemper

On 23/03/2022 03.55, Kazuya Ito wrote:

Add "trun()" function to Python to truncate decimal part.


Which of these should its behavior copy?


from math import pi
int(pi)

3

pi-int(pi)

0.14159265358979312




--
Michael F. Stemper
This post contains greater than 95% post-consumer bytes by weight.
--
https://mail.python.org/mailman/listinfo/python-list


Feature Request

2022-03-23 Thread Kazuya Ito
Add "trun()" function to Python to truncate decimal part.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32754] feature request: asyncio.gather/wait cancel children on first exception

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:

Task groups are implemented under Issue46752.

--
nosy: +iritkatriel
resolution:  -> duplicate
status: open -> pending
superseder:  -> Introduce task groups to asyncio and change task cancellation 
semantics

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

As this is a new feature, it would also be reasonable to have specifying 
max_tasks_per_child without explicitly specifying a mp_context default to a 
safe mp_context.

--

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

from discussion on the other bug it looks like we should have a way to keep 
this; we just need to not allow it when the mp_context to be used is the 'fork' 
one.

--

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-24 Thread Logan Jones

Logan Jones  added the comment:

Based on my reading I’m hopeful that this change can make it in quickly once I 
find the time. The previous implementation didn’t care how the processes were 
created. 

I will look as soon as I can

--

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-23 Thread Ram Rachum


Ram Rachum  added the comment:

Oh that sucks. Logan and Antoine worked on this feature for so long. Thanks for 
reporting Greg.

--

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-23 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
resolution: fixed -> 

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

If we want this feature to stay in, it needs an implementation that does not 
rely on a multithreaded processing calling fork(). I'm going to have to revert 
the existing implementation for bpo-46464.

--
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

[bpo-46464](https://bugs.python.org/issue46464) describes a deadlock that the 
pre-requisite for this feature causes.

Spawning new children directly via fork() is impossible once a thread in the 
parent process has been started and concurrent.futures.process starts a thread.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-15 Thread Spencer Brown


Spencer Brown  added the comment:

There is a solution to this: you can modify the linecache module's cache to add 
lines under a fake filename, which is the approach attrs takes here:
https://github.com/python-attrs/attrs/blob/9727008fd1e40bc55cdc6aee71e0f61553f33127/src/attr/_make.py#L347
However, there are several downsides. 
- That dict isn't documented or appears in __all__, so it's arguably private.
- The C implementation of traceback printing opens files directly, so this 
doesn't work there.
- You have to invent a unique filename, and manually remove lines from the 
cache if the function is later deleted.
This does affect both namedtuple and dataclasses, though it's probably not too 
important given how straightforward the generated code they produce is.

--
nosy: +Spencer Brown

___
Python tracker 

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



[issue46384] Request: make lzma._(encode|decode)_filter_properties public

2022-01-14 Thread Hiroshi Miura


New submission from Hiroshi Miura :

py7zr 3rd party project that use lzma module to compress/decompress 7-zip 
archive uses lzma._(encode|decode)_filter_properties.

These methods are public at first but become private in py3.4 at commit 
a425c3d5a264c556d31bdd88097c79246b533ea3

Here is a reason described in commit comment 
> These functions were originally added to support LZMA compression in the 
> zipfile module, and are not of interest for the majority of users.

This is a request these methods to be public.

ref: py7zr: https://github.com/miurahr/py7zr

--
components: Library (Lib)
messages: 410615
nosy: miurahr
priority: normal
severity: normal
status: open
title: Request: make  lzma._(encode|decode)_filter_properties public
type: enhancement
versions: Python 3.11

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



[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-14 Thread Matt B


Matt B  added the comment:

Please treat this as a feature request to add the ability for pdb (and 
internals) to ingest sources for exec-generated code.

--

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



[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-14 Thread Irit Katriel


Change by Irit Katriel :


--
nosy:  -iritkatriel

___
Python tracker 

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



[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-14 Thread Irit Katriel


Change by Irit Katriel :


--
stage: resolved -> 
versions:  -Python 3.10, Python 3.6, Python 3.7, 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



[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-14 Thread Matt B


Change by Matt B :


--
resolution: not a bug -> 

___
Python tracker 

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



[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-14 Thread Matt B


Change by Matt B :


--
status: closed -> open
title: Unclear whether one can (or how to) provide source to exec-generated 
code -> Feature request: allow mechanism for creator of exec-generated code to 
provide source to pdb
type: behavior -> enhancement

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



[issue46174] Feature Request for Python Interfaces

2021-12-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I agree with Terry. This requires a clear proposal that describes the behaviour 
and differences with ABC-s.

I'm closing this issue for now.

--
nosy: +ronaldoussoren
resolution:  -> later
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



[issue46174] Feature Request for Python Interfaces

2021-12-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

(IDLE does not support typing.Protocol classes, because no one has proposed 
that it do so, let alone submit a patch.)

A new keyword requires a PEP that specifies the syntax for an 'interface' 
statement and what such a statement would do.  You should start with discussion 
on the python-ideas list.  This should probably be closed until there is a 
concrete proposal that could be evaluated and possibly implemented or rejected.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue46174] Feature Request for Python Interfaces

2021-12-24 Thread Gobot1234


Gobot1234  added the comment:

> Protocol class is not supported by IDEs for type hints, completions, bug 
> findings, etc.

I think most good modern IDEs support using Protocols as type hints, offer 
completions on them and help you to find bugs with static analysis. That was 
one of the main reasons they were implemented.

--
nosy: +Gobot1234

___
Python tracker 

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



[issue46174] Feature Request for Python Interfaces

2021-12-24 Thread Or


New submission from Or :

Most object oriented languages provide interfaces as part of the core language, 
this helps bring better design principles to a team's workflows.

Today Python provides the ABC module for abstract base classes and the Protocol 
class from typing module as something that might resemble an interface.

Creating abstract classes to simulate interface behavior is pretty tedious and 
the Protocol class is not supported by IDEs for type hints, completions, bug 
findings, etc.

I think the Python community would really benefit if we have an interface 
keyword built into the core language and enforced by the interpreter, similar 
to how it's implemented in Java and C#.

--
messages: 409149
nosy: Orie
priority: normal
severity: normal
status: open
title: Feature Request for Python Interfaces
type: enhancement
versions: Python 3.11

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



[issue41742] Request for docs.python.org/3/library/configparser.html#exceptions improvement

2021-11-23 Thread Irit Katriel


Irit Katriel  added the comment:

I agree with Terry, it's pretty clear that this is a list of the exceptions 
that are defined in the module. Indeed many builtin exceptions can be raised 
from any piece of code (for example, you can run out of memory in any module).

--
nosy: +iritkatriel
resolution:  -> rejected
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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2021-11-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2021-11-20 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset fdc0e09c3316098b038996c428e88931f0a4fcdb by Logan Jones in branch 
'main':
bpo-44733: Add max_tasks_per_child to ProcessPoolExecutor (GH-27373)
https://github.com/python/cpython/commit/fdc0e09c3316098b038996c428e88931f0a4fcdb


--

___
Python tracker 

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



[issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request

2021-11-04 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
components: +Library (Lib), XML -email
nosy: +Arfrever, dmalcolm, ezio.melotti, flox, iankko, loewis, neologix, 
orsenthil, pitrou, python-dev, rosslagerwall, schmir -ahmedsayeed1982, barry, 
r.david.murray

___
Python tracker 

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



[issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request

2021-11-04 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
Removed message: https://bugs.python.org/msg405710

___
Python tracker 

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



[issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request

2021-11-04 Thread Ahmed Sayeed


Ahmed Sayeed  added the comment:

The glibc regular expression code mishandles regular expressions such as:

   .*((.)\2){2}$ https://www.webb-dev.co.uk/services/navona-trains/

as it does not backtrack enough to find a match that satisfies the 
back-references when they are used twice.
http://www.compilatori.com/computers/latest-car-deals/
To reproduce the problem, compile and run the attached file backrefbug.c. It 
will exit with status 2, whereas the correct exit status is 0.
 http://www.acpirateradio.co.uk/computers/latest-car-deals/
This bug was originally reported against GNU 'grep' here:
The glibc regular expression code mishandles regular expressions such as:

   .*((.)\2){2}$ http://www.logoarts.co.uk/computers/latest-car-deals/

as it does not backtrack enough to find a match that satisfies the 
back-references when they are used twice.

To reproduce the problem, compile and run the attached file backrefbug.c. It 
will exit with status 2, whereas the correct exit status is 0. 
http://www.slipstone.co.uk/computers/latest-car-deals/

This bug was originally reported against GNU 'grep' here:
The glibc regular expression code mishandles regular expressions such as: 
http://embermanchester.uk/computers/latest-car-deals/

   .*((.)\2){2}$

as it does not backtrack enough to find a match that satisfies the 
back-references when they are used twice. 
http://connstr.net/computers/latest-car-deals/

To reproduce the problem, compile and run the attached file backrefbug.c. It 
will exit with status 2, whereas the correct exit status is 0. 
http://joerg.li/computers/latest-car-deals/

This bug was originally reported against GNU 'grep' here:
The glibc regular expression code mishandles regular expressions such as:

   .*((.)\2){2}$ http://www.jopspeech.com/computers/latest-car-deals/

as it does not backtrack enough to find a match that satisfies the 
back-references when they are used twice.
 http://www.wearelondonmade.com/computers/latest-car-deals/
To reproduce the problem, compile and run the attached file backrefbug.c. It 
will exit with status 2, whereas the correct exit status is 0.
 https://waytowhatsnext.com/crypto/crypto-world/
This bug was originally reported against GNU 'grep' here:
The glibc regular expression code mishandles regular expressions such as:
http://www.iu-bloomington.com/crypto/latest-coins/
   .*((.)\2){2}$

as it does not backtrack enough to find a match that satisfies the 
back-references when they are used twice. 
https://komiya-dental.com/crypto/alt-coins/

To reproduce the problem, compile and run the attached file backrefbug.c. It 
will exit with status 2, whereas the correct exit status is 0. 
http://www-look-4.com/computers/latest-car-deals/

This bug was originally reported against GNU 'grep' here:

--
components: +email -Library (Lib), XML
nosy: +ahmedsayeed1982, barry, r.david.murray -Arfrever, dmalcolm, 
ezio.melotti, flox, iankko, loewis, neologix, orsenthil, pitrou, python-dev, 
rosslagerwall, schmir
versions:  -Python 2.6, Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue37095] [Feature Request]: Add zstd support in tarfile

2021-10-26 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy:  -yan12125

___
Python tracker 

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



[issue37095] [Feature Request]: Add zstd support in tarfile

2021-10-26 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue45594] Feature Request: add EHOSTUNREACH subclass to ConnectionError

2021-10-24 Thread Nathan Collins


Nathan Collins  added the comment:

Apparently the existing ConnectionError and its subclasses were added as part 
of PEP 3151, tracked here: https://bugs.python.org/issue12555 .

--

___
Python tracker 

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



[issue45594] Feature Request: add EHOSTUNREACH subclass to ConnectionError

2021-10-24 Thread Nathan Collins


New submission from Nathan Collins :

WHAT

It would be nice if there was a special-case subclass of the standard library 
OSError/ConnectionError class for C EHOSTUNREACH (a.k.a. "no route to host") 
errors. Currently there are special-case subclasses of ConnectionError for 
several other types of connection errors, namely BrokenPipeError, 
ConnectionAbortedError, ConnectionRefusedError and ConnectionResetError. I'm 
asking that a new, similar subclass called HostUnreachableError be added, 
corresponding to C errno EHOSTUNREACH.

HOW

I believe this is as simple as adding four lines to CPython's exceptions.c, 
e.g. following ECONNABORTED's special treatment via the ConnectionAbortedError 
subclass there.

WHY

These special case OSError/ConnectionError exceptions are useful for several 
reasons. First, they give human friendly names to an otherwise less helpful 
OSError exceptions. Second, they make it easier to write portable code, because 
different OSes use different C errno numbers for the corresponding C error. For 
example, EHOSTUNREACH is errno 113 on Linux [1] and 110 on Windows [2].

[1] 
https://github.com/torvalds/linux/blob/9c0c4d24ac000e52d55348961d3a3ba42065e0cf/include/uapi/asm-generic/errno.h#L96
[2] 
https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-constants?view=msvc-160

--
components: Library (Lib)
messages: 404917
nosy: ntc2
priority: normal
severity: normal
status: open
title: Feature Request: add EHOSTUNREACH subclass to ConnectionError
type: enhancement
versions: Python 3.11

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



Re: Request to advise error for python.

2021-10-24 Thread tommy yama
Thank you MRAB.

As somebody mentioned before, the easiest solution is you can do pip
install before typing python.
That would work.

On Sun, Oct 24, 2021 at 12:00 AM MRAB  wrote:

> On 2021-10-23 14:53, tommy yama wrote:
> > It seems you use windows to install.
> >
> >
> > Then, you need conda. Pip works for Linux.
> >
> On Windows, 'conda' is for the Anaconda version of Python. If you're
> using the standard version of Python from python.org you use pip or,
> preferably, py -m pip.
>
> > Check this out.
> > https://numpy.org/install/
> >
> >
> > On Thu, Oct 21, 2021, 11:35 PM Grant Edwards 
> > wrote:
> >
> >> On 2021-10-21, Mats Wichmann  wrote:
> >>
> >> > There are some nuances.  If you are on a Linux system, Python is a
> >> > system program and you don't want to try to install into system
> >> > locations (you'll run into permission problems anyway), so trying a
> user
> >> > install is useful.  So:
> >> >
> >> > pip install --user numpy
> >> >
> >> > In fact, if you're on a Linux system you *may* prefer to install the
> >> > packaged versions - use the appropriate package manager commands.
> >>
> >> Not all systems have a 'pip' executable. If a 'pip' exectuable does
> >> exist, it might not be the same version as your defualt python
> >> executable. It's usually a better idea to do it this way:
> >>
> >>  $ python -m pip install --user numpy
> >>
> >> That said, if you're on Linux system, you're almostg always better off
> >> using your distro's package manger to install numpy.
> >>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request to advise error for python.

2021-10-23 Thread MRAB

On 2021-10-23 14:53, tommy yama wrote:

It seems you use windows to install.


Then, you need conda. Pip works for Linux.

On Windows, 'conda' is for the Anaconda version of Python. If you're 
using the standard version of Python from python.org you use pip or, 
preferably, py -m pip.



Check this out.
https://numpy.org/install/


On Thu, Oct 21, 2021, 11:35 PM Grant Edwards 
wrote:


On 2021-10-21, Mats Wichmann  wrote:

> There are some nuances.  If you are on a Linux system, Python is a
> system program and you don't want to try to install into system
> locations (you'll run into permission problems anyway), so trying a user
> install is useful.  So:
>
> pip install --user numpy
>
> In fact, if you're on a Linux system you *may* prefer to install the
> packaged versions - use the appropriate package manager commands.

Not all systems have a 'pip' executable. If a 'pip' exectuable does
exist, it might not be the same version as your defualt python
executable. It's usually a better idea to do it this way:

 $ python -m pip install --user numpy

That said, if you're on Linux system, you're almostg always better off
using your distro's package manger to install numpy.


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


Re: Request to advise error for python.

2021-10-23 Thread tommy yama
It seems you use windows to install.


Then, you need conda. Pip works for Linux.

Check this out.
https://numpy.org/install/


On Thu, Oct 21, 2021, 11:35 PM Grant Edwards 
wrote:

> On 2021-10-21, Mats Wichmann  wrote:
>
> > There are some nuances.  If you are on a Linux system, Python is a
> > system program and you don't want to try to install into system
> > locations (you'll run into permission problems anyway), so trying a user
> > install is useful.  So:
> >
> > pip install --user numpy
> >
> > In fact, if you're on a Linux system you *may* prefer to install the
> > packaged versions - use the appropriate package manager commands.
>
> Not all systems have a 'pip' executable. If a 'pip' exectuable does
> exist, it might not be the same version as your defualt python
> executable. It's usually a better idea to do it this way:
>
>  $ python -m pip install --user numpy
>
> That said, if you're on Linux system, you're almostg always better off
> using your distro's package manger to install numpy.
>
> --
> Grant
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue16621] sched module enhancement request

2021-10-21 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> sched.scheduler.run() blocks scheduler

___
Python tracker 

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



Re: Request to advise error for python.

2021-10-21 Thread Grant Edwards
On 2021-10-21, Mats Wichmann  wrote:

> There are some nuances.  If you are on a Linux system, Python is a 
> system program and you don't want to try to install into system 
> locations (you'll run into permission problems anyway), so trying a user 
> install is useful.  So:
>
> pip install --user numpy
>
> In fact, if you're on a Linux system you *may* prefer to install the 
> packaged versions - use the appropriate package manager commands.

Not all systems have a 'pip' executable. If a 'pip' exectuable does
exist, it might not be the same version as your defualt python
executable. It's usually a better idea to do it this way:

 $ python -m pip install --user numpy

That said, if you're on Linux system, you're almostg always better off
using your distro's package manger to install numpy.

--
Grant


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


Re: Request to advise error for python.

2021-10-21 Thread Mats Wichmann

On 10/20/21 23:10, 정성학(대학원생-자동차IT융합전공) via Python-list wrote:

Hi

There are some errors in order to install numpy as follows.


pip install numpy

   File "", line 1
 pip install numpy
   ^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

Would you advise me to correct error and install numpy or pandas?


For this one, the command is run outside of Python - in other words, 
this is a shell command, not a Python command.  Quit Python and try again.


Extra reading:

There are some nuances.  If you are on a Linux system, Python is a 
system program and you don't want to try to install into system 
locations (you'll run into permission problems anyway), so trying a user 
install is useful.  So:


pip install --user numpy

In fact, if you're on a Linux system you *may* prefer to install the 
packaged versions - use the appropriate package manager commands.


The numpy site has lots more thoughts on installing - I believe they 
suggest using the conda installation system.


https://numpy.org/install/

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


Re: Request to advise error for python.

2021-10-21 Thread 황병희
황병희  writes:

> Dear 정성학,
>
 [image: image.png]
>
> If you would like to show us your image, then write down the github/gitlab
> link. ...

This is example:
https://gitlab.com/soyeomul/test/-/commit/80d2b4f5e8eda0238301e9bca5bc33f0127572fd

Sincerely, Gopher Byung-Hee
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Request to advise error for python.

2021-10-21 Thread 대학원생-자동차IT융합전공
Hi

There are some errors in order to install numpy as follows.

>>> pip install numpy
  File "", line 1
pip install numpy
  ^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

Would you advise me to correct error and install numpy or pandas?

[image: image.png]
===
Seonghark Jeong
KUL(Kookmin Unmanned vehicle research Laboratory)
GSAEK, Kookmin Univ.
E-Mail: seongh...@kookmin.ac.kr
HP: 82-10-3600-7143
===


2021년 10월 20일 (수) 오전 2:47, 황병희 님이 작성:

> Dear 정성학,
>
> >>> [image: image.png]
>
> If you would like to show us your image, then write down the github/gitlab
> link. Of course i assume you have github/gitlab account. Because Mailing
> server does filter for dangerous things such as image file, video clip,
> action scripts (computer virus), i think...
>
> Sincerely, Gopher Byung-Hee
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

-- 

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


  1   2   3   4   5   6   7   8   9   10   >