public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] python breakage
@ 2024-11-02  0:51 William Kenworthy
  2024-11-02  2:04 ` Matt Jolly
  0 siblings, 1 reply; 3+ messages in thread
From: William Kenworthy @ 2024-11-02  0:51 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

Hi, the complex mess that is python is giving me problems by ignoring my 
wants ... again!

In order to try and stop users shooting themselves in the foot it used 
the token "EXTERNALLY-MANAGED" in order to prevent unintended updates 
from within python that do not use portage) ... I presume?

Homeassistant (non-gentoo overlay) does this by design to install 
missing deps to modules.  Deleting the token allows Homeassistant to 
keep working as designed.

Now, at some point (after a world update probably a month or two ago - 
just did an update and found the damage) python has decided that it will 
only allow local installs via "venv" or uv using the -system arg (I 
think) breaking Homeassistant again. The following error message is 
because the required deps are not installed.

2024-11-02 08:30:35.978 ERROR (MainThread) [homeassistant.setup] Setup 
failed for custom integration 'huawei_solar': Requirements for 
huawei_solar not found: ['huawei-solar==2.3.0'].


My questions (for gentoo) is this another gentoo only hack, or an 
upstream hard requirement and how can it be turned off.

BillK




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] python breakage
  2024-11-02  0:51 [gentoo-user] python breakage William Kenworthy
@ 2024-11-02  2:04 ` Matt Jolly
  2024-11-03  5:33   ` William Kenworthy
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Jolly @ 2024-11-02  2:04 UTC (permalink / raw
  To: gentoo-user

Hi Bill,

On 2/11/24 10:51, William Kenworthy wrote:

> My questions (for gentoo) is this another gentoo only hack, or an 
> upstream hard requirement and how can it be turned off.
> 
> BillK

This is PEP 668 in action.

https://peps.python.org/pep-0668/
https://packaging.python.org/en/latest/specifications/externally-managed-environments/#externally-managed-environments

While annoying the intent here is to stop users from shooting
themselves in the foot by breaking critical system packages.

As you've identified, virtual environments are the "solution"
to this "problem".

https://packaging.python.org/en/latest/specifications/virtual-environments/#virtual-environments

If you wish to go back to the old behaviour you can install mask
the EXTERNALLY_MANAGED file.

Cheers,

Matt


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] python breakage
  2024-11-02  2:04 ` Matt Jolly
@ 2024-11-03  5:33   ` William Kenworthy
  0 siblings, 0 replies; 3+ messages in thread
From: William Kenworthy @ 2024-11-03  5:33 UTC (permalink / raw
  To: gentoo-user


On 2/11/24 10:04, Matt Jolly wrote:
> Hi Bill,
>
> On 2/11/24 10:51, William Kenworthy wrote:
>
>> My questions (for gentoo) is this another gentoo only hack, or an 
>> upstream hard requirement and how can it be turned off.
>>
>> BillK
>
> This is PEP 668 in action.
>
> https://peps.python.org/pep-0668/
> https://packaging.python.org/en/latest/specifications/externally-managed-environments/#externally-managed-environments 
>
>
> While annoying the intent here is to stop users from shooting
> themselves in the foot by breaking critical system packages.
>
> As you've identified, virtual environments are the "solution"
> to this "problem".
>
> https://packaging.python.org/en/latest/specifications/virtual-environments/#virtual-environments 
>
>
> If you wish to go back to the old behaviour you can install mask
> the EXTERNALLY_MANAGED file.
>
> Cheers,
>
> Matt
>
Hi Matt, as per my previous email I already know about 
"EXTERNALLY_MANAGED" - this is really independent of the the problem 
PEP668 addresses which is package managers.  What I have run into (see 
the error message I included with the previous email) is that after 
deleting the "EXTERNALLY_MANAGED" tokens something is now enforcing 
using a venv but isnt providing a workaround for older packages and 
those that dont use a venv.  I am not sure if its within python or 
gentoo so I am asking for a hint as its a lot of code to go through.  
Nothing is showing up that I have found in searching so far as 
everything is assuming its a user doing a direct install, not a python 
module auto installing/updating missing deps on startup.

BillK


It isnt clear that is being caused by the


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-03  5:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-02  0:51 [gentoo-user] python breakage William Kenworthy
2024-11-02  2:04 ` Matt Jolly
2024-11-03  5:33   ` William Kenworthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox