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
d3011cd1
Commit
d3011cd1
authored
Jul 28, 2001
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove usage of strop module.
parent
66b6e192
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Lib/imputil.py
Lib/imputil.py
+2
-5
No files found.
Lib/imputil.py
View file @
d3011cd1
...
...
@@ -7,7 +7,6 @@
# note: avoid importing non-builtin modules
import
imp
### not available in JPython?
import
sys
import
strop
import
__builtin__
# for the DirectoryImporter
...
...
@@ -78,7 +77,7 @@ class ImportManager:
def
_import_hook
(
self
,
fqname
,
globals
=
None
,
locals
=
None
,
fromlist
=
None
):
"""Python calls this hook to locate and import a module."""
parts
=
strop
.
split
(
fqname
,
'.'
)
parts
=
fqname
.
split
(
'.'
)
# determine the context of this import
parent
=
self
.
_determine_import_context
(
globals
)
...
...
@@ -157,7 +156,7 @@ class ImportManager:
assert
globals
is
parent
.
__dict__
return
parent
i
=
strop
.
rfind
(
parent_fqname
,
'.'
)
i
=
parent_fqname
.
rfind
(
'.'
)
# a module outside of a package has no particular import context
if
i
==
-
1
:
...
...
@@ -612,7 +611,6 @@ def _test_revamp():
# TODO
#
# from Finn Bock:
# remove use of "strop" -- not available in JPython
# type(sys) is not a module in JPython. what to use instead?
# imp.C_EXTENSION is not in JPython. same for get_suffixes and new_module
#
...
...
@@ -638,7 +636,6 @@ def _test_revamp():
# need __path__ processing
# performance
# move chaining to a subclass [gjs: it's been nuked]
# avoid strop
# deinstall should be possible
# query mechanism needed: is a specific Importer installed?
# py/pyc/pyo piping hooks to filter/process these files
...
...
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