[issue45413] Add install scheme for virtual environments

2022-03-18 Thread Filipe Laíns

Filipe Laíns  added the comment:

With PR 31034 merged, we can now mark this as resolved.

As mentioned in the PR, there are still some concerns about maintainability and 
avoiding similar issues to happen in the future. That can be done later, as 
people find time to work on it.

Thanks!

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



[issue45413] Add install scheme for virtual environments

2022-03-18 Thread Petr Viktorin

Petr Viktorin  added the comment:


New changeset 48d926269963cfe7a49c0a4f34af4fe9b832399b by Miro Hrončok in 
branch 'main':
bpo-45413: Define "posix_venv", "nt_venv" and "venv" sysconfig installation 
schemes (GH-31034)
https://github.com/python/cpython/commit/48d926269963cfe7a49c0a4f34af4fe9b832399b


--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-03-04 Thread Petr Viktorin


Petr Viktorin  added the comment:

Steve, could you take a look at the PR discussion and chime in about how this 
should be done?

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-02-17 Thread Miro Hrončok

Miro Hrončok  added the comment:

I've adapted the PR. See the latest commit (Instead of *venv* scheme, have 
*posix_venv* and *nt_venv*).

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-02-09 Thread Filipe Laíns

Filipe Laíns  added the comment:

I don't think the proposal is incompatible with what I discussed.

I haven't been super clear on my opinions on the implementation, so let me try 
to clarify them.

- I think that we should use a static scheme, accessible on all platforms.
- If this scheme needs to be independently defined for each platform, we should 
have different variants, available on all platforms, but still keep a generic 
named one, as an alias to the platform specific scheme
- We should not be re-using/aliasing existing schemes, particularly ones that 
are prone to downstream patching

So, my proposal would be to define a single static scheme, and changing the 
interpreter path initialization logic to hardcode its paths when on virtual 
environments.
If this presents any issue, and requires the scheme to be different for 
different platforms, we should add platform specific schemes and make the main 
one an alias to the correct scheme.

Hopefully that clarifies things up a bit. We should sort it out as soon as 
possible and update the PR, I don't think the PR as-is is the best approach.

What do you think?

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-02-09 Thread Steve Dower


Steve Dower  added the comment:

All I can say is that I wasn't aware of this discussion, or it blurred into the 
other discussions and didn't seem to need any attention from me. 
Once I was pinged on the pull request (and I'm *trying* to be better at 
checking GitHub notifications, though CPython is still the repo that makes it 
very hard), I took a look.

I definitely don't want to say that I must be consulted on every 
sysconfig/site/getpath change (because I don't want to be!), but I hesitate to 
say that this was the wrong way for it to be caught. It's only "too late" after 
a release has included it, and up until then it's fine.

So I guess it can be avoided in the future by checking the surrounding code and 
seeing how it's used? In this case, the schemes are all approximately static 
(for a given version of Python), and the *selection* of a scheme is based on 
the platform. The proposed venv scheme itself is based on the platform, while 
selection is static. That stands out to me as a difference.

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-02-09 Thread Petr Viktorin


Petr Viktorin  added the comment:

> I think we want the scheme to be static and accessible on all platforms, like 
> the others. So it probably should be 'nt_venv' and 'posix_venv' with 
> additional/improved logic to help apps determine when they need each.

Why? (This is a real question, I genuinely don't know.)

To put this in context, this has been discussed since October, and there was 
agreement on how to change it.
Now a PR exists. It is tested. Also, since this fixes urgent breaking changes, 
patches for "venv" is already in Fedora and Ubuntu deadsnakes PPA, and 
virtualenv also supports it. Changing direction now will mean lots of work 
changing and re-testing anything. That's definitely possible, just frustrating, 
but if someone calls to change something again, we risk not making it in 3.11.

How can we ensure the decision won't change again?
How can these discussions be made more effective?

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-02-07 Thread Filipe Laíns

Filipe Laíns  added the comment:

I agree.

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-02-07 Thread Steve Dower


Steve Dower  added the comment:

I think we want the scheme to be static and accessible on all platforms, like 
the others. So it probably should be 'nt_venv' and 'posix_venv' with 
additional/improved logic to help apps determine when they need each.

--
nosy: +steve.dower

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-02-01 Thread Miro Hrončok

Miro Hrončok  added the comment:

The PR is now ready for review.

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-01-31 Thread Miro Hrončok

Miro Hrončok  added the comment:

I've created a draft PR in https://github.com/python/cpython/pull/31034

It is still missing tests and I have not checked it on Windows, hence still a 
draft.

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-01-31 Thread Miro Hrončok

Change by Miro Hrončok :


--
keywords: +patch
pull_requests: +29217
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31034

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-01-31 Thread Miro Hrončok

Miro Hrončok  added the comment:

I'll try to draft this change for Python 3.11.

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2022-01-20 Thread Stefano Rivera


Change by Stefano Rivera :


--
nosy: +stefanor

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2021-10-18 Thread Lumír Balhar

Change by Lumír Balhar :


--
nosy: +frenzy

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2021-10-12 Thread Petr Viktorin


Petr Viktorin  added the comment:

Starting out with just "venv" doesn't mean we can't add "posix_venv"/"nt_venv" 
later (if e.g. someone needs to install into a filesystem for another platform).

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2021-10-08 Thread Filipe Laíns

Filipe Laíns  added the comment:

Yes, we could have several schemes, but I think having only one is more 
sensible.

The implementation would be fairly easy. We would just copy the "nt" scheme if 
on Windows, otherwise "posix_prefix".

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2021-10-08 Thread Miro Hrončok

Miro Hrončok  added the comment:

The existing install schemes contain values for all different kinds of OSes, 
somehow named according to them.

If we introduce a single "virtual"/"venv" scheme, it would need to have 
different contents on different OSes (e.g. Windows vs POSIX). I don't think 
that would cause any actual trouble, but it would be somewhat different than 
all the other schemes.

If we introduce multiple ones (e.g. "posix_venv" and "nt_venv") we would need 
an additional layer to get the one appropriate for the current platform.

Hence, I think having a single one is more pragmatic.

--

___
Python tracker 

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



[issue45413] Add install scheme for virtual environments

2021-10-08 Thread Filipe Laíns

Change by Filipe Laíns :


--
title: Add install scheme for virtual environment -> Add install scheme for 
virtual environments

___
Python tracker 

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