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.
Files changed (60) hide show
  1. {pycg-0.0.5 → pycg-0.0.6}/PKG-INFO +4 -5
  2. {pycg-0.0.5 → pycg-0.0.6}/README.md +2 -1
  3. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/imports.py +5 -1
  4. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/scopes.py +5 -1
  5. {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/base.py +1 -1
  6. {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/PKG-INFO +4 -5
  7. {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/entry_points.txt +0 -1
  8. {pycg-0.0.5 → pycg-0.0.6}/setup.py +2 -1
  9. {pycg-0.0.5 → pycg-0.0.6}/LICENCE +0 -0
  10. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/__init__.py +0 -0
  11. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/args_test.py +0 -0
  12. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/assignments_test.py +0 -0
  13. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/base.py +0 -0
  14. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/builtins_test.py +0 -0
  15. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/classes_test.py +0 -0
  16. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/create_pytests.py +0 -0
  17. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/decorators_test.py +0 -0
  18. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/dicts_test.py +0 -0
  19. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/direct_calls_test.py +0 -0
  20. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/dynamic_test.py +0 -0
  21. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/exceptions_test.py +0 -0
  22. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/external_test.py +0 -0
  23. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/functions_test.py +0 -0
  24. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/generators_test.py +0 -0
  25. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/imports_test.py +0 -0
  26. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/kwargs_test.py +0 -0
  27. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/lambdas_test.py +0 -0
  28. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/lists_test.py +0 -0
  29. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/mro_test.py +0 -0
  30. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark/returns_test.py +0 -0
  31. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark-key-errs/__init__.py +0 -0
  32. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark-key-errs/base.py +0 -0
  33. {pycg-0.0.5 → pycg-0.0.6}/micro-benchmark-key-errs/create_pytests.py +0 -0
  34. {pycg-0.0.5 → pycg-0.0.6}/pycg/__init__.py +0 -0
  35. {pycg-0.0.5 → pycg-0.0.6}/pycg/__main__.py +0 -0
  36. {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/__init__.py +0 -0
  37. {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/as_graph.py +0 -0
  38. {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/base.py +0 -0
  39. {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/fasten.py +0 -0
  40. {pycg-0.0.5 → pycg-0.0.6}/pycg/formats/simple.py +0 -0
  41. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/__init__.py +0 -0
  42. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/callgraph.py +0 -0
  43. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/classes.py +0 -0
  44. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/definitions.py +0 -0
  45. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/key_err.py +0 -0
  46. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/modules.py +0 -0
  47. {pycg-0.0.5 → pycg-0.0.6}/pycg/machinery/pointers.py +0 -0
  48. {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/__init__.py +0 -0
  49. {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/cgprocessor.py +0 -0
  50. {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/keyerrprocessor.py +0 -0
  51. {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/postprocessor.py +0 -0
  52. {pycg-0.0.5 → pycg-0.0.6}/pycg/processing/preprocessor.py +0 -0
  53. {pycg-0.0.5 → pycg-0.0.6}/pycg/pycg.py +0 -0
  54. {pycg-0.0.5 → pycg-0.0.6}/pycg/utils/__init__.py +0 -0
  55. {pycg-0.0.5 → pycg-0.0.6}/pycg/utils/common.py +0 -0
  56. {pycg-0.0.5 → pycg-0.0.6}/pycg/utils/constants.py +0 -0
  57. {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/SOURCES.txt +0 -0
  58. {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/dependency_links.txt +0 -0
  59. {pycg-0.0.5 → pycg-0.0.6}/pycg.egg-info/top_level.txt +0 -0
  60. {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.5
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 has no dependencies. Simply:
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 has no dependencies. Simply:
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
- return importlib.import_module(mod_name, package=package)
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
- name = table.get_name() if table.get_name() != 'top' else ''
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.5
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 has no dependencies. Simply:
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
-
@@ -1,3 +1,2 @@
1
1
  [console_scripts]
2
2
  pycg = pycg.__main__:main
3
-
@@ -32,7 +32,7 @@ def get_long_desc():
32
32
  def setup_package():
33
33
  setup(
34
34
  name='pycg',
35
- version='0.0.5',
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