Skip to content

Commit

Permalink
Add support for Python 3.10 (#13)
Browse files Browse the repository at this point in the history
* Add support for Python 3.10

* Add Python 3.10 to testing matrix

* Surround version strings in quotes
  • Loading branch information
zzhengnan authored Oct 24, 2021
1 parent 7241097 commit 75ef3b1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@

Ever wondered which dependencies your Python project relies on? `iscan` gives you a clear view of all the third-party packages and standard library modules your project uses.

- [Quick start](#quick-start)
- [Installation](#installation)
- [Quick start](#quick-start)
- [Dependencies](#dependencies)
- [Usage](#usage)
- [Command line interface](#command-line-interface)
- [Python API](#python-api)

## Installation
`iscan` can be installed using either conda or pip.
```
$ conda install iscan -c conda-forge
$ python -m pip install iscan
```

## Quick start
Simply provide the path to your project. That's it!

Expand Down Expand Up @@ -49,13 +56,6 @@ warnings 3
...
```

## Installation
`iscan` can be installed using either conda or pip.
```
$ conda install iscan -c conda-forge
$ python -m pip install iscan
```

## Dependencies
`iscan` is light-weight and doesn't rely on anything outside the standard library. The core scanning functionality is built on top of the [ast](https://docs.python.org/3/library/ast.html#module-ast) module.

Expand Down Expand Up @@ -98,7 +98,7 @@ $ iscan --help
```

### Python API
The Python API provides a `run` function that returns the scanning result and import count in the form of two [Counter](https://docs.python.org/3/library/collections.html#collections.Counter) objects, split between third-party packages and standard library modules.
The Python API exposes a `run` function that returns the scanning result and import count in the form of two [Counter](https://docs.python.org/3/library/collections.html#collections.Counter) objects, split between third-party packages and standard library modules.
```python
>>> from iscan import run
>>> dir_to_scan = './requests'
Expand Down
2 changes: 1 addition & 1 deletion iscan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from iscan.scan import run


__version__ = '0.4.2'
__version__ = '0.4.3'
5 changes: 3 additions & 2 deletions iscan/std_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
STD_LIB_37 = ['contextvars', 'dataclasses']
STD_LIB_38 = [] # type: ignore
STD_LIB_39 = ['graphlib', 'zoneinfo']
STD_LIB_310 = [] # type: ignore

STD_LIB = STD_LIB_27 + STD_LIB_35 + STD_LIB_36 + STD_LIB_37 + STD_LIB_38 + STD_LIB_39
STD_LIB = STD_LIB_27 + STD_LIB_35 + STD_LIB_36 + STD_LIB_37 + STD_LIB_38 + STD_LIB_39 + STD_LIB_310


def separate_third_party_from_std_lib(packages: Iterable[str]) -> Tuple[List[str], List[str]]:
Expand Down Expand Up @@ -90,7 +91,7 @@ def get_std_lib(version: str) -> List[str]:


if __name__ == '__main__':
versions = ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9']
versions = ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
cumulative = []
for version in versions:
std_lib = get_std_lib(version)
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
version=iscan.__version__,
url='https://github.com/zzhengnan/iscan',
author='Zhengnan Zhao',
description="iscan helps you identify your project's dependencies",
description="iscan helps you identify your project's dependencies.",
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
packages=setuptools.find_packages(),
Expand All @@ -32,6 +32,7 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
]
Expand Down

0 comments on commit 75ef3b1

Please sign in to comment.