PyCG 0.0.5__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pycg-0.0.5 → pycg-0.0.6}/PKG-INFO +4 -5
- {pycg-0.0.5 → pycg-0.0.6}/README.md +2 -1
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/imports.py +5 -1
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/scopes.py +5 -1
- {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/base.py +1 -1
- {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/PKG-INFO +4 -5
- {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/entry_points.txt +0 -1
- {pycg-0.0.5 → pycg-0.0.6}/setup.py +2 -1
- {pycg-0.0.5 → pycg-0.0.6}/LICENCE +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/__init__.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/args_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/assignments_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/base.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/builtins_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/classes_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/create_pytests.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/decorators_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/dicts_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/direct_calls_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/dynamic_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/exceptions_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/external_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/functions_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/generators_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/imports_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/kwargs_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/lambdas_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/lists_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/mro_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/returns_test.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark-key-errs/__init__.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark-key-errs/base.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark-key-errs/create_pytests.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/__init__.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/__main__.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/__init__.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/as_graph.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/base.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/fasten.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/simple.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/__init__.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/callgraph.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/classes.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/definitions.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/key_err.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/modules.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/pointers.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/__init__.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/cgprocessor.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/keyerrprocessor.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/postprocessor.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/preprocessor.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/pycg.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/utils/__init__.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/utils/common.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg/utils/constants.py +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/SOURCES.txt +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/dependency_links.txt +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/top_level.txt +0 -0
- {pycg-0.0.5 → pycg-0.0.6}/setup.cfg +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pycg
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Practical Python Call Graphs
|
|
5
5
|
Home-page: https://github.com/vitsalis/pycg
|
|
6
6
|
Author: Vitalis Salis
|
|
7
7
|
Author-email: vitsalis@gmail.com
|
|
8
8
|
License: Apache Software License
|
|
9
|
-
Platform: UNKNOWN
|
|
10
9
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Requires-Python: >=3.4
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENCE
|
|
14
14
|
|
|
@@ -32,7 +32,8 @@ In _43rd International Conference on Software Engineering, ICSE '21_,
|
|
|
32
32
|
|
|
33
33
|
# Installation
|
|
34
34
|
|
|
35
|
-
PyCG is implemented in Python3 and
|
|
35
|
+
PyCG is implemented in Python3 and requires Python version 3.4 or higher.
|
|
36
|
+
It also has no dependencies. Simply:
|
|
36
37
|
```
|
|
37
38
|
pip install pycg
|
|
38
39
|
```
|
|
@@ -147,5 +148,3 @@ From the root directory:
|
|
|
147
148
|
```
|
|
148
149
|
make test
|
|
149
150
|
```
|
|
150
|
-
|
|
151
|
-
|
|
@@ -18,7 +18,8 @@ In _43rd International Conference on Software Engineering, ICSE '21_,
|
|
|
18
18
|
|
|
19
19
|
# Installation
|
|
20
20
|
|
|
21
|
-
PyCG is implemented in Python3 and
|
|
21
|
+
PyCG is implemented in Python3 and requires Python version 3.4 or higher.
|
|
22
|
+
It also has no dependencies. Simply:
|
|
22
23
|
```
|
|
23
24
|
pip install pycg
|
|
24
25
|
```
|
|
@@ -150,7 +150,11 @@ class ImportManager(object):
|
|
|
150
150
|
self.create_edge(mod_name)
|
|
151
151
|
return sys.modules[mod_name]
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
module_spec = importlib.util.find_spec(mod_name, package=package)
|
|
154
|
+
if module_spec is None:
|
|
155
|
+
return importlib.import_module(mod_name, package=package)
|
|
156
|
+
|
|
157
|
+
return importlib.util.module_from_spec(module_spec)
|
|
154
158
|
|
|
155
159
|
def handle_import(self, name, level):
|
|
156
160
|
# We currently don't support builtin modules because they're frozen.
|
|
@@ -31,7 +31,11 @@ class ScopeManager(object):
|
|
|
31
31
|
functions = []
|
|
32
32
|
classes = []
|
|
33
33
|
def process(namespace, parent, table):
|
|
34
|
-
|
|
34
|
+
if table.get_name() == 'top' and table.get_lineno() == 0:
|
|
35
|
+
name = ''
|
|
36
|
+
else:
|
|
37
|
+
name = table.get_name()
|
|
38
|
+
|
|
35
39
|
if name:
|
|
36
40
|
fullns = utils.join_ns(namespace, name)
|
|
37
41
|
else:
|
|
@@ -476,7 +476,7 @@ class ProcessingBase(ast.NodeVisitor):
|
|
|
476
476
|
|
|
477
477
|
fname = self.import_manager.get_filepath(imp)
|
|
478
478
|
|
|
479
|
-
if not fname or not self.import_manager.get_mod_dir() in fname:
|
|
479
|
+
if not fname or not fname.endswith(".py") or not self.import_manager.get_mod_dir() in fname:
|
|
480
480
|
return
|
|
481
481
|
|
|
482
482
|
self.import_manager.set_current_mod(imp, fname)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pycg
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Practical Python Call Graphs
|
|
5
5
|
Home-page: https://github.com/vitsalis/pycg
|
|
6
6
|
Author: Vitalis Salis
|
|
7
7
|
Author-email: vitsalis@gmail.com
|
|
8
8
|
License: Apache Software License
|
|
9
|
-
Platform: UNKNOWN
|
|
10
9
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Requires-Python: >=3.4
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENCE
|
|
14
14
|
|
|
@@ -32,7 +32,8 @@ In _43rd International Conference on Software Engineering, ICSE '21_,
|
|
|
32
32
|
|
|
33
33
|
# Installation
|
|
34
34
|
|
|
35
|
-
PyCG is implemented in Python3 and
|
|
35
|
+
PyCG is implemented in Python3 and requires Python version 3.4 or higher.
|
|
36
|
+
It also has no dependencies. Simply:
|
|
36
37
|
```
|
|
37
38
|
pip install pycg
|
|
38
39
|
```
|
|
@@ -147,5 +148,3 @@ From the root directory:
|
|
|
147
148
|
```
|
|
148
149
|
make test
|
|
149
150
|
```
|
|
150
|
-
|
|
151
|
-
|
|
@@ -32,7 +32,7 @@ def get_long_desc():
|
|
|
32
32
|
def setup_package():
|
|
33
33
|
setup(
|
|
34
34
|
name='pycg',
|
|
35
|
-
version='0.0.
|
|
35
|
+
version='0.0.6',
|
|
36
36
|
description='Practical Python Call Graphs',
|
|
37
37
|
long_description=get_long_desc(),
|
|
38
38
|
long_description_content_type="text/markdown",
|
|
@@ -40,6 +40,7 @@ def setup_package():
|
|
|
40
40
|
license='Apache Software License',
|
|
41
41
|
packages=find_packages(),
|
|
42
42
|
install_requires=[],
|
|
43
|
+
python_requires='>=3.4',
|
|
43
44
|
entry_points = {
|
|
44
45
|
'console_scripts': [
|
|
45
46
|
'pycg=pycg.__main__:main',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|