[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Chris Johns
Might be out of context here, but IMHO "." shouldn't be assumed to be the current directory anyway. As someone who has ported python to a system where it isn't, these assumptions tend to cause problems. Cheers Chris Sent from my iPhone > On 3 Jun 2021, at 09:31, Robin Becker wrote: > > I

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Larry Hastings
On 6/3/21 4:20 AM, Chris Johns wrote: Might be out of context here, but IMHO "." shouldn't be assumed to be the current directory anyway. As someone who has ported python to a system where it isn't, these assumptions tend to cause problems. That sounds miserable.  What does "." signify on

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Bernat Gabor
The only other thing that would make sense is a folder in the current working directory named ".", not? On Thu, Jun 3, 2021 at 5:05 PM Larry Hastings wrote: > > On 6/3/21 4:20 AM, Chris Johns wrote: > > Might be out of context here, but IMHO "." shouldn't be assumed to be the > current director

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Senthil Kumaran
On 3 Jun 2021, at 09:31, Robin Becker wrote: > ReportLab has quite a large codebase and I think it would be hard to > get a concise test of this behaviour change. I would be glad if this > is an expected change a7-->b1 and if the use of '.' in this way has > become somehow wrong. To me, this sou

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Guido van Rossum
Maybe this? 04732ca993 bpo-43105: Importlib now resolves relative paths when creating module spec objects from file locations (GH-25121) On Thu, Jun 3, 2021 at 9:49 AM Senthil Kumaran wrote: > On 3 Jun 2021, at 09:31, Robin Becker wrote: > > > ReportLab has quite a large codebase and I think i

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Senthil Kumaran
On Thu, Jun 03, 2021 at 09:55:57AM -0700, Guido van Rossum wrote: > Maybe this? > > 04732ca993 bpo-43105: Importlib now resolves relative paths when creating > module spec objects from file locations (GH-25121) Likely!. But https://github.com/python/cpython/commit/04732ca993fa077a8b9640cc77fb2f15

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Robin Becker
On 03/06/2021 18:14, Senthil Kumaran wrote: On Thu, Jun 03, 2021 at 09:55:57AM -0700, Guido van Rossum wrote: Maybe this? 04732ca993 bpo-43105: Importlib now resolves relative paths when creating module spec objects from file locations (GH-25121) Likely!. But https://github.com/python/cpython

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Senthil Kumaran
On Thu, Jun 03, 2021 at 07:08:06PM +0100, Robin Becker wrote: > The regression may well be a platform issue. I am by no means an expert at > building python; I followed a recipe from the ARCH PKGBUILD of some time I meant the change in the diff we were suspecting was supposed to be "Windows" speci

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-03 Thread Cameron Simpson
On 03Jun2021 17:06, Bernat Gabor wrote: >On Thu, Jun 3, 2021 at 5:05 PM Larry Hastings >wrote: >> On 6/3/21 4:20 AM, Chris Johns wrote: >> Might be out of context here, but IMHO "." shouldn't be assumed to be >> the current directory anyway. >> >> As someone who has ported python to a system wh

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-04 Thread Steve Dower
On 6/3/2021 7:42 PM, Senthil Kumaran wrote: On Thu, Jun 03, 2021 at 07:08:06PM +0100, Robin Becker wrote: The regression may well be a platform issue. I am by no means an expert at building python; I followed a recipe from the ARCH PKGBUILD of some time I meant the change in the diff we were s

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-05 Thread Robin Becker
On 04/06/2021 19:29, Steve Dower wrote: ... While we were investigating the reliably broken behaviour, we figured that related behaviour was *unreliably* broken on all platforms. Specifically, if you imported a module through a relative path (resolved to CWD), changed the CWD, cleared

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-05 Thread Brett Cannon
On Sat., Jun. 5, 2021, 07:38 Robin Becker, wrote: > On 04/06/2021 19:29, Steve Dower wrote: > ... > > > > While we were investigating the reliably broken behaviour, we figured > that related behaviour was > > *unreliably* broken on all platforms. > > > > Specifically, if you imported a mo