-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release 3.11.0.0
- Loading branch information
Showing
14 changed files
with
190 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,9 @@ jobs: | |
tests: | ||
strategy: | ||
matrix: | ||
python-version: [ 310 ] | ||
python-version: | ||
- 310 | ||
- 311 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
CHANGELOG | ||
========= | ||
|
||
3.11.0.0 | ||
======== | ||
|
||
* Support for Python 3.11 | ||
|
||
|
||
3.9.1.9 | ||
======= | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ pyVersion ? "311" | ||
, isDevEnv ? true | ||
}: | ||
|
||
let | ||
commonEnv = import ./nixpkgs {}; | ||
pkgs = commonEnv.pkgs; | ||
|
||
python = pkgs."python${pyVersion}"; | ||
pythonPkgs = pkgs."python${pyVersion}Packages"; | ||
devLibs = if isDevEnv then [ pythonPkgs.twine pythonPkgs.wheel ] else [ pythonPkgs.coveralls ]; | ||
|
||
# Make a new "derivation" that represents our shell | ||
devEnv = pkgs.mkShellNoCC { | ||
name = "typeit"; | ||
|
||
# The packages in the `buildInputs` list will be added to the PATH in our shell | ||
# Python-specific guide: | ||
# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md | ||
nativeBuildInputs = with pkgs; [ | ||
# see https://nixos.org/nixos/packages.html | ||
# Python distribution | ||
python | ||
pythonPkgs.virtualenv | ||
ncurses | ||
libxml2 | ||
libxslt | ||
libzip | ||
zlib | ||
which | ||
] ++ devLibs; | ||
shellHook = '' | ||
# set SOURCE_DATE_EPOCH so that we can use python wheels | ||
export SOURCE_DATE_EPOCH=$(date +%s) | ||
export VENV_DIR="$PWD/.venv${pyVersion}" | ||
export PATH=$VENV_DIR/bin:$PATH | ||
export PYTHONPATH="" | ||
export LANG=en_US.UTF-8 | ||
# https://python-poetry.org/docs/configuration/ | ||
export PIP_CACHE_DIR="$PWD/.local/pip-cache${pyVersion}" | ||
# Setup virtualenv | ||
if [ ! -d $VENV_DIR ]; then | ||
virtualenv $VENV_DIR | ||
pip install -r requirements/minimal.txt | ||
pip install -r requirements/test.txt | ||
pip install -r requirements/extras/third_party.txt | ||
fi | ||
''; | ||
}; | ||
in | ||
|
||
{ | ||
inherit devEnv; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{}: | ||
|
||
let | ||
|
||
common-src = builtins.fetchTarball { | ||
name = "common-2023-03-03"; | ||
url = https://github.com/avanov/nix-common/archive/a30f466f3ac73842d111e80f40f287d8aa13e929.tar.gz; | ||
# Hash obtained using `nix-prefetch-url --unpack <url>` | ||
sha256 = "sha256:1dimd334ay4jx4n81n5ms8p4i9kpyn0z7mm8xa0kcy2cpdlbq798"; | ||
}; | ||
|
||
overlays = import ./overlays.nix {}; | ||
pkgs = (import common-src { projectOverlays = [ overlays.globalPackageOverlay ]; }).pkgs; | ||
|
||
in | ||
|
||
{ | ||
inherit pkgs; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{}: | ||
|
||
let | ||
|
||
globalPackageOverlay = (self: original: rec { | ||
# Place overrides here as described in https://nixos.wiki/wiki/Overlays#Examples_of_overlays | ||
}); | ||
|
||
in | ||
|
||
{ | ||
inherit globalPackageOverlay; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
inflection>=0.4.0,<0.6.0 | ||
colander>=1.7.0,<1.9.0 | ||
pyrsistent>=0.18.1,<0.19 | ||
typing-inspect>=0.7.1,<0.8.0 | ||
typing-extensions>=4.2,<4.3 | ||
colander>=1.7.0,<2.1 | ||
pyrsistent>=0.19.3 | ||
typing-inspect>=0.7.1,<0.9 | ||
typing-extensions>=4.2,<4.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,4 @@ | ||
{ | ||
pkgs ? (import (builtins.fetchGit { | ||
url = "https://github.com/avanov/nix-common.git"; | ||
ref = "master"; | ||
rev = "be2dc05bf6beac92fc12da9a2adae6994c9f2ee6"; | ||
}) {}).pkgs | ||
, pyVersion ? "310" | ||
, isDevEnv ? true | ||
}: | ||
|
||
let | ||
|
||
python = pkgs."python${pyVersion}"; | ||
pythonPkgs = pkgs."python${pyVersion}Packages"; | ||
devLibs = if isDevEnv then [ pythonPkgs.twine pythonPkgs.wheel ] else [ pythonPkgs.coveralls ]; | ||
repository = import ./default.nix {}; | ||
in | ||
|
||
# Make a new "derivation" that represents our shell | ||
pkgs.mkShellNoCC { | ||
name = "typeit"; | ||
|
||
# The packages in the `buildInputs` list will be added to the PATH in our shell | ||
# Python-specific guide: | ||
# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md | ||
nativeBuildInputs = with pkgs; [ | ||
# see https://nixos.org/nixos/packages.html | ||
# Python distribution | ||
python | ||
pythonPkgs.virtualenv | ||
ncurses | ||
libxml2 | ||
libxslt | ||
libzip | ||
zlib | ||
which | ||
] ++ devLibs; | ||
shellHook = '' | ||
# set SOURCE_DATE_EPOCH so that we can use python wheels | ||
export SOURCE_DATE_EPOCH=$(date +%s) | ||
export VENV_DIR="$PWD/.venv${pyVersion}" | ||
export PATH=$VENV_DIR/bin:$PATH | ||
export PYTHONPATH="" | ||
export LANG=en_US.UTF-8 | ||
# https://python-poetry.org/docs/configuration/ | ||
export PIP_CACHE_DIR="$PWD/.local/pip-cache${pyVersion}" | ||
# Setup virtualenv | ||
if [ ! -d $VENV_DIR ]; then | ||
virtualenv $VENV_DIR | ||
pip install -r requirements/minimal.txt | ||
pip install -r requirements/test.txt | ||
pip install -r requirements/extras/third_party.txt | ||
fi | ||
''; | ||
} | ||
repository.devEnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from typing import Type, get_type_hints, NamedTuple, Union, ForwardRef, Any, Generator | ||
|
||
NoneType = type(None) | ||
|
||
|
||
class AttrInfo(NamedTuple): | ||
name: str | ||
resolved_type: Type | ||
raw_type: Union[Type, ForwardRef] | ||
|
||
|
||
def get_type_attribute_info(typ: Type) -> Generator[AttrInfo, Any, None]: | ||
raw = getattr(typ, '__annotations__', {}) | ||
existing_only = lambda x: x[1] is not NoneType | ||
return (AttrInfo(name, t, raw.get(name, t)) for name, t in filter(existing_only, get_type_hints(typ).items())) |
Oops, something went wrong.