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
4dd27f0a
Commit
4dd27f0a
authored
May 15, 2016
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issue #25533: Merge frozen module docs from 3.5
parents
38e2f175
f47a4003
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
Doc/c-api/import.rst
Doc/c-api/import.rst
+1
-1
Doc/library/ctypes.rst
Doc/library/ctypes.rst
+6
-5
Doc/library/pkgutil.rst
Doc/library/pkgutil.rst
+2
-2
Lib/ctypes/test/test_values.py
Lib/ctypes/test/test_values.py
+6
-5
No files found.
Doc/c-api/import.rst
View file @
4dd27f0a
...
@@ -272,7 +272,7 @@ Importing Modules
...
@@ -272,7 +272,7 @@ Importing Modules
};
};
.. c:var:: struct _frozen* PyImport_FrozenModules
.. c:var::
const
struct _frozen* PyImport_FrozenModules
This pointer is initialized to point to an array of :c:type:`struct _frozen`
This pointer is initialized to point to an array of :c:type:`struct _frozen`
records, terminated by one whose members are all *NULL* or zero. When a frozen
records, terminated by one whose members are all *NULL* or zero. When a frozen
...
...
Doc/library/ctypes.rst
View file @
4dd27f0a
...
@@ -1100,14 +1100,15 @@ access violation or whatever, so it's better to break out of the loop when we
...
@@ -1100,14 +1100,15 @@ access violation or whatever, so it's better to break out of the loop when we
hit the NULL entry::
hit the NULL entry::
>>> for item in table:
>>> for item in table:
... print(item.name, item.size)
... if item.name is None:
... if item.name is None:
... break
... break
... print(item.name.decode("ascii"), item.size)
...
...
__hello__ 104
_frozen_importlib 31764
__phello__ -104
_frozen_importlib_external 41499
__phello__.spam 104
__hello__ 161
None 0
__phello__ -161
__phello__.spam 161
>>>
>>>
The fact that standard Python has a frozen module and a frozen package
The fact that standard Python has a frozen module and a frozen package
...
...
Doc/library/pkgutil.rst
View file @
4dd27f0a
...
@@ -140,7 +140,7 @@ support.
...
@@ -140,7 +140,7 @@ support.
.. function:: iter_modules(path=None, prefix='')
.. function:: iter_modules(path=None, prefix='')
Yields ``(module_finder, name, ispkg)`` for all submodules on *path*, or, if
Yields ``(module_finder, name, ispkg)`` for all submodules on *path*, or, if
path
is ``None``, all top-level modules on ``sys.path``.
*path*
is ``None``, all top-level modules on ``sys.path``.
*path* should be either ``None`` or a list of paths to look for modules in.
*path* should be either ``None`` or a list of paths to look for modules in.
...
@@ -161,7 +161,7 @@ support.
...
@@ -161,7 +161,7 @@ support.
.. function:: walk_packages(path=None, prefix='', onerror=None)
.. function:: walk_packages(path=None, prefix='', onerror=None)
Yields ``(module_finder, name, ispkg)`` for all modules recursively on
Yields ``(module_finder, name, ispkg)`` for all modules recursively on
*path*, or, if
path
is ``None``, all accessible modules.
*path*, or, if
*path*
is ``None``, all accessible modules.
*path* should be either ``None`` or a list of paths to look for modules in.
*path* should be either ``None`` or a list of paths to look for modules in.
...
...
Lib/ctypes/test/test_values.py
View file @
4dd27f0a
...
@@ -77,13 +77,14 @@ class PythonValuesTestCase(unittest.TestCase):
...
@@ -77,13 +77,14 @@ class PythonValuesTestCase(unittest.TestCase):
self
.
assertTrue
(
entry
.
size
,
self
.
assertTrue
(
entry
.
size
,
"{!r} was reported as having no size"
.
format
(
entry
.
name
))
"{!r} was reported as having no size"
.
format
(
entry
.
name
))
continue
continue
items
.
append
((
entry
.
name
,
entry
.
size
))
items
.
append
((
entry
.
name
.
decode
(
"ascii"
)
,
entry
.
size
))
expected
=
[(
b
"__hello__"
,
161
),
expected
=
[(
"__hello__"
,
161
),
(
b
"__phello__"
,
-
161
),
(
"__phello__"
,
-
161
),
(
b
"__phello__.spam"
,
161
),
(
"__phello__.spam"
,
161
),
]
]
self
.
assertEqual
(
items
,
expected
)
self
.
assertEqual
(
items
,
expected
,
"PyImport_FrozenModules example "
"in Doc/library/ctypes.rst may be out of date"
)
self
.
assertEqual
(
sorted
(
bootstrap_seen
),
bootstrap_expected
,
self
.
assertEqual
(
sorted
(
bootstrap_seen
),
bootstrap_expected
,
"frozen bootstrap modules did not match PyImport_FrozenModules"
)
"frozen bootstrap modules did not match PyImport_FrozenModules"
)
...
...
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