Someshfengde
commited on
Commit
•
5761122
1
Parent(s):
7426835
Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .bashrc +10 -0
- .condarc +1 -0
- .gitattributes +4 -0
- .gitconfig +8 -0
- .hushlogin +0 -0
- .idea/this_studio.iml +54 -0
- .ipython/profile_default/history.sqlite +0 -0
- .ipython/profile_default/startup/README +11 -0
- .kaggle/kaggle.json +1 -0
- .lightning_studio/.studiorc +4 -0
- .lightning_studio/on_start.sh +13 -0
- .lightningignore +25 -0
- .profile +32 -0
- .python_history +7 -0
- .sudo_as_admin_successful +0 -0
- .venv/.gitignore +1 -0
- .venv/CACHEDIR.TAG +1 -0
- .venv/bin/activate +108 -0
- .venv/bin/activate.bat +59 -0
- .venv/bin/activate.csh +76 -0
- .venv/bin/activate.fish +124 -0
- .venv/bin/activate.nu +117 -0
- .venv/bin/activate.ps1 +82 -0
- .venv/bin/activate_this.py +57 -0
- .venv/bin/deactivate.bat +39 -0
- .venv/bin/huggingface-cli +8 -0
- .venv/bin/kaggle +8 -0
- .venv/bin/normalizer +8 -0
- .venv/bin/pydoc.bat +22 -0
- .venv/bin/python +3 -0
- .venv/bin/python3 +3 -0
- .venv/bin/python3.10 +3 -0
- .venv/bin/slugify +8 -0
- .venv/bin/tqdm +8 -0
- .venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/INSTALLER +1 -0
- .venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/LICENSE +20 -0
- .venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/METADATA +46 -0
- .venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/RECORD +25 -0
- .venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/WHEEL +6 -0
- .venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/top_level.txt +2 -0
- .venv/lib/python3.10/site-packages/__pycache__/_virtualenv.cpython-310.pyc +0 -0
- .venv/lib/python3.10/site-packages/__pycache__/six.cpython-310.pyc +0 -0
- .venv/lib/python3.10/site-packages/_virtualenv.pth +3 -0
- .venv/lib/python3.10/site-packages/_virtualenv.py +103 -0
- .venv/lib/python3.10/site-packages/_yaml/__init__.py +33 -0
- .venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/INSTALLER +1 -0
- .venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/LICENSE +13 -0
- .venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/METADATA +1247 -0
- .venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/RECORD +60 -0
- .venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/WHEEL +5 -0
.bashrc
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Set the encoding for SSH since ssh can't inherit the ENV
|
2 |
+
export LC_ALL=C.UTF-8
|
3 |
+
export LANG=C.UTF-8
|
4 |
+
|
5 |
+
# Set HOME
|
6 |
+
export HOME="/teamspace/studios/this_studio"
|
7 |
+
|
8 |
+
# >>> lightning managed. do not modify >>>
|
9 |
+
[ -f /settings/.lightningrc ] && source /settings/.lightningrc bash
|
10 |
+
# <<< lightning managed. do not modify <<<
|
.condarc
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
changeps1: false
|
.gitattributes
CHANGED
@@ -32,3 +32,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
35 |
+
.venv/bin/python filter=lfs diff=lfs merge=lfs -text
|
36 |
+
.venv/bin/python3 filter=lfs diff=lfs merge=lfs -text
|
37 |
+
.venv/bin/python3.10 filter=lfs diff=lfs merge=lfs -text
|
38 |
+
.venv/lib/python3.10/site-packages/yaml/_yaml.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
.gitconfig
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[core]
|
2 |
+
excludesfile = /settings/.global_gitignore
|
3 |
+
[credential "https://github.com"]
|
4 |
+
helper =
|
5 |
+
helper = !/usr/bin/gh auth git-credential
|
6 |
+
[credential "https://gist.github.com"]
|
7 |
+
helper =
|
8 |
+
helper = !/usr/bin/gh auth git-credential
|
.hushlogin
ADDED
File without changes
|
.idea/this_studio.iml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<module version="4">
|
3 |
+
<component name="NewModuleRootManager">
|
4 |
+
<content url="file://$MODULE_DIR$">
|
5 |
+
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
6 |
+
<excludeFolder url="file://$MODULE_DIR$/lightning-annotations.json" />
|
7 |
+
<excludeFolder url="file://$MODULE_DIR$/.lightning-app-sync" />
|
8 |
+
<excludeFolder url="file://$MODULE_DIR$/.lightning-app-run" />
|
9 |
+
<excludeFolder url="file://$MODULE_DIR$/.lightning-upload" />
|
10 |
+
<excludeFolder url="file://$MODULE_DIR$/.ssh" />
|
11 |
+
<excludeFolder url="file://$MODULE_DIR$/.conda" />
|
12 |
+
<excludeFolder url="file://$MODULE_DIR$/.config" />
|
13 |
+
<excludeFolder url="file://$MODULE_DIR$/.npm" />
|
14 |
+
<excludeFolder url="file://$MODULE_DIR$/.nvm" />
|
15 |
+
<excludeFolder url="file://$MODULE_DIR$/.bower" />
|
16 |
+
<excludeFolder url="file://$MODULE_DIR$/.ipython" />
|
17 |
+
<excludeFolder url="file://$MODULE_DIR$/.local" />
|
18 |
+
<excludeFolder url="file://$MODULE_DIR$/.oh-my-zsh" />
|
19 |
+
<excludeFolder url="file://$MODULE_DIR$/.cache" />
|
20 |
+
<excludeFolder url="file://$MODULE_DIR$/miniconda3" />
|
21 |
+
<excludeFolder url="file://$MODULE_DIR$/.condarc" />
|
22 |
+
<excludeFolder url="file://$MODULE_DIR$/.gitconfig" />
|
23 |
+
<excludeFolder url="file://$MODULE_DIR$/.hushlogin" />
|
24 |
+
<excludeFolder url="file://$MODULE_DIR$/.profile" />
|
25 |
+
<excludeFolder url="file://$MODULE_DIR$/.screenrc" />
|
26 |
+
<excludeFolder url="file://$MODULE_DIR$/.sudo_as_admin_successful" />
|
27 |
+
<excludeFolder url="file://$MODULE_DIR$/.zcompdump" />
|
28 |
+
<excludeFolder url="file://$MODULE_DIR$/.bash_history" />
|
29 |
+
<excludeFolder url="file://$MODULE_DIR$/.bashrc" />
|
30 |
+
<excludeFolder url="file://$MODULE_DIR$/.zsh_history" />
|
31 |
+
<excludeFolder url="file://$MODULE_DIR$/.zshrc" />
|
32 |
+
<excludeFolder url="file://$MODULE_DIR$/.zshenv" />
|
33 |
+
<excludeFolder url="file://$MODULE_DIR$/.zlogin" />
|
34 |
+
<excludeFolder url="file://$MODULE_DIR$/.zprofile" />
|
35 |
+
<excludeFolder url="file://$MODULE_DIR$/.zlogout" />
|
36 |
+
<excludeFolder url="file://$MODULE_DIR$/.python_history" />
|
37 |
+
<excludeFolder url="file://$MODULE_DIR$/.lightningignore" />
|
38 |
+
<excludeFolder url="file://$MODULE_DIR$/.nv" />
|
39 |
+
<excludeFolder url="file://$MODULE_DIR$/.docker" />
|
40 |
+
<excludeFolder url="file://$MODULE_DIR$/.jupyter" />
|
41 |
+
<excludeFolder url="file://$MODULE_DIR$/.lightning" />
|
42 |
+
<excludeFolder url="file://$MODULE_DIR$/.vscode" />
|
43 |
+
<excludeFolder url="file://$MODULE_DIR$/.wget-hsts" />
|
44 |
+
<excludeFolder url="file://$MODULE_DIR$/.vscode-server" />
|
45 |
+
<excludeFolder url="file://$MODULE_DIR$/.vscode-server-insiders" />
|
46 |
+
<excludeFolder url="file://$MODULE_DIR$/.tmplaigit" />
|
47 |
+
<excludeFolder url="file://$MODULE_DIR$/.viminfo" />
|
48 |
+
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
49 |
+
<excludeFolder url="file://$MODULE_DIR$/.java" />
|
50 |
+
</content>
|
51 |
+
<orderEntry type="inheritedJdk" />
|
52 |
+
<orderEntry type="sourceFolder" forTests="false" />
|
53 |
+
</component>
|
54 |
+
</module>
|
.ipython/profile_default/history.sqlite
ADDED
Binary file (414 kB). View file
|
|
.ipython/profile_default/startup/README
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
This is the IPython startup directory
|
2 |
+
|
3 |
+
.py and .ipy files in this directory will be run *prior* to any code or files specified
|
4 |
+
via the exec_lines or exec_files configurables whenever you load this profile.
|
5 |
+
|
6 |
+
Files will be run in lexicographical order, so you can control the execution order of files
|
7 |
+
with a prefix, e.g.::
|
8 |
+
|
9 |
+
00-first.py
|
10 |
+
50-middle.py
|
11 |
+
99-last.ipy
|
.kaggle/kaggle.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"username":"somesh88","key":"397c27d216acbf28a7eb22b096a42f34"}
|
.lightning_studio/.studiorc
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This script is only for your user and runs in every shell you open.
|
2 |
+
# Use it to personalize your shell.
|
3 |
+
#
|
4 |
+
# Example: export MY_KEY=abcd-1234
|
.lightning_studio/on_start.sh
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# This script runs every time your Studio starts, from your home directory.
|
4 |
+
|
5 |
+
# List files under fast_load that need to load quickly on start (e.g. model checkpoints).
|
6 |
+
#
|
7 |
+
# ! fast_load
|
8 |
+
# <your file here>
|
9 |
+
|
10 |
+
# Add your startup commands below.
|
11 |
+
#
|
12 |
+
# Example: streamlit run my_app.py
|
13 |
+
# Example: gradio my_app.py
|
.lightningignore
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.cache
|
2 |
+
.conda
|
3 |
+
.condarc
|
4 |
+
.config
|
5 |
+
.gitconfig
|
6 |
+
.hushlogin
|
7 |
+
.ipython
|
8 |
+
.local
|
9 |
+
.oh-my-zsh
|
10 |
+
.profile
|
11 |
+
.screenrc
|
12 |
+
.ssh
|
13 |
+
.sudo_as_admin_successful
|
14 |
+
.zcompdump*
|
15 |
+
.zsh_history
|
16 |
+
.zshrc
|
17 |
+
.zshenv
|
18 |
+
.zlogin
|
19 |
+
.zprofile
|
20 |
+
.zlogout
|
21 |
+
.lightning
|
22 |
+
.nv
|
23 |
+
.nvm
|
24 |
+
.npm
|
25 |
+
.bower
|
.profile
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ~/.profile: executed by the command interpreter for login shells.
|
2 |
+
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
3 |
+
# exists.
|
4 |
+
# see /usr/share/doc/bash/examples/startup-files for examples.
|
5 |
+
# the files are located in the bash-doc package.
|
6 |
+
|
7 |
+
# the default umask is set in /etc/profile; for setting the umask
|
8 |
+
# for ssh logins, install and configure the libpam-umask package.
|
9 |
+
#umask 022
|
10 |
+
|
11 |
+
# if running bash
|
12 |
+
if [ -n "$BASH_VERSION" ]; then
|
13 |
+
# include .bashrc if it exists
|
14 |
+
if [ -f "$HOME/.bashrc" ]; then
|
15 |
+
. "$HOME/.bashrc"
|
16 |
+
fi
|
17 |
+
fi
|
18 |
+
|
19 |
+
# set PATH so it includes user's private bin if it exists
|
20 |
+
if [ -d "$HOME/bin" ] ; then
|
21 |
+
PATH="$HOME/bin:$PATH"
|
22 |
+
fi
|
23 |
+
|
24 |
+
# set PATH so it includes user's private bin if it exists
|
25 |
+
if [ -d "$HOME/.local/bin" ] ; then
|
26 |
+
PATH="$HOME/.local/bin:$PATH"
|
27 |
+
fi
|
28 |
+
|
29 |
+
# set PATH so it includes commands for non-zsh shells
|
30 |
+
if [ -d "/commands" ] ; then
|
31 |
+
PATH="/commands:${PATH/\/commands/}"
|
32 |
+
fi
|
.python_history
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
private_testset"
|
2 |
+
# image_path = os.path.join(images_root_path, str(row.filename))
|
3 |
+
exit()
|
4 |
+
test_metadata['filename'] = ['../sample.png', '../sample copy.png', '../sample copy 2.png']
|
5 |
+
test_metadata['observation_id'] = [1, 2, 3]
|
6 |
+
eixt()
|
7 |
+
exit()
|
.sudo_as_admin_successful
ADDED
File without changes
|
.venv/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*
|
.venv/CACHEDIR.TAG
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Signature: 8a477f597d28d172789f06886806bc55
|
.venv/bin/activate
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
#
|
3 |
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
# a copy of this software and associated documentation files (the
|
5 |
+
# "Software"), to deal in the Software without restriction, including
|
6 |
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
# permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
# the following conditions:
|
10 |
+
#
|
11 |
+
# The above copyright notice and this permission notice shall be
|
12 |
+
# included in all copies or substantial portions of the Software.
|
13 |
+
#
|
14 |
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
# This file must be used with "source bin/activate" *from bash*
|
23 |
+
# you cannot run it directly
|
24 |
+
|
25 |
+
|
26 |
+
if [ "${BASH_SOURCE-}" = "$0" ]; then
|
27 |
+
echo "You must source this script: \$ source $0" >&2
|
28 |
+
exit 33
|
29 |
+
fi
|
30 |
+
|
31 |
+
deactivate () {
|
32 |
+
unset -f pydoc >/dev/null 2>&1 || true
|
33 |
+
|
34 |
+
# reset old environment variables
|
35 |
+
# ! [ -z ${VAR+_} ] returns true if VAR is declared at all
|
36 |
+
if ! [ -z "${_OLD_VIRTUAL_PATH:+_}" ] ; then
|
37 |
+
PATH="$_OLD_VIRTUAL_PATH"
|
38 |
+
export PATH
|
39 |
+
unset _OLD_VIRTUAL_PATH
|
40 |
+
fi
|
41 |
+
if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
|
42 |
+
PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
|
43 |
+
export PYTHONHOME
|
44 |
+
unset _OLD_VIRTUAL_PYTHONHOME
|
45 |
+
fi
|
46 |
+
|
47 |
+
# The hash command must be called to get it to forget past
|
48 |
+
# commands. Without forgetting past commands the $PATH changes
|
49 |
+
# we made may not be respected
|
50 |
+
hash -r 2>/dev/null
|
51 |
+
|
52 |
+
if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
|
53 |
+
PS1="$_OLD_VIRTUAL_PS1"
|
54 |
+
export PS1
|
55 |
+
unset _OLD_VIRTUAL_PS1
|
56 |
+
fi
|
57 |
+
|
58 |
+
unset VIRTUAL_ENV
|
59 |
+
unset VIRTUAL_ENV_PROMPT
|
60 |
+
if [ ! "${1-}" = "nondestructive" ] ; then
|
61 |
+
# Self destruct!
|
62 |
+
unset -f deactivate
|
63 |
+
fi
|
64 |
+
}
|
65 |
+
|
66 |
+
# unset irrelevant variables
|
67 |
+
deactivate nondestructive
|
68 |
+
|
69 |
+
VIRTUAL_ENV='/teamspace/studios/this_studio/.venv'
|
70 |
+
if ([ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]) && $(command -v cygpath &> /dev/null) ; then
|
71 |
+
VIRTUAL_ENV=$(cygpath -u "$VIRTUAL_ENV")
|
72 |
+
fi
|
73 |
+
export VIRTUAL_ENV
|
74 |
+
|
75 |
+
_OLD_VIRTUAL_PATH="$PATH"
|
76 |
+
PATH="$VIRTUAL_ENV/bin:$PATH"
|
77 |
+
export PATH
|
78 |
+
|
79 |
+
if [ "xthis_studio" != x ] ; then
|
80 |
+
VIRTUAL_ENV_PROMPT="this_studio"
|
81 |
+
else
|
82 |
+
VIRTUAL_ENV_PROMPT=$(basename "$VIRTUAL_ENV")
|
83 |
+
fi
|
84 |
+
export VIRTUAL_ENV_PROMPT
|
85 |
+
|
86 |
+
# unset PYTHONHOME if set
|
87 |
+
if ! [ -z "${PYTHONHOME+_}" ] ; then
|
88 |
+
_OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
|
89 |
+
unset PYTHONHOME
|
90 |
+
fi
|
91 |
+
|
92 |
+
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
|
93 |
+
_OLD_VIRTUAL_PS1="${PS1-}"
|
94 |
+
PS1="(${VIRTUAL_ENV_PROMPT}) ${PS1-}"
|
95 |
+
export PS1
|
96 |
+
fi
|
97 |
+
|
98 |
+
# Make sure to unalias pydoc if it's already there
|
99 |
+
alias pydoc 2>/dev/null >/dev/null && unalias pydoc || true
|
100 |
+
|
101 |
+
pydoc () {
|
102 |
+
python -m pydoc "$@"
|
103 |
+
}
|
104 |
+
|
105 |
+
# The hash command must be called to get it to forget past
|
106 |
+
# commands. Without forgetting past commands the $PATH changes
|
107 |
+
# we made may not be respected
|
108 |
+
hash -r 2>/dev/null
|
.venv/bin/activate.bat
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@REM Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
@REM
|
3 |
+
@REM Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
@REM a copy of this software and associated documentation files (the
|
5 |
+
@REM "Software"), to deal in the Software without restriction, including
|
6 |
+
@REM without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
@REM distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
@REM permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
@REM the following conditions:
|
10 |
+
@REM
|
11 |
+
@REM The above copyright notice and this permission notice shall be
|
12 |
+
@REM included in all copies or substantial portions of the Software.
|
13 |
+
@REM
|
14 |
+
@REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
@REM EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
@REM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
@REM NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
@REM LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
@REM OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
@REM WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
@set "VIRTUAL_ENV=/teamspace/studios/this_studio/.venv"
|
23 |
+
|
24 |
+
@set "VIRTUAL_ENV_PROMPT=this_studio"
|
25 |
+
@if NOT DEFINED VIRTUAL_ENV_PROMPT (
|
26 |
+
@for %%d in ("%VIRTUAL_ENV%") do @set "VIRTUAL_ENV_PROMPT=%%~nxd"
|
27 |
+
)
|
28 |
+
|
29 |
+
@if defined _OLD_VIRTUAL_PROMPT (
|
30 |
+
@set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
|
31 |
+
) else (
|
32 |
+
@if not defined PROMPT (
|
33 |
+
@set "PROMPT=$P$G"
|
34 |
+
)
|
35 |
+
@if not defined VIRTUAL_ENV_DISABLE_PROMPT (
|
36 |
+
@set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
|
37 |
+
)
|
38 |
+
)
|
39 |
+
@if not defined VIRTUAL_ENV_DISABLE_PROMPT (
|
40 |
+
@set "PROMPT=(%VIRTUAL_ENV_PROMPT%) %PROMPT%"
|
41 |
+
)
|
42 |
+
|
43 |
+
@REM Don't use () to avoid problems with them in %PATH%
|
44 |
+
@if defined _OLD_VIRTUAL_PYTHONHOME @goto ENDIFVHOME
|
45 |
+
@set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"
|
46 |
+
:ENDIFVHOME
|
47 |
+
|
48 |
+
@set PYTHONHOME=
|
49 |
+
|
50 |
+
@REM if defined _OLD_VIRTUAL_PATH (
|
51 |
+
@if not defined _OLD_VIRTUAL_PATH @goto ENDIFVPATH1
|
52 |
+
@set "PATH=%_OLD_VIRTUAL_PATH%"
|
53 |
+
:ENDIFVPATH1
|
54 |
+
@REM ) else (
|
55 |
+
@if defined _OLD_VIRTUAL_PATH @goto ENDIFVPATH2
|
56 |
+
@set "_OLD_VIRTUAL_PATH=%PATH%"
|
57 |
+
:ENDIFVPATH2
|
58 |
+
|
59 |
+
@set "PATH=%VIRTUAL_ENV%\bin;%PATH%"
|
.venv/bin/activate.csh
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
#
|
3 |
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
# a copy of this software and associated documentation files (the
|
5 |
+
# "Software"), to deal in the Software without restriction, including
|
6 |
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
# permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
# the following conditions:
|
10 |
+
#
|
11 |
+
# The above copyright notice and this permission notice shall be
|
12 |
+
# included in all copies or substantial portions of the Software.
|
13 |
+
#
|
14 |
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
# This file must be used with "source bin/activate.csh" *from csh*.
|
23 |
+
# You cannot run it directly.
|
24 |
+
# Created by Davide Di Blasi <davidedb@gmail.com>.
|
25 |
+
|
26 |
+
set newline='\
|
27 |
+
'
|
28 |
+
|
29 |
+
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH:q" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT:q" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc'
|
30 |
+
|
31 |
+
# Unset irrelevant variables.
|
32 |
+
deactivate nondestructive
|
33 |
+
|
34 |
+
setenv VIRTUAL_ENV '/teamspace/studios/this_studio/.venv'
|
35 |
+
|
36 |
+
set _OLD_VIRTUAL_PATH="$PATH:q"
|
37 |
+
setenv PATH "$VIRTUAL_ENV:q/bin:$PATH:q"
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
if ('this_studio' != "") then
|
42 |
+
setenv VIRTUAL_ENV_PROMPT 'this_studio'
|
43 |
+
else
|
44 |
+
setenv VIRTUAL_ENV_PROMPT "$VIRTUAL_ENV:t:q"
|
45 |
+
endif
|
46 |
+
|
47 |
+
if ( $?VIRTUAL_ENV_DISABLE_PROMPT ) then
|
48 |
+
if ( $VIRTUAL_ENV_DISABLE_PROMPT == "" ) then
|
49 |
+
set do_prompt = "1"
|
50 |
+
else
|
51 |
+
set do_prompt = "0"
|
52 |
+
endif
|
53 |
+
else
|
54 |
+
set do_prompt = "1"
|
55 |
+
endif
|
56 |
+
|
57 |
+
if ( $do_prompt == "1" ) then
|
58 |
+
# Could be in a non-interactive environment,
|
59 |
+
# in which case, $prompt is undefined and we wouldn't
|
60 |
+
# care about the prompt anyway.
|
61 |
+
if ( $?prompt ) then
|
62 |
+
set _OLD_VIRTUAL_PROMPT="$prompt:q"
|
63 |
+
if ( "$prompt:q" =~ *"$newline:q"* ) then
|
64 |
+
:
|
65 |
+
else
|
66 |
+
set prompt = '('"$VIRTUAL_ENV_PROMPT:q"') '"$prompt:q"
|
67 |
+
endif
|
68 |
+
endif
|
69 |
+
endif
|
70 |
+
|
71 |
+
unset env_name
|
72 |
+
unset do_prompt
|
73 |
+
|
74 |
+
alias pydoc python -m pydoc
|
75 |
+
|
76 |
+
rehash
|
.venv/bin/activate.fish
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
#
|
3 |
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
# a copy of this software and associated documentation files (the
|
5 |
+
# "Software"), to deal in the Software without restriction, including
|
6 |
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
# permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
# the following conditions:
|
10 |
+
#
|
11 |
+
# The above copyright notice and this permission notice shall be
|
12 |
+
# included in all copies or substantial portions of the Software.
|
13 |
+
#
|
14 |
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
# This file must be used using `source bin/activate.fish` *within a running fish ( http://fishshell.com ) session*.
|
23 |
+
# Do not run it directly.
|
24 |
+
|
25 |
+
function _bashify_path -d "Converts a fish path to something bash can recognize"
|
26 |
+
set fishy_path $argv
|
27 |
+
set bashy_path $fishy_path[1]
|
28 |
+
for path_part in $fishy_path[2..-1]
|
29 |
+
set bashy_path "$bashy_path:$path_part"
|
30 |
+
end
|
31 |
+
echo $bashy_path
|
32 |
+
end
|
33 |
+
|
34 |
+
function _fishify_path -d "Converts a bash path to something fish can recognize"
|
35 |
+
echo $argv | tr ':' '\n'
|
36 |
+
end
|
37 |
+
|
38 |
+
function deactivate -d 'Exit virtualenv mode and return to the normal environment.'
|
39 |
+
# reset old environment variables
|
40 |
+
if test -n "$_OLD_VIRTUAL_PATH"
|
41 |
+
# https://github.com/fish-shell/fish-shell/issues/436 altered PATH handling
|
42 |
+
if test (echo $FISH_VERSION | head -c 1) -lt 3
|
43 |
+
set -gx PATH (_fishify_path "$_OLD_VIRTUAL_PATH")
|
44 |
+
else
|
45 |
+
set -gx PATH $_OLD_VIRTUAL_PATH
|
46 |
+
end
|
47 |
+
set -e _OLD_VIRTUAL_PATH
|
48 |
+
end
|
49 |
+
|
50 |
+
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
|
51 |
+
set -gx PYTHONHOME "$_OLD_VIRTUAL_PYTHONHOME"
|
52 |
+
set -e _OLD_VIRTUAL_PYTHONHOME
|
53 |
+
end
|
54 |
+
|
55 |
+
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
56 |
+
and functions -q _old_fish_prompt
|
57 |
+
# Set an empty local `$fish_function_path` to allow the removal of `fish_prompt` using `functions -e`.
|
58 |
+
set -l fish_function_path
|
59 |
+
|
60 |
+
# Erase virtualenv's `fish_prompt` and restore the original.
|
61 |
+
functions -e fish_prompt
|
62 |
+
functions -c _old_fish_prompt fish_prompt
|
63 |
+
functions -e _old_fish_prompt
|
64 |
+
set -e _OLD_FISH_PROMPT_OVERRIDE
|
65 |
+
end
|
66 |
+
|
67 |
+
set -e VIRTUAL_ENV
|
68 |
+
set -e VIRTUAL_ENV_PROMPT
|
69 |
+
|
70 |
+
if test "$argv[1]" != 'nondestructive'
|
71 |
+
# Self-destruct!
|
72 |
+
functions -e pydoc
|
73 |
+
functions -e deactivate
|
74 |
+
functions -e _bashify_path
|
75 |
+
functions -e _fishify_path
|
76 |
+
end
|
77 |
+
end
|
78 |
+
|
79 |
+
# Unset irrelevant variables.
|
80 |
+
deactivate nondestructive
|
81 |
+
|
82 |
+
set -gx VIRTUAL_ENV '/teamspace/studios/this_studio/.venv'
|
83 |
+
|
84 |
+
# https://github.com/fish-shell/fish-shell/issues/436 altered PATH handling
|
85 |
+
if test (echo $FISH_VERSION | head -c 1) -lt 3
|
86 |
+
set -gx _OLD_VIRTUAL_PATH (_bashify_path $PATH)
|
87 |
+
else
|
88 |
+
set -gx _OLD_VIRTUAL_PATH $PATH
|
89 |
+
end
|
90 |
+
set -gx PATH "$VIRTUAL_ENV"'/bin' $PATH
|
91 |
+
|
92 |
+
# Prompt override provided?
|
93 |
+
# If not, just use the environment name.
|
94 |
+
if test -n 'this_studio'
|
95 |
+
set -gx VIRTUAL_ENV_PROMPT 'this_studio'
|
96 |
+
else
|
97 |
+
set -gx VIRTUAL_ENV_PROMPT (basename "$VIRTUAL_ENV")
|
98 |
+
end
|
99 |
+
|
100 |
+
# Unset `$PYTHONHOME` if set.
|
101 |
+
if set -q PYTHONHOME
|
102 |
+
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
|
103 |
+
set -e PYTHONHOME
|
104 |
+
end
|
105 |
+
|
106 |
+
function pydoc
|
107 |
+
python -m pydoc $argv
|
108 |
+
end
|
109 |
+
|
110 |
+
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
|
111 |
+
# Copy the current `fish_prompt` function as `_old_fish_prompt`.
|
112 |
+
functions -c fish_prompt _old_fish_prompt
|
113 |
+
|
114 |
+
function fish_prompt
|
115 |
+
# Run the user's prompt first; it might depend on (pipe)status.
|
116 |
+
set -l prompt (_old_fish_prompt)
|
117 |
+
|
118 |
+
printf '(%s) ' $VIRTUAL_ENV_PROMPT
|
119 |
+
|
120 |
+
string join -- \n $prompt # handle multi-line prompts
|
121 |
+
end
|
122 |
+
|
123 |
+
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
|
124 |
+
end
|
.venv/bin/activate.nu
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
#
|
3 |
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
# a copy of this software and associated documentation files (the
|
5 |
+
# "Software"), to deal in the Software without restriction, including
|
6 |
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
# permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
# the following conditions:
|
10 |
+
#
|
11 |
+
# The above copyright notice and this permission notice shall be
|
12 |
+
# included in all copies or substantial portions of the Software.
|
13 |
+
#
|
14 |
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
# virtualenv activation module
|
23 |
+
# Activate with `overlay use activate.nu`
|
24 |
+
# Deactivate with `deactivate`, as usual
|
25 |
+
#
|
26 |
+
# To customize the overlay name, you can call `overlay use activate.nu as foo`,
|
27 |
+
# but then simply `deactivate` won't work because it is just an alias to hide
|
28 |
+
# the "activate" overlay. You'd need to call `overlay hide foo` manually.
|
29 |
+
|
30 |
+
export-env {
|
31 |
+
def is-string [x] {
|
32 |
+
($x | describe) == 'string'
|
33 |
+
}
|
34 |
+
|
35 |
+
def has-env [...names] {
|
36 |
+
$names | each {|n|
|
37 |
+
$n in $env
|
38 |
+
} | all {|i| $i == true}
|
39 |
+
}
|
40 |
+
|
41 |
+
# Emulates a `test -z`, but btter as it handles e.g 'false'
|
42 |
+
def is-env-true [name: string] {
|
43 |
+
if (has-env $name) {
|
44 |
+
# Try to parse 'true', '0', '1', and fail if not convertible
|
45 |
+
let parsed = (do -i { $env | get $name | into bool })
|
46 |
+
if ($parsed | describe) == 'bool' {
|
47 |
+
$parsed
|
48 |
+
} else {
|
49 |
+
not ($env | get -i $name | is-empty)
|
50 |
+
}
|
51 |
+
} else {
|
52 |
+
false
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
let virtual_env = '/teamspace/studios/this_studio/.venv'
|
57 |
+
let bin = 'bin'
|
58 |
+
|
59 |
+
let is_windows = ($nu.os-info.family) == 'windows'
|
60 |
+
let path_name = (if (has-env 'Path') {
|
61 |
+
'Path'
|
62 |
+
} else {
|
63 |
+
'PATH'
|
64 |
+
}
|
65 |
+
)
|
66 |
+
|
67 |
+
let venv_path = ([$virtual_env $bin] | path join)
|
68 |
+
let new_path = ($env | get $path_name | prepend $venv_path)
|
69 |
+
|
70 |
+
# If there is no default prompt, then use the env name instead
|
71 |
+
let virtual_env_prompt = (if ('this_studio' | is-empty) {
|
72 |
+
($virtual_env | path basename)
|
73 |
+
} else {
|
74 |
+
'this_studio'
|
75 |
+
})
|
76 |
+
|
77 |
+
let new_env = {
|
78 |
+
$path_name : $new_path
|
79 |
+
VIRTUAL_ENV : $virtual_env
|
80 |
+
VIRTUAL_ENV_PROMPT : $virtual_env_prompt
|
81 |
+
}
|
82 |
+
|
83 |
+
let new_env = (if (is-env-true 'VIRTUAL_ENV_DISABLE_PROMPT') {
|
84 |
+
$new_env
|
85 |
+
} else {
|
86 |
+
# Creating the new prompt for the session
|
87 |
+
let virtual_prefix = $'(char lparen)($virtual_env_prompt)(char rparen) '
|
88 |
+
|
89 |
+
# Back up the old prompt builder
|
90 |
+
let old_prompt_command = (if (has-env 'PROMPT_COMMAND') {
|
91 |
+
$env.PROMPT_COMMAND
|
92 |
+
} else {
|
93 |
+
''
|
94 |
+
})
|
95 |
+
|
96 |
+
let new_prompt = (if (has-env 'PROMPT_COMMAND') {
|
97 |
+
if 'closure' in ($old_prompt_command | describe) {
|
98 |
+
{|| $'($virtual_prefix)(do $old_prompt_command)' }
|
99 |
+
} else {
|
100 |
+
{|| $'($virtual_prefix)($old_prompt_command)' }
|
101 |
+
}
|
102 |
+
} else {
|
103 |
+
{|| $'($virtual_prefix)' }
|
104 |
+
})
|
105 |
+
|
106 |
+
$new_env | merge {
|
107 |
+
PROMPT_COMMAND : $new_prompt
|
108 |
+
VIRTUAL_PREFIX : $virtual_prefix
|
109 |
+
}
|
110 |
+
})
|
111 |
+
|
112 |
+
# Environment variables that will be loaded as the virtual env
|
113 |
+
load-env $new_env
|
114 |
+
}
|
115 |
+
|
116 |
+
export alias pydoc = python -m pydoc
|
117 |
+
export alias deactivate = overlay hide activate
|
.venv/bin/activate.ps1
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
#
|
3 |
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
# a copy of this software and associated documentation files (the
|
5 |
+
# "Software"), to deal in the Software without restriction, including
|
6 |
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
# permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
# the following conditions:
|
10 |
+
#
|
11 |
+
# The above copyright notice and this permission notice shall be
|
12 |
+
# included in all copies or substantial portions of the Software.
|
13 |
+
#
|
14 |
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
$script:THIS_PATH = $myinvocation.mycommand.path
|
23 |
+
$script:BASE_DIR = Split-Path (Resolve-Path "$THIS_PATH/..") -Parent
|
24 |
+
|
25 |
+
function global:deactivate([switch] $NonDestructive) {
|
26 |
+
if (Test-Path variable:_OLD_VIRTUAL_PATH) {
|
27 |
+
$env:PATH = $variable:_OLD_VIRTUAL_PATH
|
28 |
+
Remove-Variable "_OLD_VIRTUAL_PATH" -Scope global
|
29 |
+
}
|
30 |
+
|
31 |
+
if (Test-Path function:_old_virtual_prompt) {
|
32 |
+
$function:prompt = $function:_old_virtual_prompt
|
33 |
+
Remove-Item function:\_old_virtual_prompt
|
34 |
+
}
|
35 |
+
|
36 |
+
if ($env:VIRTUAL_ENV) {
|
37 |
+
Remove-Item env:VIRTUAL_ENV -ErrorAction SilentlyContinue
|
38 |
+
}
|
39 |
+
|
40 |
+
if ($env:VIRTUAL_ENV_PROMPT) {
|
41 |
+
Remove-Item env:VIRTUAL_ENV_PROMPT -ErrorAction SilentlyContinue
|
42 |
+
}
|
43 |
+
|
44 |
+
if (!$NonDestructive) {
|
45 |
+
# Self destruct!
|
46 |
+
Remove-Item function:deactivate
|
47 |
+
Remove-Item function:pydoc
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
function global:pydoc {
|
52 |
+
python -m pydoc $args
|
53 |
+
}
|
54 |
+
|
55 |
+
# unset irrelevant variables
|
56 |
+
deactivate -nondestructive
|
57 |
+
|
58 |
+
$VIRTUAL_ENV = $BASE_DIR
|
59 |
+
$env:VIRTUAL_ENV = $VIRTUAL_ENV
|
60 |
+
|
61 |
+
if ("this_studio" -ne "") {
|
62 |
+
$env:VIRTUAL_ENV_PROMPT = "this_studio"
|
63 |
+
}
|
64 |
+
else {
|
65 |
+
$env:VIRTUAL_ENV_PROMPT = $( Split-Path $env:VIRTUAL_ENV -Leaf )
|
66 |
+
}
|
67 |
+
|
68 |
+
New-Variable -Scope global -Name _OLD_VIRTUAL_PATH -Value $env:PATH
|
69 |
+
|
70 |
+
$env:PATH = "$env:VIRTUAL_ENV/bin;" + $env:PATH
|
71 |
+
if (!$env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
72 |
+
function global:_old_virtual_prompt {
|
73 |
+
""
|
74 |
+
}
|
75 |
+
$function:_old_virtual_prompt = $function:prompt
|
76 |
+
|
77 |
+
function global:prompt {
|
78 |
+
# Add the custom prefix to the existing prompt
|
79 |
+
$previous_prompt_value = & $function:_old_virtual_prompt
|
80 |
+
("(" + $env:VIRTUAL_ENV_PROMPT + ") " + $previous_prompt_value)
|
81 |
+
}
|
82 |
+
}
|
.venv/bin/activate_this.py
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
#
|
3 |
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
# a copy of this software and associated documentation files (the
|
5 |
+
# "Software"), to deal in the Software without restriction, including
|
6 |
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
# permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
# the following conditions:
|
10 |
+
#
|
11 |
+
# The above copyright notice and this permission notice shall be
|
12 |
+
# included in all copies or substantial portions of the Software.
|
13 |
+
#
|
14 |
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
"""
|
23 |
+
Activate virtualenv for current interpreter:
|
24 |
+
|
25 |
+
Use exec(open(this_file).read(), {'__file__': this_file}).
|
26 |
+
|
27 |
+
This can be used when you must use an existing Python interpreter, not the virtualenv bin/python.
|
28 |
+
""" # noqa: D415
|
29 |
+
from __future__ import annotations
|
30 |
+
|
31 |
+
import os
|
32 |
+
import site
|
33 |
+
import sys
|
34 |
+
|
35 |
+
try:
|
36 |
+
abs_file = os.path.abspath(__file__)
|
37 |
+
except NameError as exc:
|
38 |
+
msg = "You must use exec(open(this_file).read(), {'__file__': this_file}))"
|
39 |
+
raise AssertionError(msg) from exc
|
40 |
+
|
41 |
+
bin_dir = os.path.dirname(abs_file)
|
42 |
+
base = bin_dir[: -len("bin") - 1] # strip away the bin part from the __file__, plus the path separator
|
43 |
+
|
44 |
+
# prepend bin to PATH (this file is inside the bin directory)
|
45 |
+
os.environ["PATH"] = os.pathsep.join([bin_dir, *os.environ.get("PATH", "").split(os.pathsep)])
|
46 |
+
os.environ["VIRTUAL_ENV"] = base # virtual env is right above bin directory
|
47 |
+
os.environ["VIRTUAL_ENV_PROMPT"] = "" or os.path.basename(base) # noqa: SIM222
|
48 |
+
|
49 |
+
# add the virtual environments libraries to the host python import mechanism
|
50 |
+
prev_length = len(sys.path)
|
51 |
+
for lib in "../lib/python3.10/site-packages".split(os.pathsep):
|
52 |
+
path = os.path.realpath(os.path.join(bin_dir, lib))
|
53 |
+
site.addsitedir(path.decode("utf-8") if "" else path)
|
54 |
+
sys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]
|
55 |
+
|
56 |
+
sys.real_prefix = sys.prefix
|
57 |
+
sys.prefix = base
|
.venv/bin/deactivate.bat
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@REM Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
@REM
|
3 |
+
@REM Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
@REM a copy of this software and associated documentation files (the
|
5 |
+
@REM "Software"), to deal in the Software without restriction, including
|
6 |
+
@REM without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
@REM distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
@REM permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
@REM the following conditions:
|
10 |
+
@REM
|
11 |
+
@REM The above copyright notice and this permission notice shall be
|
12 |
+
@REM included in all copies or substantial portions of the Software.
|
13 |
+
@REM
|
14 |
+
@REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
@REM EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
@REM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
@REM NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
@REM LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
@REM OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
@REM WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
@set VIRTUAL_ENV=
|
23 |
+
@set VIRTUAL_ENV_PROMPT=
|
24 |
+
|
25 |
+
@REM Don't use () to avoid problems with them in %PATH%
|
26 |
+
@if not defined _OLD_VIRTUAL_PROMPT @goto ENDIFVPROMPT
|
27 |
+
@set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
|
28 |
+
@set _OLD_VIRTUAL_PROMPT=
|
29 |
+
:ENDIFVPROMPT
|
30 |
+
|
31 |
+
@if not defined _OLD_VIRTUAL_PYTHONHOME @goto ENDIFVHOME
|
32 |
+
@set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
|
33 |
+
@set _OLD_VIRTUAL_PYTHONHOME=
|
34 |
+
:ENDIFVHOME
|
35 |
+
|
36 |
+
@if not defined _OLD_VIRTUAL_PATH @goto ENDIFVPATH
|
37 |
+
@set "PATH=%_OLD_VIRTUAL_PATH%"
|
38 |
+
@set _OLD_VIRTUAL_PATH=
|
39 |
+
:ENDIFVPATH
|
.venv/bin/huggingface-cli
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/teamspace/studios/this_studio/.venv/bin/python
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
import re
|
4 |
+
import sys
|
5 |
+
from huggingface_hub.commands.huggingface_cli import main
|
6 |
+
if __name__ == "__main__":
|
7 |
+
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
|
8 |
+
sys.exit(main())
|
.venv/bin/kaggle
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/teamspace/studios/this_studio/.venv/bin/python
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
import re
|
4 |
+
import sys
|
5 |
+
from kaggle.cli import main
|
6 |
+
if __name__ == "__main__":
|
7 |
+
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
|
8 |
+
sys.exit(main())
|
.venv/bin/normalizer
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/teamspace/studios/this_studio/.venv/bin/python
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
import re
|
4 |
+
import sys
|
5 |
+
from charset_normalizer.cli import cli_detect
|
6 |
+
if __name__ == "__main__":
|
7 |
+
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
|
8 |
+
sys.exit(cli_detect())
|
.venv/bin/pydoc.bat
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@REM Copyright (c) 2020-202x The virtualenv developers
|
2 |
+
@REM
|
3 |
+
@REM Permission is hereby granted, free of charge, to any person obtaining
|
4 |
+
@REM a copy of this software and associated documentation files (the
|
5 |
+
@REM "Software"), to deal in the Software without restriction, including
|
6 |
+
@REM without limitation the rights to use, copy, modify, merge, publish,
|
7 |
+
@REM distribute, sublicense, and/or sell copies of the Software, and to
|
8 |
+
@REM permit persons to whom the Software is furnished to do so, subject to
|
9 |
+
@REM the following conditions:
|
10 |
+
@REM
|
11 |
+
@REM The above copyright notice and this permission notice shall be
|
12 |
+
@REM included in all copies or substantial portions of the Software.
|
13 |
+
@REM
|
14 |
+
@REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15 |
+
@REM EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16 |
+
@REM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17 |
+
@REM NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18 |
+
@REM LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19 |
+
@REM OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20 |
+
@REM WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 |
+
|
22 |
+
python.exe -m pydoc %*
|
.venv/bin/python
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e206f0daa569973812fe6444fe83df68cd2757801a7d35b4f8a285259e5a99db
|
3 |
+
size 17336512
|
.venv/bin/python3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e206f0daa569973812fe6444fe83df68cd2757801a7d35b4f8a285259e5a99db
|
3 |
+
size 17336512
|
.venv/bin/python3.10
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e206f0daa569973812fe6444fe83df68cd2757801a7d35b4f8a285259e5a99db
|
3 |
+
size 17336512
|
.venv/bin/slugify
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/teamspace/studios/this_studio/.venv/bin/python
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
import re
|
4 |
+
import sys
|
5 |
+
from slugify.__main__ import main
|
6 |
+
if __name__ == "__main__":
|
7 |
+
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
|
8 |
+
sys.exit(main())
|
.venv/bin/tqdm
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/teamspace/studios/this_studio/.venv/bin/python
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
import re
|
4 |
+
import sys
|
5 |
+
from tqdm.cli import main
|
6 |
+
if __name__ == "__main__":
|
7 |
+
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
|
8 |
+
sys.exit(main())
|
.venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/INSTALLER
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Poetry 1.8.2
|
.venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) 2017-2021 Ingy döt Net
|
2 |
+
Copyright (c) 2006-2016 Kirill Simonov
|
3 |
+
|
4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5 |
+
this software and associated documentation files (the "Software"), to deal in
|
6 |
+
the Software without restriction, including without limitation the rights to
|
7 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
8 |
+
of the Software, and to permit persons to whom the Software is furnished to do
|
9 |
+
so, subject to the following conditions:
|
10 |
+
|
11 |
+
The above copyright notice and this permission notice shall be included in all
|
12 |
+
copies or substantial portions of the Software.
|
13 |
+
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20 |
+
SOFTWARE.
|
.venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/METADATA
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: PyYAML
|
3 |
+
Version: 6.0.1
|
4 |
+
Summary: YAML parser and emitter for Python
|
5 |
+
Home-page: https://pyyaml.org/
|
6 |
+
Download-URL: https://pypi.org/project/PyYAML/
|
7 |
+
Author: Kirill Simonov
|
8 |
+
Author-email: xi@resolvent.net
|
9 |
+
License: MIT
|
10 |
+
Project-URL: Bug Tracker, https://github.com/yaml/pyyaml/issues
|
11 |
+
Project-URL: CI, https://github.com/yaml/pyyaml/actions
|
12 |
+
Project-URL: Documentation, https://pyyaml.org/wiki/PyYAMLDocumentation
|
13 |
+
Project-URL: Mailing lists, http://lists.sourceforge.net/lists/listinfo/yaml-core
|
14 |
+
Project-URL: Source Code, https://github.com/yaml/pyyaml
|
15 |
+
Platform: Any
|
16 |
+
Classifier: Development Status :: 5 - Production/Stable
|
17 |
+
Classifier: Intended Audience :: Developers
|
18 |
+
Classifier: License :: OSI Approved :: MIT License
|
19 |
+
Classifier: Operating System :: OS Independent
|
20 |
+
Classifier: Programming Language :: Cython
|
21 |
+
Classifier: Programming Language :: Python
|
22 |
+
Classifier: Programming Language :: Python :: 3
|
23 |
+
Classifier: Programming Language :: Python :: 3.6
|
24 |
+
Classifier: Programming Language :: Python :: 3.7
|
25 |
+
Classifier: Programming Language :: Python :: 3.8
|
26 |
+
Classifier: Programming Language :: Python :: 3.9
|
27 |
+
Classifier: Programming Language :: Python :: 3.10
|
28 |
+
Classifier: Programming Language :: Python :: 3.11
|
29 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
30 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
31 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
32 |
+
Classifier: Topic :: Text Processing :: Markup
|
33 |
+
Requires-Python: >=3.6
|
34 |
+
License-File: LICENSE
|
35 |
+
|
36 |
+
YAML is a data serialization format designed for human readability
|
37 |
+
and interaction with scripting languages. PyYAML is a YAML parser
|
38 |
+
and emitter for Python.
|
39 |
+
|
40 |
+
PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
|
41 |
+
support, capable extension API, and sensible error messages. PyYAML
|
42 |
+
supports standard YAML tags and provides Python-specific tags that
|
43 |
+
allow to represent an arbitrary Python object.
|
44 |
+
|
45 |
+
PyYAML is applicable for a broad range of tasks from complex
|
46 |
+
configuration files to object serialization and persistence.
|
.venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/RECORD
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
yaml/_yaml.cpython-310-x86_64-linux-gnu.so,sha256=_9iVrASatQgQSFXlKeCe2uK2TyKwk9nd61Cs_-fqAHM,2226000
|
2 |
+
yaml/loader.py,sha256=UVa-zIqmkFSCIYq_PgSGm4NSJttHY2Rf_zQ4_b1fHN0,2061
|
3 |
+
yaml/dumper.py,sha256=PLctZlYwZLp7XmeUdwRuv4nYOZ2UBnDIUy8-lKfLF-o,2837
|
4 |
+
yaml/resolver.py,sha256=9L-VYfm4mWHxUD1Vg4X7rjDRK_7VZd6b92wzq7Y2IKY,9004
|
5 |
+
yaml/representer.py,sha256=IuWP-cAW9sHKEnS0gCqSa894k1Bg4cgTxaDwIcbRQ-Y,14190
|
6 |
+
yaml/serializer.py,sha256=ChuFgmhU01hj4xgI8GaKv6vfM2Bujwa9i7d2FAHj7cA,4165
|
7 |
+
yaml/reader.py,sha256=0dmzirOiDG4Xo41RnuQS7K9rkY3xjHiVasfDMNTqCNw,6794
|
8 |
+
yaml/error.py,sha256=Ah9z-toHJUbE9j-M8YpxgSRM5CgLCcwVzJgLLRF2Fxo,2533
|
9 |
+
yaml/scanner.py,sha256=YEM3iLZSaQwXcQRg2l2R4MdT0zGP2F9eHkKGKnHyWQY,51279
|
10 |
+
yaml/tokens.py,sha256=lTQIzSVw8Mg9wv459-TjiOQe6wVziqaRlqX2_89rp54,2573
|
11 |
+
yaml/composer.py,sha256=_Ko30Wr6eDWUeUpauUGT3Lcg9QPBnOPVlTnIMRGJ9FM,4883
|
12 |
+
yaml/__init__.py,sha256=bhl05qSeO-1ZxlSRjGrvl2m9nrXb1n9-GQatTN0Mrqc,12311
|
13 |
+
yaml/parser.py,sha256=ilWp5vvgoHFGzvOZDItFoGjD6D42nhlZrZyjAwa0oJo,25495
|
14 |
+
yaml/emitter.py,sha256=jghtaU7eFwg31bG0B7RZea_29Adi9CKmXq_QjgQpCkQ,43006
|
15 |
+
yaml/cyaml.py,sha256=6ZrAG9fAYvdVe2FK_w0hmXoG7ZYsoYUwapG8CiC72H0,3851
|
16 |
+
yaml/constructor.py,sha256=kNgkfaeLUkwQYY_Q6Ff1Tz2XVw_pG1xVE9Ak7z-viLA,28639
|
17 |
+
yaml/nodes.py,sha256=gPKNj8pKCdh2d4gr3gIYINnPOaOxGhJAUiYhGRnPE84,1440
|
18 |
+
yaml/events.py,sha256=50_TksgQiE4up-lKo_V-nBy-tAIxkIPQxY5qDhKCeHw,2445
|
19 |
+
_yaml/__init__.py,sha256=04Ae_5osxahpJHa3XBZUAf4wi6XX32gR8D6X6p64GEA,1402
|
20 |
+
PyYAML-6.0.1.dist-info/top_level.txt,sha256=rpj0IVMTisAjh_1vG3Ccf9v5jpCQwAz6cD1IVU5ZdhQ,11
|
21 |
+
PyYAML-6.0.1.dist-info/LICENSE,sha256=jTko-dxEkP1jVwfLiOsmvXZBAqcoKVQwfT5RZ6V36KQ,1101
|
22 |
+
PyYAML-6.0.1.dist-info/WHEEL,sha256=iZaXX0Td62Nww8bojl0E84uJHjT41csHPKZmbUBbJPs,152
|
23 |
+
PyYAML-6.0.1.dist-info/METADATA,sha256=UNNF8-SzzwOKXVo-kV5lXUGH2_wDWMBmGxqISpp5HQk,2058
|
24 |
+
PyYAML-6.0.1.dist-info/INSTALLER,sha256=4EobgVZEtoZym__e-MIhNYRUXcWFMMbrrt6xRpKyZoQ,12
|
25 |
+
PyYAML-6.0.1.dist-info/RECORD,,
|
.venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/WHEEL
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Wheel-Version: 1.0
|
2 |
+
Generator: bdist_wheel (0.40.0)
|
3 |
+
Root-Is-Purelib: false
|
4 |
+
Tag: cp310-cp310-manylinux_2_17_x86_64
|
5 |
+
Tag: cp310-cp310-manylinux2014_x86_64
|
6 |
+
|
.venv/lib/python3.10/site-packages/PyYAML-6.0.1.dist-info/top_level.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
_yaml
|
2 |
+
yaml
|
.venv/lib/python3.10/site-packages/__pycache__/_virtualenv.cpython-310.pyc
ADDED
Binary file (2.75 kB). View file
|
|
.venv/lib/python3.10/site-packages/__pycache__/six.cpython-310.pyc
ADDED
Binary file (27.6 kB). View file
|
|
.venv/lib/python3.10/site-packages/_virtualenv.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:69ac3d8f27e679c81b94ab30b3b56e9cd138219b1ba94a1fa3606d5a76a1433d
|
3 |
+
size 18
|
.venv/lib/python3.10/site-packages/_virtualenv.py
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""Patches that are applied at runtime to the virtual environment."""
|
2 |
+
|
3 |
+
from __future__ import annotations
|
4 |
+
|
5 |
+
import os
|
6 |
+
import sys
|
7 |
+
|
8 |
+
VIRTUALENV_PATCH_FILE = os.path.join(__file__)
|
9 |
+
|
10 |
+
|
11 |
+
def patch_dist(dist):
|
12 |
+
"""
|
13 |
+
Distutils allows user to configure some arguments via a configuration file:
|
14 |
+
https://docs.python.org/3/install/index.html#distutils-configuration-files.
|
15 |
+
|
16 |
+
Some of this arguments though don't make sense in context of the virtual environment files, let's fix them up.
|
17 |
+
""" # noqa: D205
|
18 |
+
# we cannot allow some install config as that would get packages installed outside of the virtual environment
|
19 |
+
old_parse_config_files = dist.Distribution.parse_config_files
|
20 |
+
|
21 |
+
def parse_config_files(self, *args, **kwargs):
|
22 |
+
result = old_parse_config_files(self, *args, **kwargs)
|
23 |
+
install = self.get_option_dict("install")
|
24 |
+
|
25 |
+
if "prefix" in install: # the prefix governs where to install the libraries
|
26 |
+
install["prefix"] = VIRTUALENV_PATCH_FILE, os.path.abspath(sys.prefix)
|
27 |
+
for base in ("purelib", "platlib", "headers", "scripts", "data"):
|
28 |
+
key = f"install_{base}"
|
29 |
+
if key in install: # do not allow global configs to hijack venv paths
|
30 |
+
install.pop(key, None)
|
31 |
+
return result
|
32 |
+
|
33 |
+
dist.Distribution.parse_config_files = parse_config_files
|
34 |
+
|
35 |
+
|
36 |
+
# Import hook that patches some modules to ignore configuration values that break package installation in case
|
37 |
+
# of virtual environments.
|
38 |
+
_DISTUTILS_PATCH = "distutils.dist", "setuptools.dist"
|
39 |
+
# https://docs.python.org/3/library/importlib.html#setting-up-an-importer
|
40 |
+
|
41 |
+
|
42 |
+
class _Finder:
|
43 |
+
"""A meta path finder that allows patching the imported distutils modules."""
|
44 |
+
|
45 |
+
fullname = None
|
46 |
+
|
47 |
+
# lock[0] is threading.Lock(), but initialized lazily to avoid importing threading very early at startup,
|
48 |
+
# because there are gevent-based applications that need to be first to import threading by themselves.
|
49 |
+
# See https://github.com/pypa/virtualenv/issues/1895 for details.
|
50 |
+
lock = [] # noqa: RUF012
|
51 |
+
|
52 |
+
def find_spec(self, fullname, path, target=None): # noqa: ARG002
|
53 |
+
if fullname in _DISTUTILS_PATCH and self.fullname is None:
|
54 |
+
# initialize lock[0] lazily
|
55 |
+
if len(self.lock) == 0:
|
56 |
+
import threading
|
57 |
+
|
58 |
+
lock = threading.Lock()
|
59 |
+
# there is possibility that two threads T1 and T2 are simultaneously running into find_spec,
|
60 |
+
# observing .lock as empty, and further going into hereby initialization. However due to the GIL,
|
61 |
+
# list.append() operation is atomic and this way only one of the threads will "win" to put the lock
|
62 |
+
# - that every thread will use - into .lock[0].
|
63 |
+
# https://docs.python.org/3/faq/library.html#what-kinds-of-global-value-mutation-are-thread-safe
|
64 |
+
self.lock.append(lock)
|
65 |
+
|
66 |
+
from functools import partial
|
67 |
+
from importlib.util import find_spec
|
68 |
+
|
69 |
+
with self.lock[0]:
|
70 |
+
self.fullname = fullname
|
71 |
+
try:
|
72 |
+
spec = find_spec(fullname, path)
|
73 |
+
if spec is not None:
|
74 |
+
# https://www.python.org/dev/peps/pep-0451/#how-loading-will-work
|
75 |
+
is_new_api = hasattr(spec.loader, "exec_module")
|
76 |
+
func_name = "exec_module" if is_new_api else "load_module"
|
77 |
+
old = getattr(spec.loader, func_name)
|
78 |
+
func = self.exec_module if is_new_api else self.load_module
|
79 |
+
if old is not func:
|
80 |
+
try: # noqa: SIM105
|
81 |
+
setattr(spec.loader, func_name, partial(func, old))
|
82 |
+
except AttributeError:
|
83 |
+
pass # C-Extension loaders are r/o such as zipimporter with <3.7
|
84 |
+
return spec
|
85 |
+
finally:
|
86 |
+
self.fullname = None
|
87 |
+
return None
|
88 |
+
|
89 |
+
@staticmethod
|
90 |
+
def exec_module(old, module):
|
91 |
+
old(module)
|
92 |
+
if module.__name__ in _DISTUTILS_PATCH:
|
93 |
+
patch_dist(module)
|
94 |
+
|
95 |
+
@staticmethod
|
96 |
+
def load_module(old, name):
|
97 |
+
module = old(name)
|
98 |
+
if module.__name__ in _DISTUTILS_PATCH:
|
99 |
+
patch_dist(module)
|
100 |
+
return module
|
101 |
+
|
102 |
+
|
103 |
+
sys.meta_path.insert(0, _Finder())
|
.venv/lib/python3.10/site-packages/_yaml/__init__.py
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This is a stub package designed to roughly emulate the _yaml
|
2 |
+
# extension module, which previously existed as a standalone module
|
3 |
+
# and has been moved into the `yaml` package namespace.
|
4 |
+
# It does not perfectly mimic its old counterpart, but should get
|
5 |
+
# close enough for anyone who's relying on it even when they shouldn't.
|
6 |
+
import yaml
|
7 |
+
|
8 |
+
# in some circumstances, the yaml module we imoprted may be from a different version, so we need
|
9 |
+
# to tread carefully when poking at it here (it may not have the attributes we expect)
|
10 |
+
if not getattr(yaml, '__with_libyaml__', False):
|
11 |
+
from sys import version_info
|
12 |
+
|
13 |
+
exc = ModuleNotFoundError if version_info >= (3, 6) else ImportError
|
14 |
+
raise exc("No module named '_yaml'")
|
15 |
+
else:
|
16 |
+
from yaml._yaml import *
|
17 |
+
import warnings
|
18 |
+
warnings.warn(
|
19 |
+
'The _yaml extension module is now located at yaml._yaml'
|
20 |
+
' and its location is subject to change. To use the'
|
21 |
+
' LibYAML-based parser and emitter, import from `yaml`:'
|
22 |
+
' `from yaml import CLoader as Loader, CDumper as Dumper`.',
|
23 |
+
DeprecationWarning
|
24 |
+
)
|
25 |
+
del warnings
|
26 |
+
# Don't `del yaml` here because yaml is actually an existing
|
27 |
+
# namespace member of _yaml.
|
28 |
+
|
29 |
+
__name__ = '_yaml'
|
30 |
+
# If the module is top-level (i.e. not a part of any specific package)
|
31 |
+
# then the attribute should be set to ''.
|
32 |
+
# https://docs.python.org/3.8/library/types.html
|
33 |
+
__package__ = ''
|
.venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/INSTALLER
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Poetry 1.8.2
|
.venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/LICENSE
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) 2014-2017, Mozilla Foundation
|
2 |
+
|
3 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
you may not use this file except in compliance with the License.
|
5 |
+
You may obtain a copy of the License at
|
6 |
+
|
7 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
|
9 |
+
Unless required by applicable law or agreed to in writing, software
|
10 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
+
See the License for the specific language governing permissions and
|
13 |
+
limitations under the License.
|
.venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/METADATA
ADDED
@@ -0,0 +1,1247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: bleach
|
3 |
+
Version: 6.1.0
|
4 |
+
Summary: An easy safelist-based HTML-sanitizing tool.
|
5 |
+
Home-page: https://github.com/mozilla/bleach
|
6 |
+
Maintainer: Will Kahn-Greene
|
7 |
+
Maintainer-email: willkg@mozilla.com
|
8 |
+
License: Apache Software License
|
9 |
+
Classifier: Development Status :: 5 - Production/Stable
|
10 |
+
Classifier: Environment :: Web Environment
|
11 |
+
Classifier: Intended Audience :: Developers
|
12 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
13 |
+
Classifier: Operating System :: OS Independent
|
14 |
+
Classifier: Programming Language :: Python
|
15 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
16 |
+
Classifier: Programming Language :: Python :: 3
|
17 |
+
Classifier: Programming Language :: Python :: 3.8
|
18 |
+
Classifier: Programming Language :: Python :: 3.9
|
19 |
+
Classifier: Programming Language :: Python :: 3.10
|
20 |
+
Classifier: Programming Language :: Python :: 3.11
|
21 |
+
Classifier: Programming Language :: Python :: 3.12
|
22 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
23 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
24 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
25 |
+
Requires-Python: >=3.8
|
26 |
+
Description-Content-Type: text/x-rst
|
27 |
+
License-File: LICENSE
|
28 |
+
Requires-Dist: six >=1.9.0
|
29 |
+
Requires-Dist: webencodings
|
30 |
+
Provides-Extra: css
|
31 |
+
Requires-Dist: tinycss2 <1.3,>=1.1.0 ; extra == 'css'
|
32 |
+
|
33 |
+
======
|
34 |
+
Bleach
|
35 |
+
======
|
36 |
+
|
37 |
+
.. image:: https://github.com/mozilla/bleach/workflows/Test/badge.svg
|
38 |
+
:target: https://github.com/mozilla/bleach/actions?query=workflow%3ATest
|
39 |
+
|
40 |
+
.. image:: https://github.com/mozilla/bleach/workflows/Lint/badge.svg
|
41 |
+
:target: https://github.com/mozilla/bleach/actions?query=workflow%3ALint
|
42 |
+
|
43 |
+
.. image:: https://badge.fury.io/py/bleach.svg
|
44 |
+
:target: http://badge.fury.io/py/bleach
|
45 |
+
|
46 |
+
**NOTE: 2023-01-23: Bleach is deprecated.** See issue:
|
47 |
+
`<https://github.com/mozilla/bleach/issues/698>`__
|
48 |
+
|
49 |
+
Bleach is an allowed-list-based HTML sanitizing library that escapes or strips
|
50 |
+
markup and attributes.
|
51 |
+
|
52 |
+
Bleach can also linkify text safely, applying filters that Django's ``urlize``
|
53 |
+
filter cannot, and optionally setting ``rel`` attributes, even on links already
|
54 |
+
in the text.
|
55 |
+
|
56 |
+
Bleach is intended for sanitizing text from *untrusted* sources. If you find
|
57 |
+
yourself jumping through hoops to allow your site administrators to do lots of
|
58 |
+
things, you're probably outside the use cases. Either trust those users, or
|
59 |
+
don't.
|
60 |
+
|
61 |
+
Because it relies on html5lib_, Bleach is as good as modern browsers at dealing
|
62 |
+
with weird, quirky HTML fragments. And *any* of Bleach's methods will fix
|
63 |
+
unbalanced or mis-nested tags.
|
64 |
+
|
65 |
+
The version on GitHub_ is the most up-to-date and contains the latest bug
|
66 |
+
fixes. You can find full documentation on `ReadTheDocs`_.
|
67 |
+
|
68 |
+
:Code: https://github.com/mozilla/bleach
|
69 |
+
:Documentation: https://bleach.readthedocs.io/
|
70 |
+
:Issue tracker: https://github.com/mozilla/bleach/issues
|
71 |
+
:License: Apache License v2; see LICENSE file
|
72 |
+
|
73 |
+
|
74 |
+
Reporting Bugs
|
75 |
+
==============
|
76 |
+
|
77 |
+
For regular bugs, please report them `in our issue tracker
|
78 |
+
<https://github.com/mozilla/bleach/issues>`_.
|
79 |
+
|
80 |
+
If you believe that you've found a security vulnerability, please `file a secure
|
81 |
+
bug report in our bug tracker
|
82 |
+
<https://bugzilla.mozilla.org/enter_bug.cgi?assigned_to=nobody%40mozilla.org&product=Webtools&component=Bleach-security&groups=webtools-security>`_
|
83 |
+
or send an email to *security AT mozilla DOT org*.
|
84 |
+
|
85 |
+
For more information on security-related bug disclosure and the PGP key to use
|
86 |
+
for sending encrypted mail or to verify responses received from that address,
|
87 |
+
please read our wiki page at
|
88 |
+
`<https://www.mozilla.org/en-US/security/#For_Developers>`_.
|
89 |
+
|
90 |
+
|
91 |
+
Security
|
92 |
+
========
|
93 |
+
|
94 |
+
Bleach is a security-focused library.
|
95 |
+
|
96 |
+
We have a responsible security vulnerability reporting process. Please use
|
97 |
+
that if you're reporting a security issue.
|
98 |
+
|
99 |
+
Security issues are fixed in private. After we land such a fix, we'll do a
|
100 |
+
release.
|
101 |
+
|
102 |
+
For every release, we mark security issues we've fixed in the ``CHANGES`` in
|
103 |
+
the **Security issues** section. We include any relevant CVE links.
|
104 |
+
|
105 |
+
|
106 |
+
Installing Bleach
|
107 |
+
=================
|
108 |
+
|
109 |
+
Bleach is available on PyPI_, so you can install it with ``pip``::
|
110 |
+
|
111 |
+
$ pip install bleach
|
112 |
+
|
113 |
+
|
114 |
+
Upgrading Bleach
|
115 |
+
================
|
116 |
+
|
117 |
+
.. warning::
|
118 |
+
|
119 |
+
Before doing any upgrades, read through `Bleach Changes
|
120 |
+
<https://bleach.readthedocs.io/en/latest/changes.html>`_ for backwards
|
121 |
+
incompatible changes, newer versions, etc.
|
122 |
+
|
123 |
+
Bleach follows `semver 2`_ versioning. Vendored libraries will not
|
124 |
+
be changed in patch releases.
|
125 |
+
|
126 |
+
|
127 |
+
Basic use
|
128 |
+
=========
|
129 |
+
|
130 |
+
The simplest way to use Bleach is:
|
131 |
+
|
132 |
+
.. code-block:: python
|
133 |
+
|
134 |
+
>>> import bleach
|
135 |
+
|
136 |
+
>>> bleach.clean('an <script>evil()</script> example')
|
137 |
+
u'an <script>evil()</script> example'
|
138 |
+
|
139 |
+
>>> bleach.linkify('an http://example.com url')
|
140 |
+
u'an <a href="http://example.com" rel="nofollow">http://example.com</a> url'
|
141 |
+
|
142 |
+
|
143 |
+
Code of Conduct
|
144 |
+
===============
|
145 |
+
|
146 |
+
This project and repository is governed by Mozilla's code of conduct and
|
147 |
+
etiquette guidelines. For more details please see the `CODE_OF_CONDUCT.md
|
148 |
+
</CODE_OF_CONDUCT.md>`_
|
149 |
+
|
150 |
+
|
151 |
+
.. _html5lib: https://github.com/html5lib/html5lib-python
|
152 |
+
.. _GitHub: https://github.com/mozilla/bleach
|
153 |
+
.. _ReadTheDocs: https://bleach.readthedocs.io/
|
154 |
+
.. _PyPI: https://pypi.org/project/bleach/
|
155 |
+
.. _semver 2: https://semver.org/
|
156 |
+
|
157 |
+
|
158 |
+
Bleach changes
|
159 |
+
==============
|
160 |
+
|
161 |
+
Version 6.1.0 (October 6th, 2023)
|
162 |
+
---------------------------------
|
163 |
+
|
164 |
+
**Backwards incompatible changes**
|
165 |
+
|
166 |
+
* Dropped support for Python 3.7. (#709)
|
167 |
+
|
168 |
+
**Security fixes**
|
169 |
+
|
170 |
+
None
|
171 |
+
|
172 |
+
**Bug fixes**
|
173 |
+
|
174 |
+
* Add support for Python 3.12. (#710)
|
175 |
+
* Fix linkify with arrays in querystring (#436)
|
176 |
+
* Handle more cases with < followed by character data (#705)
|
177 |
+
* Fix entities inside a tags in linkification (#704)
|
178 |
+
* Update cap for tinycss2 to <1.3 (#702)
|
179 |
+
* Updated Sphinx requirement
|
180 |
+
* Add dependabot for github actions and update github actions
|
181 |
+
|
182 |
+
|
183 |
+
Version 6.0.0 (January 23rd, 2023)
|
184 |
+
----------------------------------
|
185 |
+
|
186 |
+
**Backwards incompatible changes**
|
187 |
+
|
188 |
+
* ``bleach.clean``, ``bleach.sanitizer.Cleaner``,
|
189 |
+
``bleach.html5lib_shim.BleachHTMLParser``: the ``tags`` and ``protocols``
|
190 |
+
arguments were changed from lists to sets.
|
191 |
+
|
192 |
+
Old pre-6.0.0:
|
193 |
+
|
194 |
+
.. code-block:: python
|
195 |
+
|
196 |
+
bleach.clean(
|
197 |
+
"some text",
|
198 |
+
tags=["a", "p", "img"],
|
199 |
+
# ^ ^ list
|
200 |
+
protocols=["http", "https"],
|
201 |
+
# ^ ^ list
|
202 |
+
)
|
203 |
+
|
204 |
+
|
205 |
+
New 6.0.0 and later:
|
206 |
+
|
207 |
+
.. code-block:: python
|
208 |
+
|
209 |
+
bleach.clean(
|
210 |
+
"some text",
|
211 |
+
tags={"a", "p", "img"},
|
212 |
+
# ^ ^ set
|
213 |
+
protocols={"http", "https"},
|
214 |
+
# ^ ^ set
|
215 |
+
)
|
216 |
+
|
217 |
+
* ``bleach.linkify``, ``bleach.linkifier.Linker``: the ``skip_tags`` and
|
218 |
+
``recognized_tags`` arguments were changed from lists to sets.
|
219 |
+
|
220 |
+
Old pre-6.0.0:
|
221 |
+
|
222 |
+
.. code-block:: python
|
223 |
+
|
224 |
+
bleach.linkify(
|
225 |
+
"some text",
|
226 |
+
skip_tags=["pre"],
|
227 |
+
# ^ ^ list
|
228 |
+
)
|
229 |
+
|
230 |
+
linker = Linker(
|
231 |
+
skip_tags=["pre"],
|
232 |
+
# ^ ^ list
|
233 |
+
recognized_tags=html5lib_shim.HTML_TAGS + ["custom-element"],
|
234 |
+
# ^ ^ ^ list
|
235 |
+
# |
|
236 |
+
# | list concatenation
|
237 |
+
)
|
238 |
+
|
239 |
+
New 6.0.0 and later:
|
240 |
+
|
241 |
+
.. code-block:: python
|
242 |
+
|
243 |
+
bleach.linkify(
|
244 |
+
"some text",
|
245 |
+
skip_tags={"pre"},
|
246 |
+
# ^ ^ set
|
247 |
+
)
|
248 |
+
|
249 |
+
linker = Linker(
|
250 |
+
skip_tags={"pre"},
|
251 |
+
# ^ ^ set
|
252 |
+
recognized_tags=html5lib_shim.HTML_TAGS | {"custom-element"},
|
253 |
+
# ^ ^ ^ set
|
254 |
+
# |
|
255 |
+
# | union operator
|
256 |
+
)
|
257 |
+
|
258 |
+
* ``bleach.sanitizer.BleachSanitizerFilter``: ``strip_allowed_elements`` is now
|
259 |
+
``strip_allowed_tags``. We now use "tags" everywhere rather than a mishmash
|
260 |
+
of "tags" in some places and "elements" in others.
|
261 |
+
|
262 |
+
|
263 |
+
**Security fixes**
|
264 |
+
|
265 |
+
None
|
266 |
+
|
267 |
+
|
268 |
+
**Bug fixes**
|
269 |
+
|
270 |
+
* Add support for Python 3.11. (#675)
|
271 |
+
|
272 |
+
* Fix API weirness in ``BleachSanitizerFilter``. (#649)
|
273 |
+
|
274 |
+
We're using "tags" instead of "elements" everywhere--no more weird
|
275 |
+
overloading of "elements" anymore.
|
276 |
+
|
277 |
+
Also, it no longer calls the superclass constructor.
|
278 |
+
|
279 |
+
* Add warning when ``css_sanitizer`` isn't set, but the ``style``
|
280 |
+
attribute is allowed. (#676)
|
281 |
+
|
282 |
+
* Fix linkify handling of character entities. (#501)
|
283 |
+
|
284 |
+
* Rework dev dependencies to use ``requirements-dev.txt`` and
|
285 |
+
``requirements-flake8.txt`` instead of extras.
|
286 |
+
|
287 |
+
* Fix project infrastructure to be tox-based so it's easier to have CI
|
288 |
+
run the same things we're running in development and with flake8
|
289 |
+
in an isolated environment.
|
290 |
+
|
291 |
+
* Update action versions in CI.
|
292 |
+
|
293 |
+
* Switch to f-strings where possible. Make tests parametrized to be
|
294 |
+
easier to read/maintain.
|
295 |
+
|
296 |
+
|
297 |
+
Version 5.0.1 (June 27th, 2022)
|
298 |
+
-------------------------------
|
299 |
+
|
300 |
+
**Security fixes**
|
301 |
+
|
302 |
+
None
|
303 |
+
|
304 |
+
|
305 |
+
**Bug fixes**
|
306 |
+
|
307 |
+
* Add missing comma to tinycss2 require. Thank you, @shadchin!
|
308 |
+
|
309 |
+
* Add url parse tests based on wpt url tests. (#688)
|
310 |
+
|
311 |
+
* Support scheme-less urls if "https" is in allow list. (#662)
|
312 |
+
|
313 |
+
* Handle escaping ``<`` in edge cases where it doesn't start a tag. (#544)
|
314 |
+
|
315 |
+
* Fix reference warnings in docs. (#660)
|
316 |
+
|
317 |
+
* Correctly urlencode email address parts. Thank you, @larseggert! (#659)
|
318 |
+
|
319 |
+
|
320 |
+
Version 5.0.0 (April 7th, 2022)
|
321 |
+
-------------------------------
|
322 |
+
|
323 |
+
**Backwards incompatible changes**
|
324 |
+
|
325 |
+
* ``clean`` and ``linkify`` now preserve the order of HTML attributes. Thank
|
326 |
+
you, @askoretskly! (#566)
|
327 |
+
|
328 |
+
* Drop support for Python 3.6. Thank you, @hugovk! (#629)
|
329 |
+
|
330 |
+
* CSS sanitization in style tags is completely different now. If you're using
|
331 |
+
Bleach ``clean`` to sanitize css in style tags, you'll need to update your
|
332 |
+
code and you'll need to install the ``css`` extras::
|
333 |
+
|
334 |
+
pip install 'bleach[css]'
|
335 |
+
|
336 |
+
See `the documentation on sanitizing CSS for how to do it
|
337 |
+
<https://bleach.readthedocs.io/en/latest/clean.html#sanitizing-css>`_. (#633)
|
338 |
+
|
339 |
+
**Security fixes**
|
340 |
+
|
341 |
+
None
|
342 |
+
|
343 |
+
**Bug fixes**
|
344 |
+
|
345 |
+
* Rework dev dependencies. We no longer have
|
346 |
+
``requirements-dev.in``/``requirements-dev.txt``. Instead, we're using
|
347 |
+
``dev`` extras.
|
348 |
+
|
349 |
+
See `development docs <https://bleach.readthedocs.io/en/latest/dev.html>`_
|
350 |
+
for more details. (#620)
|
351 |
+
|
352 |
+
* Add newline when dropping block-level tags. Thank you, @jvanasco! (#369)
|
353 |
+
|
354 |
+
|
355 |
+
Version 4.1.0 (August 25th, 2021)
|
356 |
+
---------------------------------
|
357 |
+
|
358 |
+
**Features**
|
359 |
+
|
360 |
+
* Python 3.9 support
|
361 |
+
|
362 |
+
**Security fixes**
|
363 |
+
|
364 |
+
None
|
365 |
+
|
366 |
+
**Bug fixes**
|
367 |
+
|
368 |
+
* Update sanitizer clean to use vendored 3.6.14 stdlib urllib.parse to
|
369 |
+
fix test failures on Python 3.9. (#536)
|
370 |
+
|
371 |
+
|
372 |
+
Version 4.0.0 (August 3rd, 2021)
|
373 |
+
--------------------------------
|
374 |
+
|
375 |
+
**Backwards incompatible changes**
|
376 |
+
|
377 |
+
* Drop support for unsupported Python versions <3.6. (#520)
|
378 |
+
|
379 |
+
**Security fixes**
|
380 |
+
|
381 |
+
None
|
382 |
+
|
383 |
+
**Features**
|
384 |
+
|
385 |
+
* fix attribute name in the linkify docs (thanks @CheesyFeet!)
|
386 |
+
|
387 |
+
|
388 |
+
Version 3.3.1 (July 14th, 2021)
|
389 |
+
-------------------------------
|
390 |
+
|
391 |
+
**Security fixes**
|
392 |
+
|
393 |
+
None
|
394 |
+
|
395 |
+
**Features**
|
396 |
+
|
397 |
+
* add more tests for CVE-2021-23980 / GHSA-vv2x-vrpj-qqpq
|
398 |
+
* bump python version to 3.8 for tox doc, vendorverify, and lint targets
|
399 |
+
* update bug report template tag
|
400 |
+
* update vendorverify script to detect and fail when extra files are vendored
|
401 |
+
* update release process docs to check vendorverify passes locally
|
402 |
+
|
403 |
+
**Bug fixes**
|
404 |
+
|
405 |
+
* remove extra vendored django present in the v3.3.0 whl (#595)
|
406 |
+
* duplicate h1 header doc fix (thanks Nguyễn Gia Phong / @McSinyx!)
|
407 |
+
|
408 |
+
|
409 |
+
Version 3.3.0 (February 1st, 2021)
|
410 |
+
----------------------------------
|
411 |
+
|
412 |
+
**Backwards incompatible changes**
|
413 |
+
|
414 |
+
* clean escapes HTML comments even when strip_comments=False
|
415 |
+
|
416 |
+
**Security fixes**
|
417 |
+
|
418 |
+
* Fix bug 1621692 / GHSA-m6xf-fq7q-8743. See the advisory for details.
|
419 |
+
|
420 |
+
**Features**
|
421 |
+
|
422 |
+
None
|
423 |
+
|
424 |
+
**Bug fixes**
|
425 |
+
|
426 |
+
None
|
427 |
+
|
428 |
+
|
429 |
+
Version 3.2.3 (January 26th, 2021)
|
430 |
+
----------------------------------
|
431 |
+
|
432 |
+
**Security fixes**
|
433 |
+
|
434 |
+
None
|
435 |
+
|
436 |
+
**Features**
|
437 |
+
|
438 |
+
None
|
439 |
+
|
440 |
+
**Bug fixes**
|
441 |
+
|
442 |
+
* fix clean and linkify raising ValueErrors for certain inputs. Thank you @Google-Autofuzz.
|
443 |
+
|
444 |
+
|
445 |
+
Version 3.2.2 (January 20th, 2021)
|
446 |
+
----------------------------------
|
447 |
+
|
448 |
+
**Security fixes**
|
449 |
+
|
450 |
+
None
|
451 |
+
|
452 |
+
**Features**
|
453 |
+
|
454 |
+
* Migrate CI to Github Actions. Thank you @hugovk.
|
455 |
+
|
456 |
+
**Bug fixes**
|
457 |
+
|
458 |
+
* fix linkify raising an IndexError on certain inputs. Thank you @Google-Autofuzz.
|
459 |
+
|
460 |
+
|
461 |
+
Version 3.2.1 (September 18th, 2020)
|
462 |
+
------------------------------------
|
463 |
+
|
464 |
+
**Security fixes**
|
465 |
+
|
466 |
+
None
|
467 |
+
|
468 |
+
**Features**
|
469 |
+
|
470 |
+
None
|
471 |
+
|
472 |
+
**Bug fixes**
|
473 |
+
|
474 |
+
* change linkifier to add rel="nofollow" as documented. Thank you @mitar.
|
475 |
+
* suppress html5lib sanitizer DeprecationWarnings (#557)
|
476 |
+
|
477 |
+
|
478 |
+
Version 3.2.0 (September 16th, 2020)
|
479 |
+
------------------------------------
|
480 |
+
|
481 |
+
**Security fixes**
|
482 |
+
|
483 |
+
None
|
484 |
+
|
485 |
+
**Features**
|
486 |
+
|
487 |
+
None
|
488 |
+
|
489 |
+
**Bug fixes**
|
490 |
+
|
491 |
+
* ``html5lib`` dependency to version 1.1.0. Thank you Sam Sneddon.
|
492 |
+
* update tests_website terminology. Thank you Thomas Grainger.
|
493 |
+
|
494 |
+
|
495 |
+
Version 3.1.5 (April 29th, 2020)
|
496 |
+
--------------------------------
|
497 |
+
|
498 |
+
**Security fixes**
|
499 |
+
|
500 |
+
None
|
501 |
+
|
502 |
+
**Features**
|
503 |
+
|
504 |
+
None
|
505 |
+
|
506 |
+
**Bug fixes**
|
507 |
+
|
508 |
+
* replace missing ``setuptools`` dependency with ``packaging``. Thank you Benjamin Peterson.
|
509 |
+
|
510 |
+
|
511 |
+
Version 3.1.4 (March 24th, 2020)
|
512 |
+
--------------------------------
|
513 |
+
|
514 |
+
**Security fixes**
|
515 |
+
|
516 |
+
* ``bleach.clean`` behavior parsing style attributes could result in a
|
517 |
+
regular expression denial of service (ReDoS).
|
518 |
+
|
519 |
+
Calls to ``bleach.clean`` with an allowed tag with an allowed
|
520 |
+
``style`` attribute were vulnerable to ReDoS. For example,
|
521 |
+
``bleach.clean(..., attributes={'a': ['style']})``.
|
522 |
+
|
523 |
+
This issue was confirmed in Bleach versions v3.1.3, v3.1.2, v3.1.1,
|
524 |
+
v3.1.0, v3.0.0, v2.1.4, and v2.1.3. Earlier versions used a similar
|
525 |
+
regular expression and should be considered vulnerable too.
|
526 |
+
|
527 |
+
Anyone using Bleach <=v3.1.3 is encouraged to upgrade.
|
528 |
+
|
529 |
+
https://bugzilla.mozilla.org/show_bug.cgi?id=1623633
|
530 |
+
|
531 |
+
**Backwards incompatible changes**
|
532 |
+
|
533 |
+
* Style attributes with dashes, or single or double quoted values are
|
534 |
+
cleaned instead of passed through.
|
535 |
+
|
536 |
+
**Features**
|
537 |
+
|
538 |
+
None
|
539 |
+
|
540 |
+
**Bug fixes**
|
541 |
+
|
542 |
+
None
|
543 |
+
|
544 |
+
|
545 |
+
Version 3.1.3 (March 17th, 2020)
|
546 |
+
--------------------------------
|
547 |
+
|
548 |
+
**Security fixes**
|
549 |
+
|
550 |
+
None
|
551 |
+
|
552 |
+
**Backwards incompatible changes**
|
553 |
+
|
554 |
+
* Drop support for Python 3.4. Thank you, @hugovk!
|
555 |
+
|
556 |
+
* Drop deprecated ``setup.py test`` support. Thank you, @jdufresne! (#507)
|
557 |
+
|
558 |
+
**Features**
|
559 |
+
|
560 |
+
* Add support for Python 3.8. Thank you, @jdufresne!
|
561 |
+
|
562 |
+
* Add support for PyPy 7. Thank you, @hugovk!
|
563 |
+
|
564 |
+
* Add pypy3 testing to tox and travis. Thank you, @jdufresne!
|
565 |
+
|
566 |
+
**Bug fixes**
|
567 |
+
|
568 |
+
* Add relative link to code of conduct. (#442)
|
569 |
+
|
570 |
+
* Fix typo: curren -> current in tests/test_clean.py Thank you, timgates42! (#504)
|
571 |
+
|
572 |
+
* Fix handling of non-ascii style attributes. Thank you, @sekineh! (#426)
|
573 |
+
|
574 |
+
* Simplify tox configuration. Thank you, @jdufresne!
|
575 |
+
|
576 |
+
* Make documentation reproducible. Thank you, @lamby!
|
577 |
+
|
578 |
+
* Fix typos in code comments. Thank you, @zborboa-g!
|
579 |
+
|
580 |
+
* Fix exception value testing. Thank you, @mastizada!
|
581 |
+
|
582 |
+
* Fix parser-tags NoneType exception. Thank you, @bope!
|
583 |
+
|
584 |
+
* Improve TLD support in linkify. Thank you, @pc-coholic!
|
585 |
+
|
586 |
+
|
587 |
+
Version 3.1.2 (March 11th, 2020)
|
588 |
+
--------------------------------
|
589 |
+
|
590 |
+
**Security fixes**
|
591 |
+
|
592 |
+
* ``bleach.clean`` behavior parsing embedded MathML and SVG content
|
593 |
+
with RCDATA tags did not match browser behavior and could result in
|
594 |
+
a mutation XSS.
|
595 |
+
|
596 |
+
Calls to ``bleach.clean`` with ``strip=False`` and ``math`` or
|
597 |
+
``svg`` tags and one or more of the RCDATA tags ``script``,
|
598 |
+
``noscript``, ``style``, ``noframes``, ``iframe``, ``noembed``, or
|
599 |
+
``xmp`` in the allowed tags whitelist were vulnerable to a mutation
|
600 |
+
XSS.
|
601 |
+
|
602 |
+
This security issue was confirmed in Bleach version v3.1.1. Earlier
|
603 |
+
versions are likely affected too.
|
604 |
+
|
605 |
+
Anyone using Bleach <=v3.1.1 is encouraged to upgrade.
|
606 |
+
|
607 |
+
https://bugzilla.mozilla.org/show_bug.cgi?id=1621692
|
608 |
+
|
609 |
+
**Backwards incompatible changes**
|
610 |
+
|
611 |
+
None
|
612 |
+
|
613 |
+
**Features**
|
614 |
+
|
615 |
+
None
|
616 |
+
|
617 |
+
**Bug fixes**
|
618 |
+
|
619 |
+
None
|
620 |
+
|
621 |
+
|
622 |
+
Version 3.1.1 (February 13th, 2020)
|
623 |
+
-----------------------------------
|
624 |
+
|
625 |
+
**Security fixes**
|
626 |
+
|
627 |
+
* ``bleach.clean`` behavior parsing ``noscript`` tags did not match
|
628 |
+
browser behavior.
|
629 |
+
|
630 |
+
Calls to ``bleach.clean`` allowing ``noscript`` and one or more of
|
631 |
+
the raw text tags (``title``, ``textarea``, ``script``, ``style``,
|
632 |
+
``noembed``, ``noframes``, ``iframe``, and ``xmp``) were vulnerable
|
633 |
+
to a mutation XSS.
|
634 |
+
|
635 |
+
This security issue was confirmed in Bleach versions v2.1.4, v3.0.2,
|
636 |
+
and v3.1.0. Earlier versions are probably affected too.
|
637 |
+
|
638 |
+
Anyone using Bleach <=v3.1.0 is highly encouraged to upgrade.
|
639 |
+
|
640 |
+
https://bugzilla.mozilla.org/show_bug.cgi?id=1615315
|
641 |
+
|
642 |
+
**Backwards incompatible changes**
|
643 |
+
|
644 |
+
None
|
645 |
+
|
646 |
+
**Features**
|
647 |
+
|
648 |
+
None
|
649 |
+
|
650 |
+
**Bug fixes**
|
651 |
+
|
652 |
+
None
|
653 |
+
|
654 |
+
|
655 |
+
Version 3.1.0 (January 9th, 2019)
|
656 |
+
---------------------------------
|
657 |
+
|
658 |
+
**Security fixes**
|
659 |
+
|
660 |
+
None
|
661 |
+
|
662 |
+
**Backwards incompatible changes**
|
663 |
+
|
664 |
+
None
|
665 |
+
|
666 |
+
**Features**
|
667 |
+
|
668 |
+
* Add ``recognized_tags`` argument to the linkify ``Linker`` class. This
|
669 |
+
fixes issues when linkifying on its own and having some tags get escaped.
|
670 |
+
It defaults to a list of HTML5 tags. Thank you, Chad Birch! (#409)
|
671 |
+
|
672 |
+
**Bug fixes**
|
673 |
+
|
674 |
+
* Add ``six>=1.9`` to requirements. Thank you, Dave Shawley (#416)
|
675 |
+
|
676 |
+
* Fix cases where attribute names could have invalid characters in them.
|
677 |
+
(#419)
|
678 |
+
|
679 |
+
* Fix problems with ``LinkifyFilter`` not being able to match links
|
680 |
+
across ``&``. (#422)
|
681 |
+
|
682 |
+
* Fix ``InputStreamWithMemory`` when the ``BleachHTMLParser`` is
|
683 |
+
parsing ``meta`` tags. (#431)
|
684 |
+
|
685 |
+
* Fix doctests. (#357)
|
686 |
+
|
687 |
+
|
688 |
+
Version 3.0.2 (October 11th, 2018)
|
689 |
+
----------------------------------
|
690 |
+
|
691 |
+
**Security fixes**
|
692 |
+
|
693 |
+
None
|
694 |
+
|
695 |
+
**Backwards incompatible changes**
|
696 |
+
|
697 |
+
None
|
698 |
+
|
699 |
+
**Features**
|
700 |
+
|
701 |
+
None
|
702 |
+
|
703 |
+
**Bug fixes**
|
704 |
+
|
705 |
+
* Merge ``Characters`` tokens after sanitizing them. This fixes issues in the
|
706 |
+
``LinkifyFilter`` where it was only linkifying parts of urls. (#374)
|
707 |
+
|
708 |
+
|
709 |
+
Version 3.0.1 (October 9th, 2018)
|
710 |
+
---------------------------------
|
711 |
+
|
712 |
+
**Security fixes**
|
713 |
+
|
714 |
+
None
|
715 |
+
|
716 |
+
**Backwards incompatible changes**
|
717 |
+
|
718 |
+
None
|
719 |
+
|
720 |
+
**Features**
|
721 |
+
|
722 |
+
* Support Python 3.7. It supported Python 3.7 just fine, but we added 3.7 to
|
723 |
+
the list of Python environments we test so this is now officially supported.
|
724 |
+
(#377)
|
725 |
+
|
726 |
+
**Bug fixes**
|
727 |
+
|
728 |
+
* Fix ``list`` object has no attribute ``lower`` in ``clean``. (#398)
|
729 |
+
* Fix ``abbr`` getting escaped in ``linkify``. (#400)
|
730 |
+
|
731 |
+
|
732 |
+
Version 3.0.0 (October 3rd, 2018)
|
733 |
+
---------------------------------
|
734 |
+
|
735 |
+
**Security fixes**
|
736 |
+
|
737 |
+
None
|
738 |
+
|
739 |
+
**Backwards incompatible changes**
|
740 |
+
|
741 |
+
* A bunch of functions were moved from one module to another.
|
742 |
+
|
743 |
+
These were moved from ``bleach.sanitizer`` to ``bleach.html5lib_shim``:
|
744 |
+
|
745 |
+
* ``convert_entity``
|
746 |
+
* ``convert_entities``
|
747 |
+
* ``match_entity``
|
748 |
+
* ``next_possible_entity``
|
749 |
+
* ``BleachHTMLSerializer``
|
750 |
+
* ``BleachHTMLTokenizer``
|
751 |
+
* ``BleachHTMLParser``
|
752 |
+
|
753 |
+
These functions and classes weren't documented and aren't part of the
|
754 |
+
public API, but people read code and might be using them so we're
|
755 |
+
considering it an incompatible API change.
|
756 |
+
|
757 |
+
If you're using them, you'll need to update your code.
|
758 |
+
|
759 |
+
**Features**
|
760 |
+
|
761 |
+
* Bleach no longer depends on html5lib. html5lib==1.0.1 is now vendored into
|
762 |
+
Bleach. You can remove it from your requirements file if none of your other
|
763 |
+
requirements require html5lib.
|
764 |
+
|
765 |
+
This means Bleach will now work fine with other libraries that depend on
|
766 |
+
html5lib regardless of what version of html5lib they require. (#386)
|
767 |
+
|
768 |
+
**Bug fixes**
|
769 |
+
|
770 |
+
* Fixed tags getting added when using clean or linkify. This was a
|
771 |
+
long-standing regression from the Bleach 2.0 rewrite. (#280, #392)
|
772 |
+
|
773 |
+
* Fixed ``<isindex>`` getting replaced with a string. Now it gets escaped or
|
774 |
+
stripped depending on whether it's in the allowed tags or not. (#279)
|
775 |
+
|
776 |
+
|
777 |
+
Version 2.1.4 (August 16th, 2018)
|
778 |
+
---------------------------------
|
779 |
+
|
780 |
+
**Security fixes**
|
781 |
+
|
782 |
+
None
|
783 |
+
|
784 |
+
**Backwards incompatible changes**
|
785 |
+
|
786 |
+
* Dropped support for Python 3.3. (#328)
|
787 |
+
|
788 |
+
**Features**
|
789 |
+
|
790 |
+
None
|
791 |
+
|
792 |
+
**Bug fixes**
|
793 |
+
|
794 |
+
* Handle ambiguous ampersands in correctly. (#359)
|
795 |
+
|
796 |
+
|
797 |
+
Version 2.1.3 (March 5th, 2018)
|
798 |
+
-------------------------------
|
799 |
+
|
800 |
+
**Security fixes**
|
801 |
+
|
802 |
+
* Attributes that have URI values weren't properly sanitized if the
|
803 |
+
values contained character entities. Using character entities, it
|
804 |
+
was possible to construct a URI value with a scheme that was not
|
805 |
+
allowed that would slide through unsanitized.
|
806 |
+
|
807 |
+
This security issue was introduced in Bleach 2.1. Anyone using
|
808 |
+
Bleach 2.1 is highly encouraged to upgrade.
|
809 |
+
|
810 |
+
https://bugzilla.mozilla.org/show_bug.cgi?id=1442745
|
811 |
+
|
812 |
+
**Backwards incompatible changes**
|
813 |
+
|
814 |
+
None
|
815 |
+
|
816 |
+
**Features**
|
817 |
+
|
818 |
+
None
|
819 |
+
|
820 |
+
**Bug fixes**
|
821 |
+
|
822 |
+
* Fixed some other edge cases for attribute URI value sanitizing and
|
823 |
+
improved testing of this code.
|
824 |
+
|
825 |
+
|
826 |
+
Version 2.1.2 (December 7th, 2017)
|
827 |
+
----------------------------------
|
828 |
+
|
829 |
+
**Security fixes**
|
830 |
+
|
831 |
+
None
|
832 |
+
|
833 |
+
**Backwards incompatible changes**
|
834 |
+
|
835 |
+
None
|
836 |
+
|
837 |
+
**Features**
|
838 |
+
|
839 |
+
None
|
840 |
+
|
841 |
+
**Bug fixes**
|
842 |
+
|
843 |
+
* Support html5lib-python 1.0.1. (#337)
|
844 |
+
|
845 |
+
* Add deprecation warning for supporting html5lib-python < 1.0.
|
846 |
+
|
847 |
+
* Switch to semver.
|
848 |
+
|
849 |
+
|
850 |
+
Version 2.1.1 (October 2nd, 2017)
|
851 |
+
---------------------------------
|
852 |
+
|
853 |
+
**Security fixes**
|
854 |
+
|
855 |
+
None
|
856 |
+
|
857 |
+
**Backwards incompatible changes**
|
858 |
+
|
859 |
+
None
|
860 |
+
|
861 |
+
**Features**
|
862 |
+
|
863 |
+
None
|
864 |
+
|
865 |
+
**Bug fixes**
|
866 |
+
|
867 |
+
* Fix ``setup.py`` opening files when ``LANG=``. (#324)
|
868 |
+
|
869 |
+
|
870 |
+
Version 2.1 (September 28th, 2017)
|
871 |
+
----------------------------------
|
872 |
+
|
873 |
+
**Security fixes**
|
874 |
+
|
875 |
+
* Convert control characters (backspace particularly) to "?" preventing
|
876 |
+
malicious copy-and-paste situations. (#298)
|
877 |
+
|
878 |
+
See `<https://github.com/mozilla/bleach/issues/298>`_ for more details.
|
879 |
+
|
880 |
+
This affects all previous versions of Bleach. Check the comments on that
|
881 |
+
issue for ways to alleviate the issue if you can't upgrade to Bleach 2.1.
|
882 |
+
|
883 |
+
|
884 |
+
**Backwards incompatible changes**
|
885 |
+
|
886 |
+
* Redid versioning. ``bleach.VERSION`` is no longer available. Use the string
|
887 |
+
version at ``bleach.__version__`` and parse it with
|
888 |
+
``pkg_resources.parse_version``. (#307)
|
889 |
+
|
890 |
+
* clean, linkify: linkify and clean should only accept text types; thank you,
|
891 |
+
Janusz! (#292)
|
892 |
+
|
893 |
+
* clean, linkify: accept only unicode or utf-8-encoded str (#176)
|
894 |
+
|
895 |
+
|
896 |
+
**Features**
|
897 |
+
|
898 |
+
|
899 |
+
**Bug fixes**
|
900 |
+
|
901 |
+
* ``bleach.clean()`` no longer unescapes entities including ones that are missing
|
902 |
+
a ``;`` at the end which can happen in urls and other places. (#143)
|
903 |
+
|
904 |
+
* linkify: fix http links inside of mailto links; thank you, sedrubal! (#300)
|
905 |
+
|
906 |
+
* clarify security policy in docs (#303)
|
907 |
+
|
908 |
+
* fix dependency specification for html5lib 1.0b8, 1.0b9, and 1.0b10; thank you,
|
909 |
+
Zoltán! (#268)
|
910 |
+
|
911 |
+
* add Bleach vs. html5lib comparison to README; thank you, Stu Cox! (#278)
|
912 |
+
|
913 |
+
* fix KeyError exceptions on tags without href attr; thank you, Alex Defsen!
|
914 |
+
(#273)
|
915 |
+
|
916 |
+
* add test website and scripts to test ``bleach.clean()`` output in browser;
|
917 |
+
thank you, Greg Guthe!
|
918 |
+
|
919 |
+
|
920 |
+
Version 2.0 (March 8th, 2017)
|
921 |
+
-----------------------------
|
922 |
+
|
923 |
+
**Security fixes**
|
924 |
+
|
925 |
+
* None
|
926 |
+
|
927 |
+
|
928 |
+
**Backwards incompatible changes**
|
929 |
+
|
930 |
+
* Removed support for Python 2.6. (#206)
|
931 |
+
|
932 |
+
* Removed support for Python 3.2. (#224)
|
933 |
+
|
934 |
+
* Bleach no longer supports html5lib < 0.99999999 (8 9s).
|
935 |
+
|
936 |
+
This version is a rewrite to use the new sanitizing API since the old
|
937 |
+
one was dropped in html5lib 0.99999999 (8 9s).
|
938 |
+
|
939 |
+
If you're using 0.9999999 (7 9s) upgrade to 0.99999999 (8 9s) or higher.
|
940 |
+
|
941 |
+
If you're using 1.0b8 (equivalent to 0.9999999 (7 9s)), upgrade to 1.0b9
|
942 |
+
(equivalent to 0.99999999 (8 9s)) or higher.
|
943 |
+
|
944 |
+
* ``bleach.clean`` and friends were rewritten
|
945 |
+
|
946 |
+
``clean`` was reimplemented as an html5lib filter and happens at a different
|
947 |
+
step in the HTML parsing -> traversing -> serializing process. Because of
|
948 |
+
that, there are some differences in clean's output as compared with previous
|
949 |
+
versions.
|
950 |
+
|
951 |
+
Amongst other things, this version will add end tags even if the tag in
|
952 |
+
question is to be escaped.
|
953 |
+
|
954 |
+
* ``bleach.clean`` and friends attribute callables now take three arguments:
|
955 |
+
tag, attribute name and attribute value. Previously they only took attribute
|
956 |
+
name and attribute value.
|
957 |
+
|
958 |
+
All attribute callables will need to be updated.
|
959 |
+
|
960 |
+
* ``bleach.linkify`` was rewritten
|
961 |
+
|
962 |
+
``linkify`` was reimplemented as an html5lib Filter. As such, it no longer
|
963 |
+
accepts a ``tokenizer`` argument.
|
964 |
+
|
965 |
+
The callback functions for adjusting link attributes now takes a namespaced
|
966 |
+
attribute.
|
967 |
+
|
968 |
+
Previously you'd do something like this::
|
969 |
+
|
970 |
+
def check_protocol(attrs, is_new):
|
971 |
+
if not attrs.get('href', '').startswith('http:', 'https:')):
|
972 |
+
return None
|
973 |
+
return attrs
|
974 |
+
|
975 |
+
Now it's more like this::
|
976 |
+
|
977 |
+
def check_protocol(attrs, is_new):
|
978 |
+
if not attrs.get((None, u'href'), u'').startswith(('http:', 'https:')):
|
979 |
+
# ^^^^^^^^^^^^^^^
|
980 |
+
return None
|
981 |
+
return attrs
|
982 |
+
|
983 |
+
Further, you need to make sure you're always using unicode values. If you
|
984 |
+
don't then html5lib will raise an assertion error that the value is not
|
985 |
+
unicode.
|
986 |
+
|
987 |
+
All linkify filters will need to be updated.
|
988 |
+
|
989 |
+
* ``bleach.linkify`` and friends had a ``skip_pre`` argument--that's been
|
990 |
+
replaced with a more general ``skip_tags`` argument.
|
991 |
+
|
992 |
+
Before, you might do::
|
993 |
+
|
994 |
+
bleach.linkify(some_text, skip_pre=True)
|
995 |
+
|
996 |
+
The equivalent with Bleach 2.0 is::
|
997 |
+
|
998 |
+
bleach.linkify(some_text, skip_tags=['pre'])
|
999 |
+
|
1000 |
+
You can skip other tags, too, like ``style`` or ``script`` or other places
|
1001 |
+
where you don't want linkification happening.
|
1002 |
+
|
1003 |
+
All uses of linkify that use ``skip_pre`` will need to be updated.
|
1004 |
+
|
1005 |
+
|
1006 |
+
**Changes**
|
1007 |
+
|
1008 |
+
* Supports Python 3.6.
|
1009 |
+
|
1010 |
+
* Supports html5lib >= 0.99999999 (8 9s).
|
1011 |
+
|
1012 |
+
* There's a ``bleach.sanitizer.Cleaner`` class that you can instantiate with your
|
1013 |
+
favorite clean settings for easy reuse.
|
1014 |
+
|
1015 |
+
* There's a ``bleach.linkifier.Linker`` class that you can instantiate with your
|
1016 |
+
favorite linkify settings for easy reuse.
|
1017 |
+
|
1018 |
+
* There's a ``bleach.linkifier.LinkifyFilter`` which is an htm5lib filter that
|
1019 |
+
you can pass as a filter to ``bleach.sanitizer.Cleaner`` allowing you to clean
|
1020 |
+
and linkify in one pass.
|
1021 |
+
|
1022 |
+
* ``bleach.clean`` and friends can now take a callable as an attributes arg value.
|
1023 |
+
|
1024 |
+
* Tons of bug fixes.
|
1025 |
+
|
1026 |
+
* Cleaned up tests.
|
1027 |
+
|
1028 |
+
* Documentation fixes.
|
1029 |
+
|
1030 |
+
|
1031 |
+
Version 1.5 (November 4th, 2016)
|
1032 |
+
--------------------------------
|
1033 |
+
|
1034 |
+
**Security fixes**
|
1035 |
+
|
1036 |
+
* None
|
1037 |
+
|
1038 |
+
**Backwards incompatible changes**
|
1039 |
+
|
1040 |
+
* clean: The list of ``ALLOWED_PROTOCOLS`` now defaults to http, https and
|
1041 |
+
mailto.
|
1042 |
+
|
1043 |
+
Previously it was a long list of protocols something like ed2k, ftp, http,
|
1044 |
+
https, irc, mailto, news, gopher, nntp, telnet, webcal, xmpp, callto, feed,
|
1045 |
+
urn, aim, rsync, tag, ssh, sftp, rtsp, afs, data. (#149)
|
1046 |
+
|
1047 |
+
**Changes**
|
1048 |
+
|
1049 |
+
* clean: Added ``protocols`` to arguments list to let you override the list of
|
1050 |
+
allowed protocols. Thank you, Andreas Malecki! (#149)
|
1051 |
+
|
1052 |
+
* linkify: Fix a bug involving periods at the end of an email address. Thank you,
|
1053 |
+
Lorenz Schori! (#219)
|
1054 |
+
|
1055 |
+
* linkify: Fix linkification of non-ascii ports. Thank you Alexandre, Macabies!
|
1056 |
+
(#207)
|
1057 |
+
|
1058 |
+
* linkify: Fix linkify inappropriately removing node tails when dropping nodes.
|
1059 |
+
(#132)
|
1060 |
+
|
1061 |
+
* Fixed a test that failed periodically. (#161)
|
1062 |
+
|
1063 |
+
* Switched from nose to py.test. (#204)
|
1064 |
+
|
1065 |
+
* Add test matrix for all supported Python and html5lib versions. (#230)
|
1066 |
+
|
1067 |
+
* Limit to html5lib ``>=0.999,!=0.9999,!=0.99999,<0.99999999`` because 0.9999
|
1068 |
+
and 0.99999 are busted.
|
1069 |
+
|
1070 |
+
* Add support for ``python setup.py test``. (#97)
|
1071 |
+
|
1072 |
+
|
1073 |
+
Version 1.4.3 (May 23rd, 2016)
|
1074 |
+
------------------------------
|
1075 |
+
|
1076 |
+
**Security fixes**
|
1077 |
+
|
1078 |
+
* None
|
1079 |
+
|
1080 |
+
**Changes**
|
1081 |
+
|
1082 |
+
* Limit to html5lib ``>=0.999,<0.99999999`` because of impending change to
|
1083 |
+
sanitizer api. #195
|
1084 |
+
|
1085 |
+
|
1086 |
+
Version 1.4.2 (September 11, 2015)
|
1087 |
+
----------------------------------
|
1088 |
+
|
1089 |
+
**Changes**
|
1090 |
+
|
1091 |
+
* linkify: Fix hang in linkify with ``parse_email=True``. (#124)
|
1092 |
+
|
1093 |
+
* linkify: Fix crash in linkify when removing a link that is a first-child. (#136)
|
1094 |
+
|
1095 |
+
* Updated TLDs.
|
1096 |
+
|
1097 |
+
* linkify: Don't remove exterior brackets when linkifying. (#146)
|
1098 |
+
|
1099 |
+
|
1100 |
+
Version 1.4.1 (December 15, 2014)
|
1101 |
+
---------------------------------
|
1102 |
+
|
1103 |
+
**Changes**
|
1104 |
+
|
1105 |
+
* Consistent order of attributes in output.
|
1106 |
+
|
1107 |
+
* Python 3.4 support.
|
1108 |
+
|
1109 |
+
|
1110 |
+
Version 1.4 (January 12, 2014)
|
1111 |
+
------------------------------
|
1112 |
+
|
1113 |
+
**Changes**
|
1114 |
+
|
1115 |
+
* linkify: Update linkify to use etree type Treewalker instead of simpletree.
|
1116 |
+
|
1117 |
+
* Updated html5lib to version ``>=0.999``.
|
1118 |
+
|
1119 |
+
* Update all code to be compatible with Python 3 and 2 using six.
|
1120 |
+
|
1121 |
+
* Switch to Apache License.
|
1122 |
+
|
1123 |
+
|
1124 |
+
Version 1.3
|
1125 |
+
-----------
|
1126 |
+
|
1127 |
+
* Used by Python 3-only fork.
|
1128 |
+
|
1129 |
+
|
1130 |
+
Version 1.2.2 (May 18, 2013)
|
1131 |
+
----------------------------
|
1132 |
+
|
1133 |
+
* Pin html5lib to version 0.95 for now due to major API break.
|
1134 |
+
|
1135 |
+
|
1136 |
+
Version 1.2.1 (February 19, 2013)
|
1137 |
+
---------------------------------
|
1138 |
+
|
1139 |
+
* ``clean()`` no longer considers ``feed:`` an acceptable protocol due to
|
1140 |
+
inconsistencies in browser behavior.
|
1141 |
+
|
1142 |
+
|
1143 |
+
Version 1.2 (January 28, 2013)
|
1144 |
+
------------------------------
|
1145 |
+
|
1146 |
+
* ``linkify()`` has changed considerably. Many keyword arguments have been
|
1147 |
+
replaced with a single callbacks list. Please see the documentation for more
|
1148 |
+
information.
|
1149 |
+
|
1150 |
+
* Bleach will no longer consider unacceptable protocols when linkifying.
|
1151 |
+
|
1152 |
+
* ``linkify()`` now takes a tokenizer argument that allows it to skip
|
1153 |
+
sanitization.
|
1154 |
+
|
1155 |
+
* ``delinkify()`` is gone.
|
1156 |
+
|
1157 |
+
* Removed exception handling from ``_render``. ``clean()`` and ``linkify()`` may
|
1158 |
+
now throw.
|
1159 |
+
|
1160 |
+
* ``linkify()`` correctly ignores case for protocols and domain names.
|
1161 |
+
|
1162 |
+
* ``linkify()`` correctly handles markup within an <a> tag.
|
1163 |
+
|
1164 |
+
|
1165 |
+
Version 1.1.5
|
1166 |
+
-------------
|
1167 |
+
|
1168 |
+
|
1169 |
+
Version 1.1.4
|
1170 |
+
-------------
|
1171 |
+
|
1172 |
+
|
1173 |
+
Version 1.1.3 (July 10, 2012)
|
1174 |
+
-----------------------------
|
1175 |
+
|
1176 |
+
* Fix parsing bare URLs when parse_email=True.
|
1177 |
+
|
1178 |
+
|
1179 |
+
Version 1.1.2 (June 1, 2012)
|
1180 |
+
----------------------------
|
1181 |
+
|
1182 |
+
* Fix hang in style attribute sanitizer. (#61)
|
1183 |
+
|
1184 |
+
* Allow ``/`` in style attribute values.
|
1185 |
+
|
1186 |
+
|
1187 |
+
Version 1.1.1 (February 17, 2012)
|
1188 |
+
---------------------------------
|
1189 |
+
|
1190 |
+
* Fix tokenizer for html5lib 0.9.5.
|
1191 |
+
|
1192 |
+
|
1193 |
+
Version 1.1.0 (October 24, 2011)
|
1194 |
+
--------------------------------
|
1195 |
+
|
1196 |
+
* ``linkify()`` now understands port numbers. (#38)
|
1197 |
+
|
1198 |
+
* Documented character encoding behavior. (#41)
|
1199 |
+
|
1200 |
+
* Add an optional target argument to ``linkify()``.
|
1201 |
+
|
1202 |
+
* Add ``delinkify()`` method. (#45)
|
1203 |
+
|
1204 |
+
* Support subdomain whitelist for ``delinkify()``. (#47, #48)
|
1205 |
+
|
1206 |
+
|
1207 |
+
Version 1.0.4 (September 2, 2011)
|
1208 |
+
---------------------------------
|
1209 |
+
|
1210 |
+
* Switch to SemVer git tags.
|
1211 |
+
|
1212 |
+
* Make ``linkify()`` smarter about trailing punctuation. (#30)
|
1213 |
+
|
1214 |
+
* Pass ``exc_info`` to logger during rendering issues.
|
1215 |
+
|
1216 |
+
* Add wildcard key for attributes. (#19)
|
1217 |
+
|
1218 |
+
* Make ``linkify()`` use the ``HTMLSanitizer`` tokenizer. (#36)
|
1219 |
+
|
1220 |
+
* Fix URLs wrapped in parentheses. (#23)
|
1221 |
+
|
1222 |
+
* Make ``linkify()`` UTF-8 safe. (#33)
|
1223 |
+
|
1224 |
+
|
1225 |
+
Version 1.0.3 (June 14, 2011)
|
1226 |
+
-----------------------------
|
1227 |
+
|
1228 |
+
* ``linkify()`` works with 3rd level domains. (#24)
|
1229 |
+
|
1230 |
+
* ``clean()`` supports vendor prefixes in style values. (#31, #32)
|
1231 |
+
|
1232 |
+
* Fix ``linkify()`` email escaping.
|
1233 |
+
|
1234 |
+
|
1235 |
+
Version 1.0.2 (June 6, 2011)
|
1236 |
+
----------------------------
|
1237 |
+
|
1238 |
+
* ``linkify()`` supports email addresses.
|
1239 |
+
|
1240 |
+
* ``clean()`` supports callables in attributes filter.
|
1241 |
+
|
1242 |
+
|
1243 |
+
Version 1.0.1 (April 12, 2011)
|
1244 |
+
------------------------------
|
1245 |
+
|
1246 |
+
* ``linkify()`` doesn't drop trailing slashes. (#21)
|
1247 |
+
* ``linkify()`` won't linkify 'libgl.so.1'. (#22)
|
.venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/RECORD
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
bleach/__init__.py,sha256=bCOdn7NC262aA1v98sl-lklPqeaw_5LiXqYSf-XAwUM,3649
|
2 |
+
bleach/callbacks.py,sha256=JNTGiM5_3bKsGltpR9ZYEz_C_b7-vfDlTTdQCirbdyc,752
|
3 |
+
bleach/css_sanitizer.py,sha256=QFMxRKBUMSuNvYkVpB2WRBQO609eFbU-p9P_LhU6jtM,2526
|
4 |
+
bleach/html5lib_shim.py,sha256=cWdAh70QZWz4MwtihdiA1gZJ0hTkvRjUYurE4uoCHCg,23294
|
5 |
+
bleach/linkifier.py,sha256=vWOXKuRXirpCwejUEEyfe8EWJ7rBlieMDEerg95OhPU,22375
|
6 |
+
bleach/parse_shim.py,sha256=VDPOdBOKbuDEceKVvfoggcr6A332bkcq4Z8jMtOJlAQ,50
|
7 |
+
bleach/sanitizer.py,sha256=JqDuTINOybpc_eHBzG_H7cnkHdFskZGbfsaBc-hDPH8,21934
|
8 |
+
bleach/_vendor/README.rst,sha256=eXeKT2JdZB4WX1kuhTa8W9Jp9VXtwIKFxo5RUL5exmM,2160
|
9 |
+
bleach/_vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10 |
+
bleach/_vendor/parse.py,sha256=Rq-WbjO2JHrh1X2UWRFaPrRs2p-AnJ8U4FKrwv6NrLI,39023
|
11 |
+
bleach/_vendor/parse.py.SHA256SUM,sha256=-AaiqN-9otw_X0vFjKkbKWFvkp68iLME92_wI-8-vm0,75
|
12 |
+
bleach/_vendor/vendor.txt,sha256=6FFZyenumgWqnhLgbCa4yzL4HVNaSUDC2DHNyR5Fy6w,184
|
13 |
+
bleach/_vendor/vendor_install.sh,sha256=x_Pn4dkfzPMJCZKwHHFxp0EAL5RsIfz-HSdTWHuI4yA,453
|
14 |
+
bleach/_vendor/html5lib/__init__.py,sha256=pWnYcfZ69wNLrdQL7bpr49FUi8O8w0KhKCOHsyRgYGQ,1143
|
15 |
+
bleach/_vendor/html5lib/_ihatexml.py,sha256=ifOwF7pXqmyThIXc3boWc96s4MDezqRrRVp7FwDYUFs,16728
|
16 |
+
bleach/_vendor/html5lib/_inputstream.py,sha256=IKuMiY8rzb7pqIGCpbvTqsxysLEpgEHWYvYEFu4LUAI,32300
|
17 |
+
bleach/_vendor/html5lib/_tokenizer.py,sha256=WvJQa2Mli4NtTmhLXkX8Jy5FcWttqCaiDTiKyaw8D-k,77028
|
18 |
+
bleach/_vendor/html5lib/_utils.py,sha256=AxAJSG15eyarCgKMnlUwzs1X6jFHXqEvhlYEOxAFmis,4919
|
19 |
+
bleach/_vendor/html5lib/constants.py,sha256=Ll-yzLU_jcjyAI_h57zkqZ7aQWE5t5xA4y_jQgoUUhw,83464
|
20 |
+
bleach/_vendor/html5lib/html5parser.py,sha256=w5hZJh0cvD3g4CS196DiTmuGpSKCMYe1GS46-yf_WZQ,117174
|
21 |
+
bleach/_vendor/html5lib/serializer.py,sha256=K2kfoLyMPMFPfdusfR30SrxNkf0mJB92-P5_RntyaaI,15747
|
22 |
+
bleach/_vendor/html5lib/_trie/__init__.py,sha256=nqfgO910329BEVJ5T4psVwQtjd2iJyEXQ2-X8c1YxwU,109
|
23 |
+
bleach/_vendor/html5lib/_trie/_base.py,sha256=CaybYyMro8uERQYjby2tTeSUatnWDfWroUN9N7ety5w,1013
|
24 |
+
bleach/_vendor/html5lib/_trie/py.py,sha256=zg7RZSHxJ8mLmuI_7VEIV8AomISrgkvqCP477AgXaG0,1763
|
25 |
+
bleach/_vendor/html5lib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26 |
+
bleach/_vendor/html5lib/filters/alphabeticalattributes.py,sha256=lViZc2JMCclXi_5gduvmdzrRxtO5Xo9ONnbHBVCsykU,919
|
27 |
+
bleach/_vendor/html5lib/filters/base.py,sha256=z-IU9ZAYjpsVsqmVt7kuWC63jR11hDMr6CVrvuao8W0,286
|
28 |
+
bleach/_vendor/html5lib/filters/inject_meta_charset.py,sha256=egDXUEHXmAG9504xz0K6ALDgYkvUrC2q15YUVeNlVQg,2945
|
29 |
+
bleach/_vendor/html5lib/filters/lint.py,sha256=upXATs6By7cot7o0bnNqR15sPq2Fn6Vnjvoy3gyO_rY,3631
|
30 |
+
bleach/_vendor/html5lib/filters/optionaltags.py,sha256=8lWT75J0aBOHmPgfmqTHSfPpPMp01T84NKu0CRedxcE,10588
|
31 |
+
bleach/_vendor/html5lib/filters/sanitizer.py,sha256=XGNSdzIqDTaHot1V-rRj1V_XOolApJ7n95tHP9JcgNU,26885
|
32 |
+
bleach/_vendor/html5lib/filters/whitespace.py,sha256=8eWqZxd4UC4zlFGW6iyY6f-2uuT8pOCSALc3IZt7_t4,1214
|
33 |
+
bleach/_vendor/html5lib/treeadapters/__init__.py,sha256=18hyI-at2aBsdKzpwRwa5lGF1ipgctaTYXoU9En2ZQg,650
|
34 |
+
bleach/_vendor/html5lib/treeadapters/genshi.py,sha256=CH27pAsDKmu4ZGkAUrwty7u0KauGLCZRLPMzaO3M5vo,1715
|
35 |
+
bleach/_vendor/html5lib/treeadapters/sax.py,sha256=BKS8woQTnKiqeffHsxChUqL4q2ZR_wb5fc9MJ3zQC8s,1776
|
36 |
+
bleach/_vendor/html5lib/treebuilders/__init__.py,sha256=AysSJyvPfikCMMsTVvaxwkgDieELD5dfR8FJIAuq7hY,3592
|
37 |
+
bleach/_vendor/html5lib/treebuilders/base.py,sha256=oeZNGEB-kt90YJGVH05gb5a8E7ids2AbYwGRsVCieWk,14553
|
38 |
+
bleach/_vendor/html5lib/treebuilders/dom.py,sha256=22whb0C71zXIsai5mamg6qzBEiigcBIvaDy4Asw3at0,8925
|
39 |
+
bleach/_vendor/html5lib/treebuilders/etree.py,sha256=EbmHx-wQ-11MVucTPtF7Ul92-mQGN3Udu_KfDn-Ifhk,12824
|
40 |
+
bleach/_vendor/html5lib/treebuilders/etree_lxml.py,sha256=OazDHZGO_q4FnVs4Dhs4hzzn2JwGAOs-rfV8LAlUGW4,14754
|
41 |
+
bleach/_vendor/html5lib/treewalkers/__init__.py,sha256=OBPtc1TU5mGyy18QDMxKEyYEz0wxFUUNj5v0-XgmYhY,5719
|
42 |
+
bleach/_vendor/html5lib/treewalkers/base.py,sha256=ouiOsuSzvI0KgzdWP8PlxIaSNs9falhbiinAEc_UIJY,7476
|
43 |
+
bleach/_vendor/html5lib/treewalkers/dom.py,sha256=EHyFR8D8lYNnyDU9lx_IKigVJRyecUGua0mOi7HBukc,1413
|
44 |
+
bleach/_vendor/html5lib/treewalkers/etree.py,sha256=gkD4tfEfRWPsEGvgHHJxZmKZXUvBzVVGz3v5C_MIiOE,4539
|
45 |
+
bleach/_vendor/html5lib/treewalkers/etree_lxml.py,sha256=eLedbn6nPjlpebibsWVijey7WEpzDwxU3ubwUoudBuA,6345
|
46 |
+
bleach/_vendor/html5lib/treewalkers/genshi.py,sha256=4D2PECZ5n3ZN3qu3jMl9yY7B81jnQApBQSVlfaIuYbA,2309
|
47 |
+
bleach-6.1.0.dist-info/LICENSE,sha256=vsIjjBSaYyuPsmgT9oes6rq4AyfzJwdpwsFhV4g9MTA,569
|
48 |
+
bleach-6.1.0.dist-info/METADATA,sha256=1SuJgikPmVEIDjs_NHu_oLycasw9HiTE19bLhRC8FSw,30425
|
49 |
+
bleach-6.1.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
50 |
+
bleach-6.1.0.dist-info/top_level.txt,sha256=dcv0wKIySB0zMjAEXLwY4V0-3IN9UZQGAT1wDmfQICY,7
|
51 |
+
bleach/_vendor/html5lib-1.1.dist-info/AUTHORS.rst,sha256=DrNAMifoDpuQyJn-KW-H6K8Tt2a5rKnV2UF4-DRrGUI,983
|
52 |
+
bleach/_vendor/html5lib-1.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
53 |
+
bleach/_vendor/html5lib-1.1.dist-info/LICENSE,sha256=FqOZkWGekvGGgJMtoqkZn999ld8-yu3FLqBiGKq6_W8,1084
|
54 |
+
bleach/_vendor/html5lib-1.1.dist-info/METADATA,sha256=Y3w-nd_22HQnQRy3yypVsV_ke2FF94uUD4-vGpc2DnI,16076
|
55 |
+
bleach/_vendor/html5lib-1.1.dist-info/RECORD,sha256=u-y_W5lhdsHC1OSMnA4bCi3-11IgQ_FAIW6viMu8_LA,3486
|
56 |
+
bleach/_vendor/html5lib-1.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57 |
+
bleach/_vendor/html5lib-1.1.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
|
58 |
+
bleach/_vendor/html5lib-1.1.dist-info/top_level.txt,sha256=XEX6CHpskSmvjJB4tP6m4Q5NYXhIf_0ceMc0PNbzJPQ,9
|
59 |
+
bleach-6.1.0.dist-info/INSTALLER,sha256=4EobgVZEtoZym__e-MIhNYRUXcWFMMbrrt6xRpKyZoQ,12
|
60 |
+
bleach-6.1.0.dist-info/RECORD,,
|
.venv/lib/python3.10/site-packages/bleach-6.1.0.dist-info/WHEEL
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Wheel-Version: 1.0
|
2 |
+
Generator: bdist_wheel (0.41.2)
|
3 |
+
Root-Is-Purelib: true
|
4 |
+
Tag: py3-none-any
|
5 |
+
|