Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ee10df0c
Commit
ee10df0c
authored
Mar 14, 2014
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #20884: whatsnew: Frozen modules don't set __file__ anymore.
parent
ceb75f90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.4.rst
+8
-0
No files found.
Doc/whatsnew/3.4.rst
View file @
ee10df0c
...
...
@@ -2275,6 +2275,14 @@ Changes in the Python API
to determine if a module is a package or not is to use``hasattr(module,
'__path__')`` (:issue:`18065`).
* Frozen modules no longer define a ``__file__`` attribute. It's semantically
incorrect for frozen modules to set the attribute as they are not loaded from
any explicit location. If you must know that a module comes from frozen code
then you can see if the module's ``__spec__.location`` is set to ``'frozen'``,
check if the loader is a subclass of
:class:`importlib.machinery.FrozenImporter`,
or if Python 2 compatibility is necessary you can use :func:`imp.is_frozen`.
* :func:`py_compile.compile` now raises :exc:`FileExistsError` if the file path
it would write to is a symlink or a non-regular file. This is to act as a
warning that import will overwrite those files with a regular file regardless
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment