[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2022-02-28 Thread Vidhya


Vidhya  added the comment:

Thanks Alex. I will look into @slateny's patch.

--

___
Python tracker 

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



[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2022-02-27 Thread Alex Waygood

Alex Waygood  added the comment:

Hi Vidhya — @slateny submitted a PR for this issue only two days ago (you can 
see that it's linked to this BPO issue in the "Pull Requests" field). I think 
it would be good to wait until that has been reviewed before doing any work on 
a possible PR for this issue :)

If you'd like to help out with this issue, you'd of course be very welcome to 
submit a review for @slateny's patch.

--
nosy: +AlexWaygood

___
Python tracker 

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



[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2022-02-27 Thread Vidhya


Vidhya  added the comment:

If this is still open, I would like to work on this. Please let me know.

--
nosy: +vidhya

___
Python tracker 

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



[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2022-02-24 Thread Stanley


Change by Stanley :


--
keywords: +patch
nosy: +slateny
nosy_count: 6.0 -> 7.0
pull_requests: +29687
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/31565

___
Python tracker 

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



[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2021-12-06 Thread Eric Snow


Eric Snow  added the comment:

The key point is that loaders should be using the spec, not any of the module 
attrs (like `__file__` and `__cached__`), nor setting them.

For the specific paragraph I referenced, it would look more like:

  It is also appropriate to set __cached__ when __file__ is not set.
  However, that scenario is quite atypical.  Ultimately, __file__ and
  __cached__ are set by the import system from the module spec provided
  by the finder.  The spec instructs the loader.  If a loader can load
  from a cached module but otherwise does not load from a file, that
  atypical scenario may be appropriate.

--

___
Python tracker 

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



[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy

___
Python tracker 

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



[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2021-12-06 Thread Brett Cannon


Brett Cannon  added the comment:

> "Ultimately, the loader set the values of __file__ and/or __cached__"

Change it to "sets" and +1 from me!

--

___
Python tracker 

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



[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2021-12-05 Thread Irit Katriel


Irit Katriel  added the comment:

Would it suffice to change

"Ultimately, the loader is what makes use of __file__ and/or __cached__"

to 

"Ultimately, the loader set the values of __file__ and/or __cached__"

?

--
nosy: +iritkatriel
title: language reference describes the role of module.__file__ inaccurately -> 
[doc] language reference describes the role of module.__file__ inaccurately
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5

___
Python tracker 

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