Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .bashrc +107 -0
- .cache/pip/http-v2/1/0/e/d/c/10edc2fedb88f9a82f91dc7f8666c74a4e7067dbd945b9923a040482 +0 -0
- .cache/pip/http-v2/1/0/e/d/c/10edc2fedb88f9a82f91dc7f8666c74a4e7067dbd945b9923a040482.body +0 -0
- .cache/pip/http-v2/1/6/9/3/2/1693297fb9daf7bfe370bf51d371acfeb8ff40759bf8650dfd404ba4 +0 -0
- .cache/pip/http-v2/1/6/9/3/2/1693297fb9daf7bfe370bf51d371acfeb8ff40759bf8650dfd404ba4.body +0 -0
- .cache/pip/http-v2/1/a/9/9/5/1a995e0685d0b5c5a3f3321cda9ebcbc376a9137828d1c100a493532 +0 -0
- .cache/pip/http-v2/1/a/9/9/5/1a995e0685d0b5c5a3f3321cda9ebcbc376a9137828d1c100a493532.body +0 -0
- .cache/pip/http-v2/1/d/5/8/0/1d580297aa71908bf0d94823d03615447cfaaf5e778d47640756ae80 +0 -0
- .cache/pip/http-v2/1/d/5/8/0/1d580297aa71908bf0d94823d03615447cfaaf5e778d47640756ae80.body +0 -0
- .cache/pip/http-v2/1/e/2/b/1/1e2b1734fc3c57a4733131da81a6167573fc77057172172ceee83a22.body +0 -0
- .cache/pip/http-v2/2/1/c/8/b/21c8bac038994bd5727db00d02b53b7ccbc2a8ea142f49d934129bc8 +0 -0
- .cache/pip/http-v2/2/1/c/8/b/21c8bac038994bd5727db00d02b53b7ccbc2a8ea142f49d934129bc8.body +0 -0
- .cache/pip/http-v2/2/e/1/8/3/2e183ebf5293bbe308140b02c615ef7366590e4863fcd1adbcaec181 +0 -0
- .cache/pip/http-v2/2/e/1/8/3/2e183ebf5293bbe308140b02c615ef7366590e4863fcd1adbcaec181.body +0 -0
- .cache/pip/http-v2/2/e/2/d/8/2e2d841f57ca6a43dfc96af93374304dda5b757176df2cce7ca2b18d.body +0 -0
- .cache/pip/http-v2/2/e/a/5/8/2ea58cbd4e5eb121ff41bc95c898f06d3d9fb75f92176c76e2872a66 +0 -0
- .cache/pip/http-v2/2/e/a/5/8/2ea58cbd4e5eb121ff41bc95c898f06d3d9fb75f92176c76e2872a66.body +0 -0
- .cache/pip/http-v2/3/8/6/0/e/3860e4de9ae53c79d2fd61419e9049df314ccc8b640782c02c6e2e2d +0 -0
- .cache/pip/http-v2/3/f/0/b/5/3f0b530a5c9fab3e5025382bf4f606f0e51cb4c0cd8174857429d8fe.body +0 -0
- .cache/pip/http-v2/4/3/b/5/1/43b51859987aa489fca1045420773685b73ad992551f22d662919ecf +0 -0
- .cache/pip/http-v2/4/3/b/5/1/43b51859987aa489fca1045420773685b73ad992551f22d662919ecf.body +142 -0
- .cache/pip/http-v2/4/9/0/f/6/490f6d7cd33219a4671ccf426e5cf1fb77b4a08820a91961cb0ae903 +0 -0
- .cache/pip/http-v2/4/9/0/f/6/490f6d7cd33219a4671ccf426e5cf1fb77b4a08820a91961cb0ae903.body +0 -0
- .cache/pip/http-v2/4/9/a/6/5/49a65ef51069b1954617f8b76476ce09dc41c9efac53f4d81e1f5cf3 +0 -0
- .cache/pip/http-v2/4/9/a/6/5/49a65ef51069b1954617f8b76476ce09dc41c9efac53f4d81e1f5cf3.body +0 -0
- .cache/pip/http-v2/4/a/7/8/1/4a7814588b6ac1f8145ad3d5ec0e03ad23d92f14a1ce01843a6998d7.body +0 -0
- .cache/pip/http-v2/4/d/2/7/2/4d272e6453941ce8b0a37a02cdb1685fc612c33441fa74691fb40656 +0 -0
- .cache/pip/http-v2/4/d/2/7/2/4d272e6453941ce8b0a37a02cdb1685fc612c33441fa74691fb40656.body +0 -0
- .cache/pip/http-v2/4/d/c/0/7/4dc07ffa7cae87ee16d69571b2c74399b5b61681aa545c7822dd5b40 +0 -0
- .cache/pip/http-v2/4/d/c/0/7/4dc07ffa7cae87ee16d69571b2c74399b5b61681aa545c7822dd5b40.body +0 -0
- .cache/pip/http-v2/4/d/f/a/e/4dfae04f17d427ebc4b6c05d97151b6b499fbc86608df73928edd551 +0 -0
- .cache/pip/http-v2/4/d/f/a/e/4dfae04f17d427ebc4b6c05d97151b6b499fbc86608df73928edd551.body +0 -0
- .cache/pip/http-v2/4/f/d/2/5/4fd254dbd56deb4021e55d22c4b489f6c776c69c316eb7345bc91691 +0 -0
- .cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d.body +155 -0
- .cache/pip/http-v2/5/2/9/d/8/529d899ead0a44e9413c02620d856780368c083eff8bf2466e326011.body +80 -0
- .cache/pip/http-v2/5/6/f/9/d/56f9d9bd534016b34d1660bb01a66bb1704ef80e0f133b683da4f133.body +1655 -0
- .cache/pip/http-v2/5/8/d/9/8/58d9818b2a061ba2b595a1744fd86d4eb017703b38f7209903256e4e +0 -0
- .cache/pip/http-v2/5/9/5/1/1/595119384424f750543e201763b875c3f3e0ff028ba41e4b528b7dca.body +0 -0
- .cache/pip/http-v2/6/0/1/a/a/601aa27698da49f5bed3bc91bb41d8245b8316b66bd86059ef3b929e.body +360 -0
- .cache/pip/http-v2/6/4/6/e/5/646e5ac002367fdec50dea7e9d47599302e4790e77000da2571c33e8 +0 -0
- .cache/pip/http-v2/6/6/6/2/c/6662c3d76e9c2f7783002d2625d92517b2c4b994197bd6d5da887f1e +0 -0
- .cache/pip/http-v2/6/6/e/c/7/66ec76a7b6ed4081044f5c7821af293b63c17bc2ac523ff93d5ca7d5 +0 -0
- .cache/pip/http-v2/8/7/3/3/b/8733b40e52a573d98e55534434c69a8765ca0cd71166704a3188ddb3.body +0 -0
- .cache/pip/http-v2/9/f/e/d/0/9fed0241b6f6a060996284779065d8ed334b4bc0892996ee7a865868 +0 -0
- .cache/pip/http-v2/9/f/e/d/0/9fed0241b6f6a060996284779065d8ed334b4bc0892996ee7a865868.body +54 -0
- .cache/pip/http-v2/a/1/9/5/3/a19537d3cf37c122db841d6fe4cd322bc10d1a558bb00d146b85cb9a +0 -0
- .cache/pip/http-v2/a/6/6/7/4/a6674e44f8dbb270324765d1fb568b86858877aed299a2428f81e802 +0 -0
- .cache/pip/http-v2/a/8/1/3/d/a813d38208b26d1643cfecf26bd5ddeb869c95933e4bf304b8f6f1bb +0 -0
- .cache/pip/http-v2/a/b/7/2/8/ab7286aff652f0ea3cc68322991122267ea675cbb86a9b1ccfe4ace3 +0 -0
- .cache/pip/http-v2/a/b/7/2/8/ab7286aff652f0ea3cc68322991122267ea675cbb86a9b1ccfe4ace3.body +246 -0
.bashrc
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ~/.bashrc: executed by bash(1) for non-login shells.
|
2 |
+
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
3 |
+
# for examples
|
4 |
+
|
5 |
+
# If not running interactively, don't do anything
|
6 |
+
[ -z "$PS1" ] && return
|
7 |
+
|
8 |
+
# don't put duplicate lines in the history. See bash(1) for more options
|
9 |
+
# ... or force ignoredups and ignorespace
|
10 |
+
HISTCONTROL=ignoredups:ignorespace
|
11 |
+
|
12 |
+
# append to the history file, don't overwrite it
|
13 |
+
shopt -s histappend
|
14 |
+
|
15 |
+
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
16 |
+
HISTSIZE=1000
|
17 |
+
HISTFILESIZE=2000
|
18 |
+
|
19 |
+
# check the window size after each command and, if necessary,
|
20 |
+
# update the values of LINES and COLUMNS.
|
21 |
+
shopt -s checkwinsize
|
22 |
+
|
23 |
+
# make less more friendly for non-text input files, see lesspipe(1)
|
24 |
+
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
25 |
+
|
26 |
+
# set variable identifying the chroot you work in (used in the prompt below)
|
27 |
+
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
28 |
+
debian_chroot=$(cat /etc/debian_chroot)
|
29 |
+
fi
|
30 |
+
|
31 |
+
# set a fancy prompt (non-color, unless we know we "want" color)
|
32 |
+
case "$TERM" in
|
33 |
+
xterm-color) color_prompt=yes;;
|
34 |
+
esac
|
35 |
+
|
36 |
+
# uncomment for a colored prompt, if the terminal has the capability; turned
|
37 |
+
# off by default to not distract the user: the focus in a terminal window
|
38 |
+
# should be on the output of commands, not on the prompt
|
39 |
+
#force_color_prompt=yes
|
40 |
+
|
41 |
+
if [ -n "$force_color_prompt" ]; then
|
42 |
+
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
43 |
+
# We have color support; assume it's compliant with Ecma-48
|
44 |
+
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
45 |
+
# a case would tend to support setf rather than setaf.)
|
46 |
+
color_prompt=yes
|
47 |
+
else
|
48 |
+
color_prompt=
|
49 |
+
fi
|
50 |
+
fi
|
51 |
+
|
52 |
+
if [ "$color_prompt" = yes ]; then
|
53 |
+
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
54 |
+
else
|
55 |
+
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
56 |
+
fi
|
57 |
+
unset color_prompt force_color_prompt
|
58 |
+
|
59 |
+
# If this is an xterm set the title to user@host:dir
|
60 |
+
case "$TERM" in
|
61 |
+
xterm*|rxvt*)
|
62 |
+
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
63 |
+
;;
|
64 |
+
*)
|
65 |
+
;;
|
66 |
+
esac
|
67 |
+
|
68 |
+
# enable color support of ls and also add handy aliases
|
69 |
+
if [ -x /usr/bin/dircolors ]; then
|
70 |
+
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
71 |
+
alias ls='ls --color=auto'
|
72 |
+
#alias dir='dir --color=auto'
|
73 |
+
#alias vdir='vdir --color=auto'
|
74 |
+
|
75 |
+
alias grep='grep --color=auto'
|
76 |
+
alias fgrep='fgrep --color=auto'
|
77 |
+
alias egrep='egrep --color=auto'
|
78 |
+
fi
|
79 |
+
|
80 |
+
# some more ls aliases
|
81 |
+
alias ll='ls -alF'
|
82 |
+
alias la='ls -A'
|
83 |
+
alias l='ls -CF'
|
84 |
+
|
85 |
+
# Alias definitions.
|
86 |
+
# You may want to put all your additions into a separate file like
|
87 |
+
# ~/.bash_aliases, instead of adding them here directly.
|
88 |
+
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
89 |
+
|
90 |
+
if [ -f ~/.bash_aliases ]; then
|
91 |
+
. ~/.bash_aliases
|
92 |
+
fi
|
93 |
+
|
94 |
+
# enable programmable completion features (you don't need to enable
|
95 |
+
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
96 |
+
# sources /etc/bash.bashrc).
|
97 |
+
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
98 |
+
# . /etc/bash_completion
|
99 |
+
#fi
|
100 |
+
cat /etc/runpod.txt
|
101 |
+
echo -e "\nFor detailed documentation and guides, please visit:\n\033[1;34mhttps://docs.runpod.io/\033[0m and \033[1;34mhttps://blog.runpod.io/\033[0m\n\n"
|
102 |
+
PATH='/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
|
103 |
+
VAST_CONTAINERLABEL="$(cat ~/.vast_containerlabel)"
|
104 |
+
PS1="\[\e]0;\u@$VAST_CONTAINERLABEL: \w\a\]\[\e[01;34m\]\u\[\e[m\e[01m\]@\[\e[01;36m\]$VAST_CONTAINERLABEL\[\e[m\e[01m\]:\[\e[01;37m\]\w\$\[\e[m\] " ; if [ ! -e "$HOME/.no_auto_tmux" ] && [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ] && [ "$TMUX_STARTED" = "" ]; then tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux; exit; elif ! [[ -z "$TMUX" ]]; then echo 'Welcome to your vast.ai container! This session is running in `tmux`.'; echo 'To disconnect without closing your processes, press ctrl+b, release, then d.'; echo 'To disable auto-tmux, run `touch ~/.no_auto_tmux` and reconnect. See also https://tmuxcheatsheet.com/'; fi;
|
105 |
+
DIRECT_PORT_START=0
|
106 |
+
DIRECT_PORT_END=0
|
107 |
+
VAST_CONTAINERLABEL=C.12733928
|
.cache/pip/http-v2/1/0/e/d/c/10edc2fedb88f9a82f91dc7f8666c74a4e7067dbd945b9923a040482
ADDED
Binary file (1.82 kB). View file
|
|
.cache/pip/http-v2/1/0/e/d/c/10edc2fedb88f9a82f91dc7f8666c74a4e7067dbd945b9923a040482.body
ADDED
Binary file (133 kB). View file
|
|
.cache/pip/http-v2/1/6/9/3/2/1693297fb9daf7bfe370bf51d371acfeb8ff40759bf8650dfd404ba4
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/1/6/9/3/2/1693297fb9daf7bfe370bf51d371acfeb8ff40759bf8650dfd404ba4.body
ADDED
Binary file (273 kB). View file
|
|
.cache/pip/http-v2/1/a/9/9/5/1a995e0685d0b5c5a3f3321cda9ebcbc376a9137828d1c100a493532
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/1/a/9/9/5/1a995e0685d0b5c5a3f3321cda9ebcbc376a9137828d1c100a493532.body
ADDED
Binary file (8.9 kB). View file
|
|
.cache/pip/http-v2/1/d/5/8/0/1d580297aa71908bf0d94823d03615447cfaaf5e778d47640756ae80
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/1/d/5/8/0/1d580297aa71908bf0d94823d03615447cfaaf5e778d47640756ae80.body
ADDED
Binary file (23.7 kB). View file
|
|
.cache/pip/http-v2/1/e/2/b/1/1e2b1734fc3c57a4733131da81a6167573fc77057172172ceee83a22.body
ADDED
Binary file (5.58 kB). View file
|
|
.cache/pip/http-v2/2/1/c/8/b/21c8bac038994bd5727db00d02b53b7ccbc2a8ea142f49d934129bc8
ADDED
Binary file (1.82 kB). View file
|
|
.cache/pip/http-v2/2/1/c/8/b/21c8bac038994bd5727db00d02b53b7ccbc2a8ea142f49d934129bc8.body
ADDED
Binary file (83.7 kB). View file
|
|
.cache/pip/http-v2/2/e/1/8/3/2e183ebf5293bbe308140b02c615ef7366590e4863fcd1adbcaec181
ADDED
Binary file (1.15 kB). View file
|
|
.cache/pip/http-v2/2/e/1/8/3/2e183ebf5293bbe308140b02c615ef7366590e4863fcd1adbcaec181.body
ADDED
Binary file (317 kB). View file
|
|
.cache/pip/http-v2/2/e/2/d/8/2e2d841f57ca6a43dfc96af93374304dda5b757176df2cce7ca2b18d.body
ADDED
Binary file (97.9 kB). View file
|
|
.cache/pip/http-v2/2/e/a/5/8/2ea58cbd4e5eb121ff41bc95c898f06d3d9fb75f92176c76e2872a66
ADDED
Binary file (1.16 kB). View file
|
|
.cache/pip/http-v2/2/e/a/5/8/2ea58cbd4e5eb121ff41bc95c898f06d3d9fb75f92176c76e2872a66.body
ADDED
Binary file (820 kB). View file
|
|
.cache/pip/http-v2/3/8/6/0/e/3860e4de9ae53c79d2fd61419e9049df314ccc8b640782c02c6e2e2d
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/3/f/0/b/5/3f0b530a5c9fab3e5025382bf4f606f0e51cb4c0cd8174857429d8fe.body
ADDED
Binary file (2.66 kB). View file
|
|
.cache/pip/http-v2/4/3/b/5/1/43b51859987aa489fca1045420773685b73ad992551f22d662919ecf
ADDED
Binary file (1.17 kB). View file
|
|
.cache/pip/http-v2/4/3/b/5/1/43b51859987aa489fca1045420773685b73ad992551f22d662919ecf.body
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: jupyter-console
|
3 |
+
Version: 6.6.3
|
4 |
+
Summary: Jupyter terminal console
|
5 |
+
Project-URL: Homepage, https://jupyter.org
|
6 |
+
Author-email: Jupyter Development Team <jupyter@googlegroups.com>
|
7 |
+
License: BSD 3-Clause License
|
8 |
+
|
9 |
+
- Copyright (c) 2001-2015, IPython Development Team
|
10 |
+
- Copyright (c) 2015-, Jupyter Development Team
|
11 |
+
|
12 |
+
All rights reserved.
|
13 |
+
|
14 |
+
Redistribution and use in source and binary forms, with or without
|
15 |
+
modification, are permitted provided that the following conditions are met:
|
16 |
+
|
17 |
+
1. Redistributions of source code must retain the above copyright notice, this
|
18 |
+
list of conditions and the following disclaimer.
|
19 |
+
|
20 |
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
21 |
+
this list of conditions and the following disclaimer in the documentation
|
22 |
+
and/or other materials provided with the distribution.
|
23 |
+
|
24 |
+
3. Neither the name of the copyright holder nor the names of its
|
25 |
+
contributors may be used to endorse or promote products derived from
|
26 |
+
this software without specific prior written permission.
|
27 |
+
|
28 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
29 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
30 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
31 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
32 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
33 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
34 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
35 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
36 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
37 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
38 |
+
License-File: LICENSE
|
39 |
+
Keywords: Interactive,Interpreter,Shell,Web
|
40 |
+
Classifier: Intended Audience :: Developers
|
41 |
+
Classifier: Intended Audience :: Science/Research
|
42 |
+
Classifier: Intended Audience :: System Administrators
|
43 |
+
Classifier: License :: OSI Approved :: BSD License
|
44 |
+
Classifier: Programming Language :: Python
|
45 |
+
Classifier: Programming Language :: Python :: 3
|
46 |
+
Classifier: Programming Language :: Python :: 3.7
|
47 |
+
Classifier: Programming Language :: Python :: 3.8
|
48 |
+
Classifier: Programming Language :: Python :: 3.9
|
49 |
+
Classifier: Programming Language :: Python :: 3.10
|
50 |
+
Classifier: Programming Language :: Python :: 3.11
|
51 |
+
Requires-Python: >=3.7
|
52 |
+
Requires-Dist: ipykernel>=6.14
|
53 |
+
Requires-Dist: ipython
|
54 |
+
Requires-Dist: jupyter-client>=7.0.0
|
55 |
+
Requires-Dist: jupyter-core!=5.0.*,>=4.12
|
56 |
+
Requires-Dist: prompt-toolkit>=3.0.30
|
57 |
+
Requires-Dist: pygments
|
58 |
+
Requires-Dist: pyzmq>=17
|
59 |
+
Requires-Dist: traitlets>=5.4
|
60 |
+
Provides-Extra: test
|
61 |
+
Requires-Dist: flaky; extra == 'test'
|
62 |
+
Requires-Dist: pexpect; extra == 'test'
|
63 |
+
Requires-Dist: pytest; extra == 'test'
|
64 |
+
Description-Content-Type: text/markdown
|
65 |
+
|
66 |
+
# Jupyter Console
|
67 |
+
[![Build Status](https://travis-ci.org/jupyter/jupyter_console.svg?branch=master)](https://travis-ci.org/jupyter/jupyter_console)
|
68 |
+
[![Documentation Status](http://readthedocs.org/projects/jupyter-console/badge/?version=latest)](https://jupyter-console.readthedocs.io/en/latest/?badge=latest)
|
69 |
+
|
70 |
+
A terminal-based console frontend for Jupyter kernels.
|
71 |
+
This code is based on the single-process IPython terminal.
|
72 |
+
|
73 |
+
Install with pip:
|
74 |
+
|
75 |
+
pip install jupyter-console
|
76 |
+
|
77 |
+
Install with conda:
|
78 |
+
|
79 |
+
conda install -c conda-forge jupyter_console
|
80 |
+
|
81 |
+
Start:
|
82 |
+
|
83 |
+
jupyter console
|
84 |
+
|
85 |
+
Help:
|
86 |
+
|
87 |
+
jupyter console -h
|
88 |
+
|
89 |
+
Jupyter Console allows for console-based interaction with non-python
|
90 |
+
Jupyter kernels such as IJulia, IRKernel.
|
91 |
+
|
92 |
+
To start the console with a particular kernel, ask for it by name::
|
93 |
+
|
94 |
+
jupyter console --kernel=julia-0.4
|
95 |
+
|
96 |
+
A list of available kernels can be seen with::
|
97 |
+
|
98 |
+
jupyter kernelspec list
|
99 |
+
|
100 |
+
|
101 |
+
### Release build:
|
102 |
+
|
103 |
+
```bash
|
104 |
+
$ pip install pep517
|
105 |
+
$ python -m pep517.build .
|
106 |
+
```
|
107 |
+
|
108 |
+
|
109 |
+
## Resources
|
110 |
+
- [Project Jupyter website](https://jupyter.org)
|
111 |
+
- [Documentation for Jupyter Console](https://jupyter-console.readthedocs.io/en/latest/) [[PDF](https://media.readthedocs.org/pdf/jupyter-console/latest/jupyter-console.pdf)]
|
112 |
+
- [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html) [[PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf)]
|
113 |
+
- [Issues](https://github.com/jupyter/jupyter_console/issues)
|
114 |
+
- [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter)
|
115 |
+
|
116 |
+
## About the Jupyter Development Team
|
117 |
+
|
118 |
+
The Jupyter Development Team is the set of all contributors to the Jupyter project.
|
119 |
+
This includes all of the Jupyter subprojects.
|
120 |
+
|
121 |
+
The core team that coordinates development on GitHub can be found here:
|
122 |
+
https://github.com/jupyter/.
|
123 |
+
|
124 |
+
## Our Copyright Policy
|
125 |
+
|
126 |
+
Jupyter uses a shared copyright model. Each contributor maintains copyright
|
127 |
+
over their contributions to Jupyter. But, it is important to note that these
|
128 |
+
contributions are typically only changes to the repositories. Thus, the Jupyter
|
129 |
+
source code, in its entirety is not the copyright of any single person or
|
130 |
+
institution. Instead, it is the collective copyright of the entire Jupyter
|
131 |
+
Development Team. If individual contributors want to maintain a record of what
|
132 |
+
changes/contributions they have specific copyright on, they should indicate
|
133 |
+
their copyright in the commit message of the change, when they commit the
|
134 |
+
change to one of the Jupyter repositories.
|
135 |
+
|
136 |
+
With this in mind, the following banner should be used in any source code file
|
137 |
+
to indicate the copyright and license terms:
|
138 |
+
|
139 |
+
```
|
140 |
+
# Copyright (c) Jupyter Development Team.
|
141 |
+
# Distributed under the terms of the Modified BSD License.
|
142 |
+
```
|
.cache/pip/http-v2/4/9/0/f/6/490f6d7cd33219a4671ccf426e5cf1fb77b4a08820a91961cb0ae903
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/4/9/0/f/6/490f6d7cd33219a4671ccf426e5cf1fb77b4a08820a91961cb0ae903.body
ADDED
Binary file (4.31 kB). View file
|
|
.cache/pip/http-v2/4/9/a/6/5/49a65ef51069b1954617f8b76476ce09dc41c9efac53f4d81e1f5cf3
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/4/9/a/6/5/49a65ef51069b1954617f8b76476ce09dc41c9efac53f4d81e1f5cf3.body
ADDED
Binary file (1.19 kB). View file
|
|
.cache/pip/http-v2/4/a/7/8/1/4a7814588b6ac1f8145ad3d5ec0e03ad23d92f14a1ce01843a6998d7.body
ADDED
Binary file (62.7 kB). View file
|
|
.cache/pip/http-v2/4/d/2/7/2/4d272e6453941ce8b0a37a02cdb1685fc612c33441fa74691fb40656
ADDED
Binary file (1.82 kB). View file
|
|
.cache/pip/http-v2/4/d/2/7/2/4d272e6453941ce8b0a37a02cdb1685fc612c33441fa74691fb40656.body
ADDED
Binary file (15.5 kB). View file
|
|
.cache/pip/http-v2/4/d/c/0/7/4dc07ffa7cae87ee16d69571b2c74399b5b61681aa545c7822dd5b40
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/4/d/c/0/7/4dc07ffa7cae87ee16d69571b2c74399b5b61681aa545c7822dd5b40.body
ADDED
Binary file (5.11 kB). View file
|
|
.cache/pip/http-v2/4/d/f/a/e/4dfae04f17d427ebc4b6c05d97151b6b499fbc86608df73928edd551
ADDED
Binary file (1.13 kB). View file
|
|
.cache/pip/http-v2/4/d/f/a/e/4dfae04f17d427ebc4b6c05d97151b6b499fbc86608df73928edd551.body
ADDED
Binary file (311 kB). View file
|
|
.cache/pip/http-v2/4/f/d/2/5/4fd254dbd56deb4021e55d22c4b489f6c776c69c316eb7345bc91691
ADDED
Binary file (1.11 kB). View file
|
|
.cache/pip/http-v2/5/2/4/e/a/524eaa378c5eeff9b07f34d936ce7bc411da078278be84566970502d.body
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: pluggy
|
3 |
+
Version: 1.5.0
|
4 |
+
Summary: plugin and hook calling mechanisms for python
|
5 |
+
Home-page: https://github.com/pytest-dev/pluggy
|
6 |
+
Author: Holger Krekel
|
7 |
+
Author-email: holger@merlinux.eu
|
8 |
+
License: MIT
|
9 |
+
Platform: unix
|
10 |
+
Platform: linux
|
11 |
+
Platform: osx
|
12 |
+
Platform: win32
|
13 |
+
Classifier: Development Status :: 6 - Mature
|
14 |
+
Classifier: Intended Audience :: Developers
|
15 |
+
Classifier: License :: OSI Approved :: MIT License
|
16 |
+
Classifier: Operating System :: POSIX
|
17 |
+
Classifier: Operating System :: Microsoft :: Windows
|
18 |
+
Classifier: Operating System :: MacOS :: MacOS X
|
19 |
+
Classifier: Topic :: Software Development :: Testing
|
20 |
+
Classifier: Topic :: Software Development :: Libraries
|
21 |
+
Classifier: Topic :: Utilities
|
22 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
23 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
24 |
+
Classifier: Programming Language :: Python :: 3
|
25 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
26 |
+
Classifier: Programming Language :: Python :: 3.8
|
27 |
+
Classifier: Programming Language :: Python :: 3.9
|
28 |
+
Classifier: Programming Language :: Python :: 3.10
|
29 |
+
Classifier: Programming Language :: Python :: 3.11
|
30 |
+
Requires-Python: >=3.8
|
31 |
+
Description-Content-Type: text/x-rst
|
32 |
+
License-File: LICENSE
|
33 |
+
Provides-Extra: dev
|
34 |
+
Requires-Dist: pre-commit ; extra == 'dev'
|
35 |
+
Requires-Dist: tox ; extra == 'dev'
|
36 |
+
Provides-Extra: testing
|
37 |
+
Requires-Dist: pytest ; extra == 'testing'
|
38 |
+
Requires-Dist: pytest-benchmark ; extra == 'testing'
|
39 |
+
|
40 |
+
====================================================
|
41 |
+
pluggy - A minimalist production ready plugin system
|
42 |
+
====================================================
|
43 |
+
|
44 |
+
|pypi| |conda-forge| |versions| |github-actions| |gitter| |black| |codecov|
|
45 |
+
|
46 |
+
This is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.
|
47 |
+
|
48 |
+
Please `read the docs`_ to learn more!
|
49 |
+
|
50 |
+
A definitive example
|
51 |
+
====================
|
52 |
+
.. code-block:: python
|
53 |
+
|
54 |
+
import pluggy
|
55 |
+
|
56 |
+
hookspec = pluggy.HookspecMarker("myproject")
|
57 |
+
hookimpl = pluggy.HookimplMarker("myproject")
|
58 |
+
|
59 |
+
|
60 |
+
class MySpec:
|
61 |
+
"""A hook specification namespace."""
|
62 |
+
|
63 |
+
@hookspec
|
64 |
+
def myhook(self, arg1, arg2):
|
65 |
+
"""My special little hook that you can customize."""
|
66 |
+
|
67 |
+
|
68 |
+
class Plugin_1:
|
69 |
+
"""A hook implementation namespace."""
|
70 |
+
|
71 |
+
@hookimpl
|
72 |
+
def myhook(self, arg1, arg2):
|
73 |
+
print("inside Plugin_1.myhook()")
|
74 |
+
return arg1 + arg2
|
75 |
+
|
76 |
+
|
77 |
+
class Plugin_2:
|
78 |
+
"""A 2nd hook implementation namespace."""
|
79 |
+
|
80 |
+
@hookimpl
|
81 |
+
def myhook(self, arg1, arg2):
|
82 |
+
print("inside Plugin_2.myhook()")
|
83 |
+
return arg1 - arg2
|
84 |
+
|
85 |
+
|
86 |
+
# create a manager and add the spec
|
87 |
+
pm = pluggy.PluginManager("myproject")
|
88 |
+
pm.add_hookspecs(MySpec)
|
89 |
+
|
90 |
+
# register plugins
|
91 |
+
pm.register(Plugin_1())
|
92 |
+
pm.register(Plugin_2())
|
93 |
+
|
94 |
+
# call our ``myhook`` hook
|
95 |
+
results = pm.hook.myhook(arg1=1, arg2=2)
|
96 |
+
print(results)
|
97 |
+
|
98 |
+
|
99 |
+
Running this directly gets us::
|
100 |
+
|
101 |
+
$ python docs/examples/toy-example.py
|
102 |
+
inside Plugin_2.myhook()
|
103 |
+
inside Plugin_1.myhook()
|
104 |
+
[-1, 3]
|
105 |
+
|
106 |
+
|
107 |
+
.. badges
|
108 |
+
|
109 |
+
.. |pypi| image:: https://img.shields.io/pypi/v/pluggy.svg
|
110 |
+
:target: https://pypi.org/pypi/pluggy
|
111 |
+
|
112 |
+
.. |versions| image:: https://img.shields.io/pypi/pyversions/pluggy.svg
|
113 |
+
:target: https://pypi.org/pypi/pluggy
|
114 |
+
|
115 |
+
.. |github-actions| image:: https://github.com/pytest-dev/pluggy/workflows/main/badge.svg
|
116 |
+
:target: https://github.com/pytest-dev/pluggy/actions
|
117 |
+
|
118 |
+
.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg
|
119 |
+
:target: https://anaconda.org/conda-forge/pytest
|
120 |
+
|
121 |
+
.. |gitter| image:: https://badges.gitter.im/pytest-dev/pluggy.svg
|
122 |
+
:alt: Join the chat at https://gitter.im/pytest-dev/pluggy
|
123 |
+
:target: https://gitter.im/pytest-dev/pluggy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
124 |
+
|
125 |
+
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
126 |
+
:target: https://github.com/ambv/black
|
127 |
+
|
128 |
+
.. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/master/graph/badge.svg
|
129 |
+
:target: https://codecov.io/gh/pytest-dev/pluggy
|
130 |
+
:alt: Code coverage Status
|
131 |
+
|
132 |
+
.. links
|
133 |
+
.. _pytest:
|
134 |
+
http://pytest.org
|
135 |
+
.. _tox:
|
136 |
+
https://tox.readthedocs.org
|
137 |
+
.. _devpi:
|
138 |
+
http://doc.devpi.net
|
139 |
+
.. _read the docs:
|
140 |
+
https://pluggy.readthedocs.io/en/latest/
|
141 |
+
|
142 |
+
|
143 |
+
Support pluggy
|
144 |
+
--------------
|
145 |
+
|
146 |
+
`Open Collective`_ is an online funding platform for open and transparent communities.
|
147 |
+
It provides tools to raise money and share your finances in full transparency.
|
148 |
+
|
149 |
+
It is the platform of choice for individuals and companies that want to make one-time or
|
150 |
+
monthly donations directly to the project.
|
151 |
+
|
152 |
+
``pluggy`` is part of the ``pytest-dev`` project, see more details in the `pytest collective`_.
|
153 |
+
|
154 |
+
.. _Open Collective: https://opencollective.com
|
155 |
+
.. _pytest collective: https://opencollective.com/pytest
|
.cache/pip/http-v2/5/2/9/d/8/529d899ead0a44e9413c02620d856780368c083eff8bf2466e326011.body
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: iniconfig
|
3 |
+
Version: 2.0.0
|
4 |
+
Summary: brain-dead simple config-ini parsing
|
5 |
+
Project-URL: Homepage, https://github.com/pytest-dev/iniconfig
|
6 |
+
Author-email: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>, Holger Krekel <holger.krekel@gmail.com>
|
7 |
+
License-Expression: MIT
|
8 |
+
License-File: LICENSE
|
9 |
+
Classifier: Development Status :: 4 - Beta
|
10 |
+
Classifier: Intended Audience :: Developers
|
11 |
+
Classifier: License :: OSI Approved :: MIT License
|
12 |
+
Classifier: Operating System :: MacOS :: MacOS X
|
13 |
+
Classifier: Operating System :: Microsoft :: Windows
|
14 |
+
Classifier: Operating System :: POSIX
|
15 |
+
Classifier: Programming Language :: Python :: 3
|
16 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
17 |
+
Classifier: Programming Language :: Python :: 3.7
|
18 |
+
Classifier: Programming Language :: Python :: 3.8
|
19 |
+
Classifier: Programming Language :: Python :: 3.9
|
20 |
+
Classifier: Programming Language :: Python :: 3.10
|
21 |
+
Classifier: Programming Language :: Python :: 3.11
|
22 |
+
Classifier: Topic :: Software Development :: Libraries
|
23 |
+
Classifier: Topic :: Utilities
|
24 |
+
Requires-Python: >=3.7
|
25 |
+
Description-Content-Type: text/x-rst
|
26 |
+
|
27 |
+
iniconfig: brain-dead simple parsing of ini files
|
28 |
+
=======================================================
|
29 |
+
|
30 |
+
iniconfig is a small and simple INI-file parser module
|
31 |
+
having a unique set of features:
|
32 |
+
|
33 |
+
* maintains order of sections and entries
|
34 |
+
* supports multi-line values with or without line-continuations
|
35 |
+
* supports "#" comments everywhere
|
36 |
+
* raises errors with proper line-numbers
|
37 |
+
* no bells and whistles like automatic substitutions
|
38 |
+
* iniconfig raises an Error if two sections have the same name.
|
39 |
+
|
40 |
+
If you encounter issues or have feature wishes please report them to:
|
41 |
+
|
42 |
+
https://github.com/RonnyPfannschmidt/iniconfig/issues
|
43 |
+
|
44 |
+
Basic Example
|
45 |
+
===================================
|
46 |
+
|
47 |
+
If you have an ini file like this:
|
48 |
+
|
49 |
+
.. code-block:: ini
|
50 |
+
|
51 |
+
# content of example.ini
|
52 |
+
[section1] # comment
|
53 |
+
name1=value1 # comment
|
54 |
+
name1b=value1,value2 # comment
|
55 |
+
|
56 |
+
[section2]
|
57 |
+
name2=
|
58 |
+
line1
|
59 |
+
line2
|
60 |
+
|
61 |
+
then you can do:
|
62 |
+
|
63 |
+
.. code-block:: pycon
|
64 |
+
|
65 |
+
>>> import iniconfig
|
66 |
+
>>> ini = iniconfig.IniConfig("example.ini")
|
67 |
+
>>> ini['section1']['name1'] # raises KeyError if not exists
|
68 |
+
'value1'
|
69 |
+
>>> ini.get('section1', 'name1b', [], lambda x: x.split(","))
|
70 |
+
['value1', 'value2']
|
71 |
+
>>> ini.get('section1', 'notexist', [], lambda x: x.split(","))
|
72 |
+
[]
|
73 |
+
>>> [x.name for x in list(ini)]
|
74 |
+
['section1', 'section2']
|
75 |
+
>>> list(list(ini)[0].items())
|
76 |
+
[('name1', 'value1'), ('name1b', 'value1,value2')]
|
77 |
+
>>> 'section1' in ini
|
78 |
+
True
|
79 |
+
>>> 'inexistendsection' in ini
|
80 |
+
False
|
.cache/pip/http-v2/5/6/f/9/d/56f9d9bd534016b34d1660bb01a66bb1704ef80e0f133b683da4f133.body
ADDED
@@ -0,0 +1,1655 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: yarl
|
3 |
+
Version: 1.12.1
|
4 |
+
Summary: Yet another URL library
|
5 |
+
Home-page: https://github.com/aio-libs/yarl
|
6 |
+
Author: Andrew Svetlov
|
7 |
+
Author-email: andrew.svetlov@gmail.com
|
8 |
+
Maintainer: aiohttp team <team@aiohttp.org>
|
9 |
+
Maintainer-email: team@aiohttp.org
|
10 |
+
License: Apache-2.0
|
11 |
+
Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
|
12 |
+
Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
|
13 |
+
Project-URL: CI: GitHub Workflows, https://github.com/aio-libs/yarl/actions?query=branch:master
|
14 |
+
Project-URL: Code of Conduct, https://github.com/aio-libs/.github/blob/master/CODE_OF_CONDUCT.md
|
15 |
+
Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/yarl
|
16 |
+
Project-URL: Docs: Changelog, https://yarl.aio-libs.org/en/latest/changes/
|
17 |
+
Project-URL: Docs: RTD, https://yarl.aio-libs.org
|
18 |
+
Project-URL: GitHub: issues, https://github.com/aio-libs/yarl/issues
|
19 |
+
Project-URL: GitHub: repo, https://github.com/aio-libs/yarl
|
20 |
+
Keywords: cython,cext,yarl
|
21 |
+
Classifier: Development Status :: 5 - Production/Stable
|
22 |
+
Classifier: Intended Audience :: Developers
|
23 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
24 |
+
Classifier: Programming Language :: Cython
|
25 |
+
Classifier: Programming Language :: Python
|
26 |
+
Classifier: Programming Language :: Python :: 3
|
27 |
+
Classifier: Programming Language :: Python :: 3.8
|
28 |
+
Classifier: Programming Language :: Python :: 3.9
|
29 |
+
Classifier: Programming Language :: Python :: 3.10
|
30 |
+
Classifier: Programming Language :: Python :: 3.11
|
31 |
+
Classifier: Programming Language :: Python :: 3.12
|
32 |
+
Classifier: Programming Language :: Python :: 3.13
|
33 |
+
Classifier: Topic :: Internet :: WWW/HTTP
|
34 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
35 |
+
Requires-Python: >=3.8
|
36 |
+
Description-Content-Type: text/x-rst
|
37 |
+
License-File: LICENSE
|
38 |
+
License-File: NOTICE
|
39 |
+
Requires-Dist: idna >=2.0
|
40 |
+
Requires-Dist: multidict >=4.0
|
41 |
+
|
42 |
+
yarl
|
43 |
+
====
|
44 |
+
|
45 |
+
The module provides handy URL class for URL parsing and changing.
|
46 |
+
|
47 |
+
.. image:: https://github.com/aio-libs/yarl/workflows/CI/badge.svg
|
48 |
+
:target: https://github.com/aio-libs/yarl/actions?query=workflow%3ACI
|
49 |
+
:align: right
|
50 |
+
|
51 |
+
.. image:: https://codecov.io/gh/aio-libs/yarl/branch/master/graph/badge.svg
|
52 |
+
:target: https://codecov.io/gh/aio-libs/yarl
|
53 |
+
|
54 |
+
.. image:: https://badge.fury.io/py/yarl.svg
|
55 |
+
:target: https://badge.fury.io/py/yarl
|
56 |
+
|
57 |
+
|
58 |
+
.. image:: https://readthedocs.org/projects/yarl/badge/?version=latest
|
59 |
+
:target: https://yarl.aio-libs.org
|
60 |
+
|
61 |
+
|
62 |
+
.. image:: https://img.shields.io/pypi/pyversions/yarl.svg
|
63 |
+
:target: https://pypi.python.org/pypi/yarl
|
64 |
+
|
65 |
+
.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
66 |
+
:target: https://matrix.to/#/%23aio-libs:matrix.org
|
67 |
+
:alt: Matrix Room — #aio-libs:matrix.org
|
68 |
+
|
69 |
+
.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
70 |
+
:target: https://matrix.to/#/%23aio-libs-space:matrix.org
|
71 |
+
:alt: Matrix Space — #aio-libs-space:matrix.org
|
72 |
+
|
73 |
+
Introduction
|
74 |
+
------------
|
75 |
+
|
76 |
+
Url is constructed from ``str``:
|
77 |
+
|
78 |
+
.. code-block:: pycon
|
79 |
+
|
80 |
+
>>> from yarl import URL
|
81 |
+
>>> url = URL('https://www.python.org/~guido?arg=1#frag')
|
82 |
+
>>> url
|
83 |
+
URL('https://www.python.org/~guido?arg=1#frag')
|
84 |
+
|
85 |
+
All url parts: *scheme*, *user*, *password*, *host*, *port*, *path*,
|
86 |
+
*query* and *fragment* are accessible by properties:
|
87 |
+
|
88 |
+
.. code-block:: pycon
|
89 |
+
|
90 |
+
>>> url.scheme
|
91 |
+
'https'
|
92 |
+
>>> url.host
|
93 |
+
'www.python.org'
|
94 |
+
>>> url.path
|
95 |
+
'/~guido'
|
96 |
+
>>> url.query_string
|
97 |
+
'arg=1'
|
98 |
+
>>> url.query
|
99 |
+
<MultiDictProxy('arg': '1')>
|
100 |
+
>>> url.fragment
|
101 |
+
'frag'
|
102 |
+
|
103 |
+
All url manipulations produce a new url object:
|
104 |
+
|
105 |
+
.. code-block:: pycon
|
106 |
+
|
107 |
+
>>> url = URL('https://www.python.org')
|
108 |
+
>>> url / 'foo' / 'bar'
|
109 |
+
URL('https://www.python.org/foo/bar')
|
110 |
+
>>> url / 'foo' % {'bar': 'baz'}
|
111 |
+
URL('https://www.python.org/foo?bar=baz')
|
112 |
+
|
113 |
+
Strings passed to constructor and modification methods are
|
114 |
+
automatically encoded giving canonical representation as result:
|
115 |
+
|
116 |
+
.. code-block:: pycon
|
117 |
+
|
118 |
+
>>> url = URL('https://www.python.org/шлях')
|
119 |
+
>>> url
|
120 |
+
URL('https://www.python.org/%D1%88%D0%BB%D1%8F%D1%85')
|
121 |
+
|
122 |
+
Regular properties are *percent-decoded*, use ``raw_`` versions for
|
123 |
+
getting *encoded* strings:
|
124 |
+
|
125 |
+
.. code-block:: pycon
|
126 |
+
|
127 |
+
>>> url.path
|
128 |
+
'/шлях'
|
129 |
+
|
130 |
+
>>> url.raw_path
|
131 |
+
'/%D1%88%D0%BB%D1%8F%D1%85'
|
132 |
+
|
133 |
+
Human readable representation of URL is available as ``.human_repr()``:
|
134 |
+
|
135 |
+
.. code-block:: pycon
|
136 |
+
|
137 |
+
>>> url.human_repr()
|
138 |
+
'https://www.python.org/шлях'
|
139 |
+
|
140 |
+
For full documentation please read https://yarl.aio-libs.org.
|
141 |
+
|
142 |
+
|
143 |
+
Installation
|
144 |
+
------------
|
145 |
+
|
146 |
+
::
|
147 |
+
|
148 |
+
$ pip install yarl
|
149 |
+
|
150 |
+
The library is Python 3 only!
|
151 |
+
|
152 |
+
PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install
|
153 |
+
``yarl`` on another operating system (like *Alpine Linux*, which is not
|
154 |
+
manylinux-compliant because of the missing glibc and therefore, cannot be
|
155 |
+
used with our wheels) the the tarball will be used to compile the library from
|
156 |
+
the source code. It requires a C compiler and and Python headers installed.
|
157 |
+
|
158 |
+
To skip the compilation you must explicitly opt-in by using a PEP 517
|
159 |
+
configuration setting ``pure-python``, or setting the ``YARL_NO_EXTENSIONS``
|
160 |
+
environment variable to a non-empty value, e.g.:
|
161 |
+
|
162 |
+
.. code-block:: console
|
163 |
+
|
164 |
+
$ pip install yarl --config-settings=pure-python=false
|
165 |
+
|
166 |
+
Please note that the pure-Python (uncompiled) version is much slower. However,
|
167 |
+
PyPy always uses a pure-Python implementation, and, as such, it is unaffected
|
168 |
+
by this variable.
|
169 |
+
|
170 |
+
Dependencies
|
171 |
+
------------
|
172 |
+
|
173 |
+
YARL requires multidict_ library.
|
174 |
+
|
175 |
+
|
176 |
+
API documentation
|
177 |
+
------------------
|
178 |
+
|
179 |
+
The documentation is located at https://yarl.aio-libs.org.
|
180 |
+
|
181 |
+
|
182 |
+
Why isn't boolean supported by the URL query API?
|
183 |
+
-------------------------------------------------
|
184 |
+
|
185 |
+
There is no standard for boolean representation of boolean values.
|
186 |
+
|
187 |
+
Some systems prefer ``true``/``false``, others like ``yes``/``no``, ``on``/``off``,
|
188 |
+
``Y``/``N``, ``1``/``0``, etc.
|
189 |
+
|
190 |
+
``yarl`` cannot make an unambiguous decision on how to serialize ``bool`` values because
|
191 |
+
it is specific to how the end-user's application is built and would be different for
|
192 |
+
different apps. The library doesn't accept booleans in the API; a user should convert
|
193 |
+
bools into strings using own preferred translation protocol.
|
194 |
+
|
195 |
+
|
196 |
+
Comparison with other URL libraries
|
197 |
+
------------------------------------
|
198 |
+
|
199 |
+
* furl (https://pypi.python.org/pypi/furl)
|
200 |
+
|
201 |
+
The library has rich functionality but the ``furl`` object is mutable.
|
202 |
+
|
203 |
+
I'm afraid to pass this object into foreign code: who knows if the
|
204 |
+
code will modify my url in a terrible way while I just want to send URL
|
205 |
+
with handy helpers for accessing URL properties.
|
206 |
+
|
207 |
+
``furl`` has other non-obvious tricky things but the main objection
|
208 |
+
is mutability.
|
209 |
+
|
210 |
+
* URLObject (https://pypi.python.org/pypi/URLObject)
|
211 |
+
|
212 |
+
URLObject is immutable, that's pretty good.
|
213 |
+
|
214 |
+
Every URL change generates a new URL object.
|
215 |
+
|
216 |
+
But the library doesn't do any decode/encode transformations leaving the
|
217 |
+
end user to cope with these gory details.
|
218 |
+
|
219 |
+
|
220 |
+
Source code
|
221 |
+
-----------
|
222 |
+
|
223 |
+
The project is hosted on GitHub_
|
224 |
+
|
225 |
+
Please file an issue on the `bug tracker
|
226 |
+
<https://github.com/aio-libs/yarl/issues>`_ if you have found a bug
|
227 |
+
or have some suggestion in order to improve the library.
|
228 |
+
|
229 |
+
Discussion list
|
230 |
+
---------------
|
231 |
+
|
232 |
+
*aio-libs* google group: https://groups.google.com/forum/#!forum/aio-libs
|
233 |
+
|
234 |
+
Feel free to post your questions and ideas here.
|
235 |
+
|
236 |
+
|
237 |
+
Authors and License
|
238 |
+
-------------------
|
239 |
+
|
240 |
+
The ``yarl`` package is written by Andrew Svetlov.
|
241 |
+
|
242 |
+
It's *Apache 2* licensed and freely available.
|
243 |
+
|
244 |
+
|
245 |
+
.. _GitHub: https://github.com/aio-libs/yarl
|
246 |
+
|
247 |
+
.. _multidict: https://github.com/aio-libs/multidict
|
248 |
+
|
249 |
+
=========
|
250 |
+
Changelog
|
251 |
+
=========
|
252 |
+
|
253 |
+
..
|
254 |
+
You should *NOT* be adding new change log entries to this file, this
|
255 |
+
file is managed by towncrier. You *may* edit previous change logs to
|
256 |
+
fix problems like typo corrections or such.
|
257 |
+
To add a new change log entry, please see
|
258 |
+
https://pip.pypa.io/en/latest/development/#adding-a-news-entry
|
259 |
+
we named the news folder "changes".
|
260 |
+
|
261 |
+
WARNING: Don't drop the next directive!
|
262 |
+
|
263 |
+
.. towncrier release notes start
|
264 |
+
|
265 |
+
1.12.1
|
266 |
+
======
|
267 |
+
|
268 |
+
*(2024-09-23)*
|
269 |
+
|
270 |
+
|
271 |
+
No significant changes.
|
272 |
+
|
273 |
+
|
274 |
+
----
|
275 |
+
|
276 |
+
|
277 |
+
1.12.0
|
278 |
+
======
|
279 |
+
|
280 |
+
*(2024-09-23)*
|
281 |
+
|
282 |
+
|
283 |
+
Features
|
284 |
+
--------
|
285 |
+
|
286 |
+
- Added ``~yarl.URL.path_safe`` to be able to fetch the path without ``%2F`` and ``%25`` decoded -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
287 |
+
|
288 |
+
*Related issues and pull requests on GitHub:*
|
289 |
+
`#1150 <https://github.com/aio-libs/yarl/issues/1150>`__.
|
290 |
+
|
291 |
+
|
292 |
+
Removals and backward incompatible breaking changes
|
293 |
+
---------------------------------------------------
|
294 |
+
|
295 |
+
- Restore decoding ``%2F`` (``/``) in ``URL.path`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
296 |
+
|
297 |
+
This change restored the behavior before `#1057 <https://github.com/aio-libs/yarl/issues/1057>`__.
|
298 |
+
|
299 |
+
*Related issues and pull requests on GitHub:*
|
300 |
+
`#1151 <https://github.com/aio-libs/yarl/issues/1151>`__.
|
301 |
+
|
302 |
+
|
303 |
+
Miscellaneous internal changes
|
304 |
+
------------------------------
|
305 |
+
|
306 |
+
- Improved performance of processing paths -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
307 |
+
|
308 |
+
*Related issues and pull requests on GitHub:*
|
309 |
+
`#1143 <https://github.com/aio-libs/yarl/issues/1143>`__.
|
310 |
+
|
311 |
+
|
312 |
+
----
|
313 |
+
|
314 |
+
|
315 |
+
1.11.1
|
316 |
+
======
|
317 |
+
|
318 |
+
*(2024-09-09)*
|
319 |
+
|
320 |
+
|
321 |
+
Bug fixes
|
322 |
+
---------
|
323 |
+
|
324 |
+
- Allowed scheme replacement for relative URLs if the scheme does not require a host -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
325 |
+
|
326 |
+
*Related issues and pull requests on GitHub:*
|
327 |
+
`#280 <https://github.com/aio-libs/yarl/issues/280>`__, `#1138 <https://github.com/aio-libs/yarl/issues/1138>`__.
|
328 |
+
|
329 |
+
- Allowed empty host for URL schemes other than the special schemes listed in the WHATWG URL spec -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
330 |
+
|
331 |
+
*Related issues and pull requests on GitHub:*
|
332 |
+
`#1136 <https://github.com/aio-libs/yarl/issues/1136>`__.
|
333 |
+
|
334 |
+
|
335 |
+
Features
|
336 |
+
--------
|
337 |
+
|
338 |
+
- Loosened restriction on integers as query string values to allow classes that implement ``__int__`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
339 |
+
|
340 |
+
*Related issues and pull requests on GitHub:*
|
341 |
+
`#1139 <https://github.com/aio-libs/yarl/issues/1139>`__.
|
342 |
+
|
343 |
+
|
344 |
+
Miscellaneous internal changes
|
345 |
+
------------------------------
|
346 |
+
|
347 |
+
- Improved performance of normalizing paths -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
348 |
+
|
349 |
+
*Related issues and pull requests on GitHub:*
|
350 |
+
`#1137 <https://github.com/aio-libs/yarl/issues/1137>`__.
|
351 |
+
|
352 |
+
|
353 |
+
----
|
354 |
+
|
355 |
+
|
356 |
+
1.11.0
|
357 |
+
======
|
358 |
+
|
359 |
+
*(2024-09-08)*
|
360 |
+
|
361 |
+
|
362 |
+
Features
|
363 |
+
--------
|
364 |
+
|
365 |
+
- Added ``URL.extend_query()()`` method, which can be used to extend parameters without replacing same named keys -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
366 |
+
|
367 |
+
This method was primarily added to replace the inefficient hand rolled method currently used in ``aiohttp``.
|
368 |
+
|
369 |
+
*Related issues and pull requests on GitHub:*
|
370 |
+
`#1128 <https://github.com/aio-libs/yarl/issues/1128>`__.
|
371 |
+
|
372 |
+
|
373 |
+
Miscellaneous internal changes
|
374 |
+
------------------------------
|
375 |
+
|
376 |
+
- Improved performance of the Cython ``cached_property`` implementation -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
377 |
+
|
378 |
+
*Related issues and pull requests on GitHub:*
|
379 |
+
`#1122 <https://github.com/aio-libs/yarl/issues/1122>`__.
|
380 |
+
|
381 |
+
- Simplified computing ports by removing unnecessary code -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
382 |
+
|
383 |
+
*Related issues and pull requests on GitHub:*
|
384 |
+
`#1123 <https://github.com/aio-libs/yarl/issues/1123>`__.
|
385 |
+
|
386 |
+
- Improved performance of encoding non IPv6 hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
387 |
+
|
388 |
+
*Related issues and pull requests on GitHub:*
|
389 |
+
`#1125 <https://github.com/aio-libs/yarl/issues/1125>`__.
|
390 |
+
|
391 |
+
- Improved performance of ``URL.build()()`` when the path, query string, or fragment is an empty string -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
392 |
+
|
393 |
+
*Related issues and pull requests on GitHub:*
|
394 |
+
`#1126 <https://github.com/aio-libs/yarl/issues/1126>`__.
|
395 |
+
|
396 |
+
- Improved performance of the ``URL.update_query()()`` method -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
397 |
+
|
398 |
+
*Related issues and pull requests on GitHub:*
|
399 |
+
`#1130 <https://github.com/aio-libs/yarl/issues/1130>`__.
|
400 |
+
|
401 |
+
- Improved performance of processing query string changes when arguments are ``str`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
402 |
+
|
403 |
+
*Related issues and pull requests on GitHub:*
|
404 |
+
`#1131 <https://github.com/aio-libs/yarl/issues/1131>`__.
|
405 |
+
|
406 |
+
|
407 |
+
----
|
408 |
+
|
409 |
+
|
410 |
+
1.10.0
|
411 |
+
======
|
412 |
+
|
413 |
+
*(2024-09-06)*
|
414 |
+
|
415 |
+
|
416 |
+
Bug fixes
|
417 |
+
---------
|
418 |
+
|
419 |
+
- Fixed joining a path when the existing path was empty -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
420 |
+
|
421 |
+
A regression in ``URL.join()()`` was introduced in `#1082 <https://github.com/aio-libs/yarl/issues/1082>`__.
|
422 |
+
|
423 |
+
*Related issues and pull requests on GitHub:*
|
424 |
+
`#1118 <https://github.com/aio-libs/yarl/issues/1118>`__.
|
425 |
+
|
426 |
+
|
427 |
+
Features
|
428 |
+
--------
|
429 |
+
|
430 |
+
- Added ``URL.without_query_params()()`` method, to drop some parameters from query string -- by `@hongquan <https://github.com/sponsors/hongquan>`__.
|
431 |
+
|
432 |
+
*Related issues and pull requests on GitHub:*
|
433 |
+
`#774 <https://github.com/aio-libs/yarl/issues/774>`__, `#898 <https://github.com/aio-libs/yarl/issues/898>`__, `#1010 <https://github.com/aio-libs/yarl/issues/1010>`__.
|
434 |
+
|
435 |
+
- The previously protected types ``_SimpleQuery``, ``_QueryVariable``, and ``_Query`` are now available for use externally as ``SimpleQuery``, ``QueryVariable``, and ``Query`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
436 |
+
|
437 |
+
*Related issues and pull requests on GitHub:*
|
438 |
+
`#1050 <https://github.com/aio-libs/yarl/issues/1050>`__, `#1113 <https://github.com/aio-libs/yarl/issues/1113>`__.
|
439 |
+
|
440 |
+
|
441 |
+
Contributor-facing changes
|
442 |
+
--------------------------
|
443 |
+
|
444 |
+
- Replaced all ``~typing.Optional`` with ``~typing.Union`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
445 |
+
|
446 |
+
*Related issues and pull requests on GitHub:*
|
447 |
+
`#1095 <https://github.com/aio-libs/yarl/issues/1095>`__.
|
448 |
+
|
449 |
+
|
450 |
+
Miscellaneous internal changes
|
451 |
+
------------------------------
|
452 |
+
|
453 |
+
- Significantly improved performance of parsing the network location -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
454 |
+
|
455 |
+
*Related issues and pull requests on GitHub:*
|
456 |
+
`#1112 <https://github.com/aio-libs/yarl/issues/1112>`__.
|
457 |
+
|
458 |
+
- Added internal types to the cache to prevent future refactoring errors -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
459 |
+
|
460 |
+
*Related issues and pull requests on GitHub:*
|
461 |
+
`#1117 <https://github.com/aio-libs/yarl/issues/1117>`__.
|
462 |
+
|
463 |
+
|
464 |
+
----
|
465 |
+
|
466 |
+
|
467 |
+
1.9.11
|
468 |
+
======
|
469 |
+
|
470 |
+
*(2024-09-04)*
|
471 |
+
|
472 |
+
|
473 |
+
Bug fixes
|
474 |
+
---------
|
475 |
+
|
476 |
+
- Fixed a ``TypeError`` with ``MultiDictProxy`` and Python 3.8 -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
477 |
+
|
478 |
+
*Related issues and pull requests on GitHub:*
|
479 |
+
`#1084 <https://github.com/aio-libs/yarl/issues/1084>`__, `#1105 <https://github.com/aio-libs/yarl/issues/1105>`__, `#1107 <https://github.com/aio-libs/yarl/issues/1107>`__.
|
480 |
+
|
481 |
+
|
482 |
+
Miscellaneous internal changes
|
483 |
+
------------------------------
|
484 |
+
|
485 |
+
- Improved performance of encoding hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
486 |
+
|
487 |
+
Previously, the library would unconditionally try to parse a host as an IP Address. The library now avoids trying to parse a host as an IP Address if the string is not in one of the formats described in ``3986#section-3.2.2``.
|
488 |
+
|
489 |
+
*Related issues and pull requests on GitHub:*
|
490 |
+
`#1104 <https://github.com/aio-libs/yarl/issues/1104>`__.
|
491 |
+
|
492 |
+
|
493 |
+
----
|
494 |
+
|
495 |
+
|
496 |
+
1.9.10
|
497 |
+
======
|
498 |
+
|
499 |
+
*(2024-09-04)*
|
500 |
+
|
501 |
+
|
502 |
+
Bug fixes
|
503 |
+
---------
|
504 |
+
|
505 |
+
- ``URL.join()()`` has been changed to match
|
506 |
+
``3986`` and align with
|
507 |
+
``/ operation()`` and ``URL.joinpath()()``
|
508 |
+
when joining URLs with empty segments.
|
509 |
+
Previously ``urllib.parse.urljoin`` was used,
|
510 |
+
which has known issues with empty segments
|
511 |
+
(`python/cpython#84774 <https://github.com/python/cpython/issues/84774>`_).
|
512 |
+
|
513 |
+
Due to the semantics of ``URL.join()()``, joining an
|
514 |
+
URL with scheme requires making it relative, prefixing with ``./``.
|
515 |
+
|
516 |
+
.. code-block:: pycon
|
517 |
+
|
518 |
+
>>> URL("https://web.archive.org/web/").join(URL("./https://github.com/aio-libs/yarl"))
|
519 |
+
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
|
520 |
+
|
521 |
+
|
522 |
+
Empty segments are honored in the base as well as the joined part.
|
523 |
+
|
524 |
+
.. code-block:: pycon
|
525 |
+
|
526 |
+
>>> URL("https://web.archive.org/web/https://").join(URL("github.com/aio-libs/yarl"))
|
527 |
+
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
|
528 |
+
|
529 |
+
|
530 |
+
|
531 |
+
-- by `@commonism <https://github.com/sponsors/commonism>`__
|
532 |
+
|
533 |
+
This change initially appeared in 1.9.5 but was reverted in 1.9.6 to resolve a problem with query string handling.
|
534 |
+
|
535 |
+
*Related issues and pull requests on GitHub:*
|
536 |
+
`#1039 <https://github.com/aio-libs/yarl/issues/1039>`__, `#1082 <https://github.com/aio-libs/yarl/issues/1082>`__.
|
537 |
+
|
538 |
+
|
539 |
+
Features
|
540 |
+
--------
|
541 |
+
|
542 |
+
- Added ``~yarl.URL.absolute`` which is now preferred over ``URL.is_absolute()`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
543 |
+
|
544 |
+
*Related issues and pull requests on GitHub:*
|
545 |
+
`#1100 <https://github.com/aio-libs/yarl/issues/1100>`__.
|
546 |
+
|
547 |
+
|
548 |
+
----
|
549 |
+
|
550 |
+
|
551 |
+
1.9.9
|
552 |
+
=====
|
553 |
+
|
554 |
+
*(2024-09-04)*
|
555 |
+
|
556 |
+
|
557 |
+
Bug fixes
|
558 |
+
---------
|
559 |
+
|
560 |
+
- Added missing type on ``~yarl.URL.port`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
561 |
+
|
562 |
+
*Related issues and pull requests on GitHub:*
|
563 |
+
`#1097 <https://github.com/aio-libs/yarl/issues/1097>`__.
|
564 |
+
|
565 |
+
|
566 |
+
----
|
567 |
+
|
568 |
+
|
569 |
+
1.9.8
|
570 |
+
=====
|
571 |
+
|
572 |
+
*(2024-09-03)*
|
573 |
+
|
574 |
+
|
575 |
+
Features
|
576 |
+
--------
|
577 |
+
|
578 |
+
- Covered the ``~yarl.URL`` object with types -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
579 |
+
|
580 |
+
*Related issues and pull requests on GitHub:*
|
581 |
+
`#1084 <https://github.com/aio-libs/yarl/issues/1084>`__.
|
582 |
+
|
583 |
+
- Cache parsing of IP Addresses when encoding hosts -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
584 |
+
|
585 |
+
*Related issues and pull requests on GitHub:*
|
586 |
+
`#1086 <https://github.com/aio-libs/yarl/issues/1086>`__.
|
587 |
+
|
588 |
+
|
589 |
+
Contributor-facing changes
|
590 |
+
--------------------------
|
591 |
+
|
592 |
+
- Covered the ``~yarl.URL`` object with types -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
593 |
+
|
594 |
+
*Related issues and pull requests on GitHub:*
|
595 |
+
`#1084 <https://github.com/aio-libs/yarl/issues/1084>`__.
|
596 |
+
|
597 |
+
|
598 |
+
Miscellaneous internal changes
|
599 |
+
------------------------------
|
600 |
+
|
601 |
+
- Improved performance of handling ports -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
602 |
+
|
603 |
+
*Related issues and pull requests on GitHub:*
|
604 |
+
`#1081 <https://github.com/aio-libs/yarl/issues/1081>`__.
|
605 |
+
|
606 |
+
|
607 |
+
----
|
608 |
+
|
609 |
+
|
610 |
+
1.9.7
|
611 |
+
=====
|
612 |
+
|
613 |
+
*(2024-09-01)*
|
614 |
+
|
615 |
+
|
616 |
+
Removals and backward incompatible breaking changes
|
617 |
+
---------------------------------------------------
|
618 |
+
|
619 |
+
- Removed support ``3986#section-3.2.3`` port normalization when the scheme is not one of ``http``, ``https``, ``wss``, or ``ws`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
620 |
+
|
621 |
+
Support for port normalization was recently added in `#1033 <https://github.com/aio-libs/yarl/issues/1033>`__ and contained code that would do blocking I/O if the scheme was not one of the four listed above. The code has been removed because this library is intended to be safe for usage with ``asyncio``.
|
622 |
+
|
623 |
+
*Related issues and pull requests on GitHub:*
|
624 |
+
`#1076 <https://github.com/aio-libs/yarl/issues/1076>`__.
|
625 |
+
|
626 |
+
|
627 |
+
Miscellaneous internal changes
|
628 |
+
------------------------------
|
629 |
+
|
630 |
+
- Improved performance of property caching -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
631 |
+
|
632 |
+
The ``reify`` implementation from ``aiohttp`` was adapted to replace the internal ``cached_property`` implementation.
|
633 |
+
|
634 |
+
*Related issues and pull requests on GitHub:*
|
635 |
+
`#1070 <https://github.com/aio-libs/yarl/issues/1070>`__.
|
636 |
+
|
637 |
+
|
638 |
+
----
|
639 |
+
|
640 |
+
|
641 |
+
1.9.6
|
642 |
+
=====
|
643 |
+
|
644 |
+
*(2024-08-30)*
|
645 |
+
|
646 |
+
|
647 |
+
Bug fixes
|
648 |
+
---------
|
649 |
+
|
650 |
+
- Reverted ``3986`` compatible ``URL.join()()`` honoring empty segments which was introduced in `#1039 <https://github.com/aio-libs/yarl/issues/1039>`__.
|
651 |
+
|
652 |
+
This change introduced a regression handling query string parameters with joined URLs. The change was reverted to maintain compatibility with the previous behavior.
|
653 |
+
|
654 |
+
*Related issues and pull requests on GitHub:*
|
655 |
+
`#1067 <https://github.com/aio-libs/yarl/issues/1067>`__.
|
656 |
+
|
657 |
+
|
658 |
+
----
|
659 |
+
|
660 |
+
|
661 |
+
1.9.5
|
662 |
+
=====
|
663 |
+
|
664 |
+
*(2024-08-30)*
|
665 |
+
|
666 |
+
|
667 |
+
Bug fixes
|
668 |
+
---------
|
669 |
+
|
670 |
+
- Joining URLs with empty segments has been changed
|
671 |
+
to match ``3986``.
|
672 |
+
|
673 |
+
Previously empty segments would be removed from path,
|
674 |
+
breaking use-cases such as
|
675 |
+
|
676 |
+
.. code-block:: python
|
677 |
+
|
678 |
+
URL("https://web.archive.org/web/") / "https://github.com/"
|
679 |
+
|
680 |
+
Now ``/ operation()`` and ``URL.joinpath()()``
|
681 |
+
keep empty segments, but do not introduce new empty segments.
|
682 |
+
e.g.
|
683 |
+
|
684 |
+
.. code-block:: python
|
685 |
+
|
686 |
+
URL("https://example.org/") / ""
|
687 |
+
|
688 |
+
does not introduce an empty segment.
|
689 |
+
|
690 |
+
-- by `@commonism <https://github.com/sponsors/commonism>`__ and `@youtux <https://github.com/sponsors/youtux>`__
|
691 |
+
|
692 |
+
*Related issues and pull requests on GitHub:*
|
693 |
+
`#1026 <https://github.com/aio-libs/yarl/issues/1026>`__.
|
694 |
+
|
695 |
+
- The default protocol ports of well-known URI schemes are now taken into account
|
696 |
+
during the normalization of the URL string representation in accordance with
|
697 |
+
``3986#section-3.2.3``.
|
698 |
+
|
699 |
+
Specified ports are removed from the ``str`` representation of a ``~yarl.URL``
|
700 |
+
if the port matches the scheme's default port -- by `@commonism <https://github.com/sponsors/commonism>`__.
|
701 |
+
|
702 |
+
*Related issues and pull requests on GitHub:*
|
703 |
+
`#1033 <https://github.com/aio-libs/yarl/issues/1033>`__.
|
704 |
+
|
705 |
+
- ``URL.join()()`` has been changed to match
|
706 |
+
``3986`` and align with
|
707 |
+
``/ operation()`` and ``URL.joinpath()()``
|
708 |
+
when joining URLs with empty segments.
|
709 |
+
Previously ``urllib.parse.urljoin`` was used,
|
710 |
+
which has known issues with empty segments
|
711 |
+
(`python/cpython#84774 <https://github.com/python/cpython/issues/84774>`_).
|
712 |
+
|
713 |
+
Due to the semantics of ``URL.join()()``, joining an
|
714 |
+
URL with scheme requires making it relative, prefixing with ``./``.
|
715 |
+
|
716 |
+
.. code-block:: pycon
|
717 |
+
|
718 |
+
>>> URL("https://web.archive.org/web/").join(URL("./https://github.com/aio-libs/yarl"))
|
719 |
+
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
|
720 |
+
|
721 |
+
|
722 |
+
Empty segments are honored in the base as well as the joined part.
|
723 |
+
|
724 |
+
.. code-block:: pycon
|
725 |
+
|
726 |
+
>>> URL("https://web.archive.org/web/https://").join(URL("github.com/aio-libs/yarl"))
|
727 |
+
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
|
728 |
+
|
729 |
+
|
730 |
+
|
731 |
+
-- by `@commonism <https://github.com/sponsors/commonism>`__
|
732 |
+
|
733 |
+
*Related issues and pull requests on GitHub:*
|
734 |
+
`#1039 <https://github.com/aio-libs/yarl/issues/1039>`__.
|
735 |
+
|
736 |
+
|
737 |
+
Removals and backward incompatible breaking changes
|
738 |
+
---------------------------------------------------
|
739 |
+
|
740 |
+
- Stopped decoding ``%2F`` (``/``) in ``URL.path``, as this could lead to code incorrectly treating it as a path separator
|
741 |
+
-- by `@Dreamsorcerer <https://github.com/sponsors/Dreamsorcerer>`__.
|
742 |
+
|
743 |
+
*Related issues and pull requests on GitHub:*
|
744 |
+
`#1057 <https://github.com/aio-libs/yarl/issues/1057>`__.
|
745 |
+
|
746 |
+
- Dropped support for Python 3.7 -- by `@Dreamsorcerer <https://github.com/sponsors/Dreamsorcerer>`__.
|
747 |
+
|
748 |
+
*Related issues and pull requests on GitHub:*
|
749 |
+
`#1016 <https://github.com/aio-libs/yarl/issues/1016>`__.
|
750 |
+
|
751 |
+
|
752 |
+
Improved documentation
|
753 |
+
----------------------
|
754 |
+
|
755 |
+
- On the ``Contributing docs`` page,
|
756 |
+
a link to the ``Towncrier philosophy`` has been fixed.
|
757 |
+
|
758 |
+
*Related issues and pull requests on GitHub:*
|
759 |
+
`#981 <https://github.com/aio-libs/yarl/issues/981>`__.
|
760 |
+
|
761 |
+
- The pre-existing ``/ magic method()``
|
762 |
+
has been documented in the API reference -- by `@commonism <https://github.com/sponsors/commonism>`__.
|
763 |
+
|
764 |
+
*Related issues and pull requests on GitHub:*
|
765 |
+
`#1026 <https://github.com/aio-libs/yarl/issues/1026>`__.
|
766 |
+
|
767 |
+
|
768 |
+
Packaging updates and notes for downstreams
|
769 |
+
-------------------------------------------
|
770 |
+
|
771 |
+
- A flaw in the logic for copying the project directory into a
|
772 |
+
temporary folder that led to infinite recursion when ``TMPDIR``
|
773 |
+
was set to a project subdirectory path. This was happening in Fedora
|
774 |
+
and its downstream due to the use of `pyproject-rpm-macros
|
775 |
+
<https://src.fedoraproject.org/rpms/pyproject-rpm-macros>`__. It was
|
776 |
+
only reproducible with ``pip wheel`` and was not affecting the
|
777 |
+
``pyproject-build`` users.
|
778 |
+
|
779 |
+
-- by `@hroncok <https://github.com/sponsors/hroncok>`__ and `@webknjaz <https://github.com/sponsors/webknjaz>`__
|
780 |
+
|
781 |
+
*Related issues and pull requests on GitHub:*
|
782 |
+
`#992 <https://github.com/aio-libs/yarl/issues/992>`__, `#1014 <https://github.com/aio-libs/yarl/issues/1014>`__.
|
783 |
+
|
784 |
+
- Support Python 3.13 and publish non-free-threaded wheels
|
785 |
+
|
786 |
+
*Related issues and pull requests on GitHub:*
|
787 |
+
`#1054 <https://github.com/aio-libs/yarl/issues/1054>`__.
|
788 |
+
|
789 |
+
|
790 |
+
Contributor-facing changes
|
791 |
+
--------------------------
|
792 |
+
|
793 |
+
- The CI/CD setup has been updated to test ``arm64`` wheels
|
794 |
+
under macOS 14, except for Python 3.7 that is unsupported
|
795 |
+
in that environment -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
796 |
+
|
797 |
+
*Related issues and pull requests on GitHub:*
|
798 |
+
`#1015 <https://github.com/aio-libs/yarl/issues/1015>`__.
|
799 |
+
|
800 |
+
- Removed unused type ignores and casts -- by `@hauntsaninja <https://github.com/sponsors/hauntsaninja>`__.
|
801 |
+
|
802 |
+
*Related issues and pull requests on GitHub:*
|
803 |
+
`#1031 <https://github.com/aio-libs/yarl/issues/1031>`__.
|
804 |
+
|
805 |
+
|
806 |
+
Miscellaneous internal changes
|
807 |
+
------------------------------
|
808 |
+
|
809 |
+
- ``port``, ``scheme``, and ``raw_host`` are now ``cached_property`` -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
|
810 |
+
|
811 |
+
``aiohttp`` accesses these properties quite often, which cause ``urllib`` to build the ``_hostinfo`` property every time. ``port``, ``scheme``, and ``raw_host`` are now cached properties, which will improve performance.
|
812 |
+
|
813 |
+
*Related issues and pull requests on GitHub:*
|
814 |
+
`#1044 <https://github.com/aio-libs/yarl/issues/1044>`__, `#1058 <https://github.com/aio-libs/yarl/issues/1058>`__.
|
815 |
+
|
816 |
+
|
817 |
+
----
|
818 |
+
|
819 |
+
|
820 |
+
1.9.4 (2023-12-06)
|
821 |
+
==================
|
822 |
+
|
823 |
+
Bug fixes
|
824 |
+
---------
|
825 |
+
|
826 |
+
- Started raising ``TypeError`` when a string value is passed into
|
827 |
+
``yarl.URL.build()`` as the ``port`` argument -- by `@commonism <https://github.com/sponsors/commonism>`__.
|
828 |
+
|
829 |
+
Previously the empty string as port would create malformed URLs when rendered as string representations. (`#883 <https://github.com/aio-libs/yarl/issues/883>`__)
|
830 |
+
|
831 |
+
|
832 |
+
Packaging updates and notes for downstreams
|
833 |
+
-------------------------------------------
|
834 |
+
|
835 |
+
- The leading ``--`` has been dropped from the `PEP 517 <https://peps.python.org/pep-517>`__ in-tree build
|
836 |
+
backend config setting names. ``--pure-python`` is now just ``pure-python``
|
837 |
+
-- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
838 |
+
|
839 |
+
The usage now looks as follows:
|
840 |
+
|
841 |
+
.. code-block:: console
|
842 |
+
|
843 |
+
$ python -m build \
|
844 |
+
--config-setting=pure-python=true \
|
845 |
+
--config-setting=with-cython-tracing=true
|
846 |
+
|
847 |
+
(`#963 <https://github.com/aio-libs/yarl/issues/963>`__)
|
848 |
+
|
849 |
+
|
850 |
+
Contributor-facing changes
|
851 |
+
--------------------------
|
852 |
+
|
853 |
+
- A step-by-step ``Release Guide`` guide has
|
854 |
+
been added, describing how to release *yarl* -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
855 |
+
|
856 |
+
This is primarily targeting maintainers. (`#960 <https://github.com/aio-libs/yarl/issues/960>`__)
|
857 |
+
- Coverage collection has been implemented for the Cython modules
|
858 |
+
-- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
859 |
+
|
860 |
+
It will also be reported to Codecov from any non-release CI jobs.
|
861 |
+
|
862 |
+
To measure coverage in a development environment, *yarl* can be
|
863 |
+
installed in editable mode:
|
864 |
+
|
865 |
+
.. code-block:: console
|
866 |
+
|
867 |
+
$ python -Im pip install -e .
|
868 |
+
|
869 |
+
Editable install produces C-files required for the Cython coverage
|
870 |
+
plugin to map the measurements back to the PYX-files.
|
871 |
+
|
872 |
+
`#961 <https://github.com/aio-libs/yarl/issues/961>`__
|
873 |
+
|
874 |
+
- It is now possible to request line tracing in Cython builds using the
|
875 |
+
``with-cython-tracing`` `PEP 517 <https://peps.python.org/pep-517>`__ config setting
|
876 |
+
-- `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
877 |
+
|
878 |
+
This can be used in CI and development environment to measure coverage
|
879 |
+
on Cython modules, but is not normally useful to the end-users or
|
880 |
+
downstream packagers.
|
881 |
+
|
882 |
+
Here's a usage example:
|
883 |
+
|
884 |
+
.. code-block:: console
|
885 |
+
|
886 |
+
$ python -Im pip install . --config-settings=with-cython-tracing=true
|
887 |
+
|
888 |
+
For editable installs, this setting is on by default. Otherwise, it's
|
889 |
+
off unless requested explicitly.
|
890 |
+
|
891 |
+
The following produces C-files required for the Cython coverage
|
892 |
+
plugin to map the measurements back to the PYX-files:
|
893 |
+
|
894 |
+
.. code-block:: console
|
895 |
+
|
896 |
+
$ python -Im pip install -e .
|
897 |
+
|
898 |
+
Alternatively, the ``YARL_CYTHON_TRACING=1`` environment variable
|
899 |
+
can be set to do the same as the `PEP 517 <https://peps.python.org/pep-517>`__ config setting.
|
900 |
+
|
901 |
+
`#962 <https://github.com/aio-libs/yarl/issues/962>`__
|
902 |
+
|
903 |
+
|
904 |
+
1.9.3 (2023-11-20)
|
905 |
+
==================
|
906 |
+
|
907 |
+
Bug fixes
|
908 |
+
---------
|
909 |
+
|
910 |
+
- Stopped dropping trailing slashes in ``yarl.URL.joinpath()`` -- by `@gmacon <https://github.com/sponsors/gmacon>`__. (`#862 <https://github.com/aio-libs/yarl/issues/862>`__, `#866 <https://github.com/aio-libs/yarl/issues/866>`__)
|
911 |
+
- Started accepting string subclasses in ``yarl.URL.__truediv__()`` operations (``URL / segment``) -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#871 <https://github.com/aio-libs/yarl/issues/871>`__, `#884 <https://github.com/aio-libs/yarl/issues/884>`__)
|
912 |
+
- Fixed the human representation of URLs with square brackets in usernames and passwords -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#876 <https://github.com/aio-libs/yarl/issues/876>`__, `#882 <https://github.com/aio-libs/yarl/issues/882>`__)
|
913 |
+
- Updated type hints to include ``URL.missing_port()``, ``URL.__bytes__()``
|
914 |
+
and the ``encoding`` argument to ``yarl.URL.joinpath()``
|
915 |
+
-- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#891 <https://github.com/aio-libs/yarl/issues/891>`__)
|
916 |
+
|
917 |
+
|
918 |
+
Packaging updates and notes for downstreams
|
919 |
+
-------------------------------------------
|
920 |
+
|
921 |
+
- Integrated Cython 3 to enable building *yarl* under Python 3.12 -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#829 <https://github.com/aio-libs/yarl/issues/829>`__, `#881 <https://github.com/aio-libs/yarl/issues/881>`__)
|
922 |
+
- Declared modern ``setuptools.build_meta`` as the `PEP 517 <https://peps.python.org/pep-517>`__ build
|
923 |
+
backend in ``pyproject.toml`` explicitly -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__. (`#886 <https://github.com/aio-libs/yarl/issues/886>`__)
|
924 |
+
- Converted most of the packaging setup into a declarative ``setup.cfg``
|
925 |
+
config -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__. (`#890 <https://github.com/aio-libs/yarl/issues/890>`__)
|
926 |
+
- The packaging is replaced from an old-fashioned ``setup.py`` to an
|
927 |
+
in-tree `PEP 517 <https://peps.python.org/pep-517>`__ build backend -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
928 |
+
|
929 |
+
Whenever the end-users or downstream packagers need to build ``yarl`` from
|
930 |
+
source (a Git checkout or an sdist), they may pass a ``config_settings``
|
931 |
+
flag ``--pure-python``. If this flag is not set, a C-extension will be built
|
932 |
+
and included into the distribution.
|
933 |
+
|
934 |
+
Here is how this can be done with ``pip``:
|
935 |
+
|
936 |
+
.. code-block:: console
|
937 |
+
|
938 |
+
$ python -m pip install . --config-settings=--pure-python=false
|
939 |
+
|
940 |
+
This will also work with ``-e | --editable``.
|
941 |
+
|
942 |
+
The same can be achieved via ``pypa/build``:
|
943 |
+
|
944 |
+
.. code-block:: console
|
945 |
+
|
946 |
+
$ python -m build --config-setting=--pure-python=false
|
947 |
+
|
948 |
+
Adding ``-w | --wheel`` can force ``pypa/build`` produce a wheel from source
|
949 |
+
directly, as opposed to building an ``sdist`` and then building from it. (`#893 <https://github.com/aio-libs/yarl/issues/893>`__)
|
950 |
+
|
951 |
+
.. attention::
|
952 |
+
|
953 |
+
v1.9.3 was the only version using the ``--pure-python`` setting name.
|
954 |
+
Later versions dropped the ``--`` prefix, making it just ``pure-python``.
|
955 |
+
|
956 |
+
- Declared Python 3.12 supported officially in the distribution package metadata
|
957 |
+
-- by `@edgarrmondragon <https://github.com/sponsors/edgarrmondragon>`__. (`#942 <https://github.com/aio-libs/yarl/issues/942>`__)
|
958 |
+
|
959 |
+
|
960 |
+
Contributor-facing changes
|
961 |
+
--------------------------
|
962 |
+
|
963 |
+
- A regression test for no-host URLs was added per `#821 <https://github.com/aio-libs/yarl/issues/821>`__
|
964 |
+
and ``3986`` -- by `@kenballus <https://github.com/sponsors/kenballus>`__. (`#821 <https://github.com/aio-libs/yarl/issues/821>`__, `#822 <https://github.com/aio-libs/yarl/issues/822>`__)
|
965 |
+
- Started testing *yarl* against Python 3.12 in CI -- by `@mjpieters <https://github.com/sponsors/mjpieters>`__. (`#881 <https://github.com/aio-libs/yarl/issues/881>`__)
|
966 |
+
- All Python 3.12 jobs are now marked as required to pass in CI
|
967 |
+
-- by `@edgarrmondragon <https://github.com/sponsors/edgarrmondragon>`__. (`#942 <https://github.com/aio-libs/yarl/issues/942>`__)
|
968 |
+
- MyST is now integrated in Sphinx -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
|
969 |
+
|
970 |
+
This allows the contributors to author new documents in Markdown
|
971 |
+
when they have difficulties with going straight RST. (`#953 <https://github.com/aio-libs/yarl/issues/953>`__)
|
972 |
+
|
973 |
+
|
974 |
+
1.9.2 (2023-04-25)
|
975 |
+
==================
|
976 |
+
|
977 |
+
Bugfixes
|
978 |
+
--------
|
979 |
+
|
980 |
+
- Fix regression with ``yarl.URL.__truediv__()`` and absolute URLs with empty paths causing the raw path to lack the leading ``/``.
|
981 |
+
(`#854 <https://github.com/aio-libs/yarl/issues/854>`_)
|
982 |
+
|
983 |
+
|
984 |
+
1.9.1 (2023-04-21)
|
985 |
+
==================
|
986 |
+
|
987 |
+
Bugfixes
|
988 |
+
--------
|
989 |
+
|
990 |
+
- Marked tests that fail on older Python patch releases (< 3.7.10, < 3.8.8 and < 3.9.2) as expected to fail due to missing a security fix for CVE-2021-23336. (`#850 <https://github.com/aio-libs/yarl/issues/850>`_)
|
991 |
+
|
992 |
+
|
993 |
+
1.9.0 (2023-04-19)
|
994 |
+
==================
|
995 |
+
|
996 |
+
This release was never published to PyPI, due to issues with the build process.
|
997 |
+
|
998 |
+
Features
|
999 |
+
--------
|
1000 |
+
|
1001 |
+
- Added ``URL.joinpath(*elements)``, to create a new URL appending multiple path elements. (`#704 <https://github.com/aio-libs/yarl/issues/704>`_)
|
1002 |
+
- Made ``URL.__truediv__()()`` return ``NotImplemented`` if called with an
|
1003 |
+
unsupported type — by `@michaeljpeters <https://github.com/sponsors/michaeljpeters>`__.
|
1004 |
+
(`#832 <https://github.com/aio-libs/yarl/issues/832>`_)
|
1005 |
+
|
1006 |
+
|
1007 |
+
Bugfixes
|
1008 |
+
--------
|
1009 |
+
|
1010 |
+
- Path normalization for absolute URLs no longer raises a ValueError exception
|
1011 |
+
when ``..`` segments would otherwise go beyond the URL path root.
|
1012 |
+
(`#536 <https://github.com/aio-libs/yarl/issues/536>`_)
|
1013 |
+
- Fixed an issue with update_query() not getting rid of the query when argument is None. (`#792 <https://github.com/aio-libs/yarl/issues/792>`_)
|
1014 |
+
- Added some input restrictions on with_port() function to prevent invalid boolean inputs or out of valid port inputs; handled incorrect 0 port representation. (`#793 <https://github.com/aio-libs/yarl/issues/793>`_)
|
1015 |
+
- Made ``yarl.URL.build()`` raise a ``TypeError`` if the ``host`` argument is ``None`` — by `@paulpapacz <https://github.com/sponsors/paulpapacz>`__. (`#808 <https://github.com/aio-libs/yarl/issues/808>`_)
|
1016 |
+
- Fixed an issue with ``update_query()`` getting rid of the query when the argument
|
1017 |
+
is empty but not ``None``. (`#845 <https://github.com/aio-libs/yarl/issues/845>`_)
|
1018 |
+
|
1019 |
+
|
1020 |
+
Misc
|
1021 |
+
----
|
1022 |
+
|
1023 |
+
- `#220 <https://github.com/aio-libs/yarl/issues/220>`_
|
1024 |
+
|
1025 |
+
|
1026 |
+
1.8.2 (2022-12-03)
|
1027 |
+
==================
|
1028 |
+
|
1029 |
+
This is the first release that started shipping wheels for Python 3.11.
|
1030 |
+
|
1031 |
+
|
1032 |
+
1.8.1 (2022-08-01)
|
1033 |
+
==================
|
1034 |
+
|
1035 |
+
Misc
|
1036 |
+
----
|
1037 |
+
|
1038 |
+
- `#694 <https://github.com/aio-libs/yarl/issues/694>`_, `#699 <https://github.com/aio-libs/yarl/issues/699>`_, `#700 <https://github.com/aio-libs/yarl/issues/700>`_, `#701 <https://github.com/aio-libs/yarl/issues/701>`_, `#702 <https://github.com/aio-libs/yarl/issues/702>`_, `#703 <https://github.com/aio-libs/yarl/issues/703>`_, `#739 <https://github.com/aio-libs/yarl/issues/739>`_
|
1039 |
+
|
1040 |
+
|
1041 |
+
1.8.0 (2022-08-01)
|
1042 |
+
==================
|
1043 |
+
|
1044 |
+
Features
|
1045 |
+
--------
|
1046 |
+
|
1047 |
+
- Added ``URL.raw_suffix``, ``URL.suffix``, ``URL.raw_suffixes``, ``URL.suffixes``, ``URL.with_suffix``. (`#613 <https://github.com/aio-libs/yarl/issues/613>`_)
|
1048 |
+
|
1049 |
+
|
1050 |
+
Improved Documentation
|
1051 |
+
----------------------
|
1052 |
+
|
1053 |
+
- Fixed broken internal references to ``yarl.URL.human_repr()``.
|
1054 |
+
(`#665 <https://github.com/aio-libs/yarl/issues/665>`_)
|
1055 |
+
- Fixed broken external references to ``multidict:index`` docs. (`#665 <https://github.com/aio-libs/yarl/issues/665>`_)
|
1056 |
+
|
1057 |
+
|
1058 |
+
Deprecations and Removals
|
1059 |
+
-------------------------
|
1060 |
+
|
1061 |
+
- Dropped Python 3.6 support. (`#672 <https://github.com/aio-libs/yarl/issues/672>`_)
|
1062 |
+
|
1063 |
+
|
1064 |
+
Misc
|
1065 |
+
----
|
1066 |
+
|
1067 |
+
- `#646 <https://github.com/aio-libs/yarl/issues/646>`_, `#699 <https://github.com/aio-libs/yarl/issues/699>`_, `#701 <https://github.com/aio-libs/yarl/issues/701>`_
|
1068 |
+
|
1069 |
+
|
1070 |
+
1.7.2 (2021-11-01)
|
1071 |
+
==================
|
1072 |
+
|
1073 |
+
Bugfixes
|
1074 |
+
--------
|
1075 |
+
|
1076 |
+
- Changed call in ``with_port()`` to stop reencoding parts of the URL that were already encoded. (`#623 <https://github.com/aio-libs/yarl/issues/623>`_)
|
1077 |
+
|
1078 |
+
|
1079 |
+
1.7.1 (2021-10-07)
|
1080 |
+
==================
|
1081 |
+
|
1082 |
+
Bugfixes
|
1083 |
+
--------
|
1084 |
+
|
1085 |
+
- Fix 1.7.0 build error
|
1086 |
+
|
1087 |
+
1.7.0 (2021-10-06)
|
1088 |
+
==================
|
1089 |
+
|
1090 |
+
Features
|
1091 |
+
--------
|
1092 |
+
|
1093 |
+
- Add ``__bytes__()`` magic method so that ``bytes(url)`` will work and use optimal ASCII encoding.
|
1094 |
+
(`#582 <https://github.com/aio-libs/yarl/issues/582>`_)
|
1095 |
+
- Started shipping platform-specific arm64 wheels for Apple Silicon. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
|
1096 |
+
- Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
|
1097 |
+
- Added support for Python 3.10. (`#622 <https://github.com/aio-libs/yarl/issues/622>`_)
|
1098 |
+
|
1099 |
+
|
1100 |
+
1.6.3 (2020-11-14)
|
1101 |
+
==================
|
1102 |
+
|
1103 |
+
Bugfixes
|
1104 |
+
--------
|
1105 |
+
|
1106 |
+
- No longer loose characters when decoding incorrect percent-sequences (like ``%e2%82%f8``). All non-decodable percent-sequences are now preserved.
|
1107 |
+
`#517 <https://github.com/aio-libs/yarl/issues/517>`_
|
1108 |
+
- Provide x86 Windows wheels.
|
1109 |
+
`#535 <https://github.com/aio-libs/yarl/issues/535>`_
|
1110 |
+
|
1111 |
+
|
1112 |
+
----
|
1113 |
+
|
1114 |
+
|
1115 |
+
1.6.2 (2020-10-12)
|
1116 |
+
==================
|
1117 |
+
|
1118 |
+
|
1119 |
+
Bugfixes
|
1120 |
+
--------
|
1121 |
+
|
1122 |
+
- Provide generated ``.c`` files in TarBall distribution.
|
1123 |
+
`#530 <https://github.com/aio-libs/multidict/issues/530>`_
|
1124 |
+
|
1125 |
+
1.6.1 (2020-10-12)
|
1126 |
+
==================
|
1127 |
+
|
1128 |
+
Features
|
1129 |
+
--------
|
1130 |
+
|
1131 |
+
- Provide wheels for ``aarch64``, ``i686``, ``ppc64le``, ``s390x`` architectures on
|
1132 |
+
Linux as well as ``x86_64``.
|
1133 |
+
`#507 <https://github.com/aio-libs/yarl/issues/507>`_
|
1134 |
+
- Provide wheels for Python 3.9.
|
1135 |
+
`#526 <https://github.com/aio-libs/yarl/issues/526>`_
|
1136 |
+
|
1137 |
+
Bugfixes
|
1138 |
+
--------
|
1139 |
+
|
1140 |
+
- ``human_repr()`` now always produces valid representation equivalent to the original URL (if the original URL is valid).
|
1141 |
+
`#511 <https://github.com/aio-libs/yarl/issues/511>`_
|
1142 |
+
- Fixed requoting a single percent followed by a percent-encoded character in the Cython implementation.
|
1143 |
+
`#514 <https://github.com/aio-libs/yarl/issues/514>`_
|
1144 |
+
- Fix ValueError when decoding ``%`` which is not followed by two hexadecimal digits.
|
1145 |
+
`#516 <https://github.com/aio-libs/yarl/issues/516>`_
|
1146 |
+
- Fix decoding ``%`` followed by a space and hexadecimal digit.
|
1147 |
+
`#520 <https://github.com/aio-libs/yarl/issues/520>`_
|
1148 |
+
- Fix annotation of ``with_query()``/``update_query()`` methods for ``key=[val1, val2]`` case.
|
1149 |
+
`#528 <https://github.com/aio-libs/yarl/issues/528>`_
|
1150 |
+
|
1151 |
+
Removal
|
1152 |
+
-------
|
1153 |
+
|
1154 |
+
- Drop Python 3.5 support; Python 3.6 is the minimal supported Python version.
|
1155 |
+
|
1156 |
+
|
1157 |
+
----
|
1158 |
+
|
1159 |
+
|
1160 |
+
1.6.0 (2020-09-23)
|
1161 |
+
==================
|
1162 |
+
|
1163 |
+
Features
|
1164 |
+
--------
|
1165 |
+
|
1166 |
+
- Allow for int and float subclasses in query, while still denying bool.
|
1167 |
+
`#492 <https://github.com/aio-libs/yarl/issues/492>`_
|
1168 |
+
|
1169 |
+
|
1170 |
+
Bugfixes
|
1171 |
+
--------
|
1172 |
+
|
1173 |
+
- Do not requote arguments in ``URL.build()``, ``with_xxx()`` and in ``/`` operator.
|
1174 |
+
`#502 <https://github.com/aio-libs/yarl/issues/502>`_
|
1175 |
+
- Keep IPv6 brackets in ``origin()``.
|
1176 |
+
`#504 <https://github.com/aio-libs/yarl/issues/504>`_
|
1177 |
+
|
1178 |
+
|
1179 |
+
----
|
1180 |
+
|
1181 |
+
|
1182 |
+
1.5.1 (2020-08-01)
|
1183 |
+
==================
|
1184 |
+
|
1185 |
+
Bugfixes
|
1186 |
+
--------
|
1187 |
+
|
1188 |
+
- Fix including relocated internal ``yarl._quoting_c`` C-extension into published PyPI dists.
|
1189 |
+
`#485 <https://github.com/aio-libs/yarl/issues/485>`_
|
1190 |
+
|
1191 |
+
|
1192 |
+
Misc
|
1193 |
+
----
|
1194 |
+
|
1195 |
+
- `#484 <https://github.com/aio-libs/yarl/issues/484>`_
|
1196 |
+
|
1197 |
+
|
1198 |
+
----
|
1199 |
+
|
1200 |
+
|
1201 |
+
1.5.0 (2020-07-26)
|
1202 |
+
==================
|
1203 |
+
|
1204 |
+
Features
|
1205 |
+
--------
|
1206 |
+
|
1207 |
+
- Convert host to lowercase on URL building.
|
1208 |
+
`#386 <https://github.com/aio-libs/yarl/issues/386>`_
|
1209 |
+
- Allow using ``mod`` operator (``%``) for updating query string (an alias for ``update_query()`` method).
|
1210 |
+
`#435 <https://github.com/aio-libs/yarl/issues/435>`_
|
1211 |
+
- Allow use of sequences such as ``list`` and ``tuple`` in the values
|
1212 |
+
of a mapping such as ``dict`` to represent that a key has many values::
|
1213 |
+
|
1214 |
+
url = URL("http://example.com")
|
1215 |
+
assert url.with_query({"a": [1, 2]}) == URL("http://example.com/?a=1&a=2")
|
1216 |
+
|
1217 |
+
`#443 <https://github.com/aio-libs/yarl/issues/443>`_
|
1218 |
+
- Support ``URL.build()`` with scheme and path (creates a relative URL).
|
1219 |
+
`#464 <https://github.com/aio-libs/yarl/issues/464>`_
|
1220 |
+
- Cache slow IDNA encode/decode calls.
|
1221 |
+
`#476 <https://github.com/aio-libs/yarl/issues/476>`_
|
1222 |
+
- Add ``@final`` / ``Final`` type hints
|
1223 |
+
`#477 <https://github.com/aio-libs/yarl/issues/477>`_
|
1224 |
+
- Support URL authority/raw_authority properties and authority argument of ``URL.build()`` method.
|
1225 |
+
`#478 <https://github.com/aio-libs/yarl/issues/478>`_
|
1226 |
+
- Hide the library implementation details, make the exposed public list very clean.
|
1227 |
+
`#483 <https://github.com/aio-libs/yarl/issues/483>`_
|
1228 |
+
|
1229 |
+
|
1230 |
+
Bugfixes
|
1231 |
+
--------
|
1232 |
+
|
1233 |
+
- Fix tests with newer Python (3.7.6, 3.8.1 and 3.9.0+).
|
1234 |
+
`#409 <https://github.com/aio-libs/yarl/issues/409>`_
|
1235 |
+
- Fix a bug where query component, passed in a form of mapping or sequence, is unquoted in unexpected way.
|
1236 |
+
`#426 <https://github.com/aio-libs/yarl/issues/426>`_
|
1237 |
+
- Hide ``Query`` and ``QueryVariable`` type aliases in ``__init__.pyi``, now they are prefixed with underscore.
|
1238 |
+
`#431 <https://github.com/aio-libs/yarl/issues/431>`_
|
1239 |
+
- Keep IPv6 brackets after updating port/user/password.
|
1240 |
+
`#451 <https://github.com/aio-libs/yarl/issues/451>`_
|
1241 |
+
|
1242 |
+
|
1243 |
+
----
|
1244 |
+
|
1245 |
+
|
1246 |
+
1.4.2 (2019-12-05)
|
1247 |
+
==================
|
1248 |
+
|
1249 |
+
Features
|
1250 |
+
--------
|
1251 |
+
|
1252 |
+
- Workaround for missing ``str.isascii()`` in Python 3.6
|
1253 |
+
`#389 <https://github.com/aio-libs/yarl/issues/389>`_
|
1254 |
+
|
1255 |
+
|
1256 |
+
----
|
1257 |
+
|
1258 |
+
|
1259 |
+
1.4.1 (2019-11-29)
|
1260 |
+
==================
|
1261 |
+
|
1262 |
+
* Fix regression, make the library work on Python 3.5 and 3.6 again.
|
1263 |
+
|
1264 |
+
1.4.0 (2019-11-29)
|
1265 |
+
==================
|
1266 |
+
|
1267 |
+
* Distinguish an empty password in URL from a password not provided at all (#262)
|
1268 |
+
|
1269 |
+
* Fixed annotations for optional parameters of ``URL.build`` (#309)
|
1270 |
+
|
1271 |
+
* Use None as default value of ``user`` parameter of ``URL.build`` (#309)
|
1272 |
+
|
1273 |
+
* Enforce building C Accelerated modules when installing from source tarball, use
|
1274 |
+
``YARL_NO_EXTENSIONS`` environment variable for falling back to (slower) Pure Python
|
1275 |
+
implementation (#329)
|
1276 |
+
|
1277 |
+
* Drop Python 3.5 support
|
1278 |
+
|
1279 |
+
* Fix quoting of plus in path by pure python version (#339)
|
1280 |
+
|
1281 |
+
* Don't create a new URL if fragment is unchanged (#292)
|
1282 |
+
|
1283 |
+
* Included in error message the path that produces starting slash forbidden error (#376)
|
1284 |
+
|
1285 |
+
* Skip slow IDNA encoding for ASCII-only strings (#387)
|
1286 |
+
|
1287 |
+
|
1288 |
+
1.3.0 (2018-12-11)
|
1289 |
+
==================
|
1290 |
+
|
1291 |
+
* Fix annotations for ``query`` parameter (#207)
|
1292 |
+
|
1293 |
+
* An incoming query sequence can have int variables (the same as for
|
1294 |
+
Mapping type) (#208)
|
1295 |
+
|
1296 |
+
* Add ``URL.explicit_port`` property (#218)
|
1297 |
+
|
1298 |
+
* Give a friendlier error when port can't be converted to int (#168)
|
1299 |
+
|
1300 |
+
* ``bool(URL())`` now returns ``False`` (#272)
|
1301 |
+
|
1302 |
+
1.2.6 (2018-06-14)
|
1303 |
+
==================
|
1304 |
+
|
1305 |
+
* Drop Python 3.4 trove classifier (#205)
|
1306 |
+
|
1307 |
+
1.2.5 (2018-05-23)
|
1308 |
+
==================
|
1309 |
+
|
1310 |
+
* Fix annotations for ``build`` (#199)
|
1311 |
+
|
1312 |
+
1.2.4 (2018-05-08)
|
1313 |
+
==================
|
1314 |
+
|
1315 |
+
* Fix annotations for ``cached_property`` (#195)
|
1316 |
+
|
1317 |
+
1.2.3 (2018-05-03)
|
1318 |
+
==================
|
1319 |
+
|
1320 |
+
* Accept ``str`` subclasses in ``URL`` constructor (#190)
|
1321 |
+
|
1322 |
+
1.2.2 (2018-05-01)
|
1323 |
+
==================
|
1324 |
+
|
1325 |
+
* Fix build
|
1326 |
+
|
1327 |
+
1.2.1 (2018-04-30)
|
1328 |
+
==================
|
1329 |
+
|
1330 |
+
* Pin minimal required Python to 3.5.3 (#189)
|
1331 |
+
|
1332 |
+
1.2.0 (2018-04-30)
|
1333 |
+
==================
|
1334 |
+
|
1335 |
+
* Forbid inheritance, replace ``__init__`` with ``__new__`` (#171)
|
1336 |
+
|
1337 |
+
* Support PEP-561 (provide type hinting marker) (#182)
|
1338 |
+
|
1339 |
+
1.1.1 (2018-02-17)
|
1340 |
+
==================
|
1341 |
+
|
1342 |
+
* Fix performance regression: don't encode empty ``netloc`` (#170)
|
1343 |
+
|
1344 |
+
1.1.0 (2018-01-21)
|
1345 |
+
==================
|
1346 |
+
|
1347 |
+
* Make pure Python quoter consistent with Cython version (#162)
|
1348 |
+
|
1349 |
+
1.0.0 (2018-01-15)
|
1350 |
+
==================
|
1351 |
+
|
1352 |
+
* Use fast path if quoted string does not need requoting (#154)
|
1353 |
+
|
1354 |
+
* Speed up quoting/unquoting by ``_Quoter`` and ``_Unquoter`` classes (#155)
|
1355 |
+
|
1356 |
+
* Drop ``yarl.quote`` and ``yarl.unquote`` public functions (#155)
|
1357 |
+
|
1358 |
+
* Add custom string writer, reuse static buffer if available (#157)
|
1359 |
+
Code is 50-80 times faster than Pure Python version (was 4-5 times faster)
|
1360 |
+
|
1361 |
+
* Don't recode IP zone (#144)
|
1362 |
+
|
1363 |
+
* Support ``encoded=True`` in ``yarl.URL.build()`` (#158)
|
1364 |
+
|
1365 |
+
* Fix updating query with multiple keys (#160)
|
1366 |
+
|
1367 |
+
0.18.0 (2018-01-10)
|
1368 |
+
===================
|
1369 |
+
|
1370 |
+
* Fallback to IDNA 2003 if domain name is not IDNA 2008 compatible (#152)
|
1371 |
+
|
1372 |
+
0.17.0 (2017-12-30)
|
1373 |
+
===================
|
1374 |
+
|
1375 |
+
* Use IDNA 2008 for domain name processing (#149)
|
1376 |
+
|
1377 |
+
0.16.0 (2017-12-07)
|
1378 |
+
===================
|
1379 |
+
|
1380 |
+
* Fix raising ``TypeError`` by ``url.query_string()`` after
|
1381 |
+
``url.with_query({})`` (empty mapping) (#141)
|
1382 |
+
|
1383 |
+
0.15.0 (2017-11-23)
|
1384 |
+
===================
|
1385 |
+
|
1386 |
+
* Add ``raw_path_qs`` attribute (#137)
|
1387 |
+
|
1388 |
+
0.14.2 (2017-11-14)
|
1389 |
+
===================
|
1390 |
+
|
1391 |
+
* Restore ``strict`` parameter as no-op in ``quote`` / ``unquote``
|
1392 |
+
|
1393 |
+
0.14.1 (2017-11-13)
|
1394 |
+
===================
|
1395 |
+
|
1396 |
+
* Restore ``strict`` parameter as no-op for sake of compatibility with
|
1397 |
+
aiohttp 2.2
|
1398 |
+
|
1399 |
+
0.14.0 (2017-11-11)
|
1400 |
+
===================
|
1401 |
+
|
1402 |
+
* Drop strict mode (#123)
|
1403 |
+
|
1404 |
+
* Fix ``"ValueError: Unallowed PCT %"`` when there's a ``"%"`` in the URL (#124)
|
1405 |
+
|
1406 |
+
0.13.0 (2017-10-01)
|
1407 |
+
===================
|
1408 |
+
|
1409 |
+
* Document ``encoded`` parameter (#102)
|
1410 |
+
|
1411 |
+
* Support relative URLs like ``'?key=value'`` (#100)
|
1412 |
+
|
1413 |
+
* Unsafe encoding for QS fixed. Encode ``;`` character in value parameter (#104)
|
1414 |
+
|
1415 |
+
* Process passwords without user names (#95)
|
1416 |
+
|
1417 |
+
0.12.0 (2017-06-26)
|
1418 |
+
===================
|
1419 |
+
|
1420 |
+
* Properly support paths without leading slash in ``URL.with_path()`` (#90)
|
1421 |
+
|
1422 |
+
* Enable type annotation checks
|
1423 |
+
|
1424 |
+
0.11.0 (2017-06-26)
|
1425 |
+
===================
|
1426 |
+
|
1427 |
+
* Normalize path (#86)
|
1428 |
+
|
1429 |
+
* Clear query and fragment parts in ``.with_path()`` (#85)
|
1430 |
+
|
1431 |
+
0.10.3 (2017-06-13)
|
1432 |
+
===================
|
1433 |
+
|
1434 |
+
* Prevent double URL arguments unquoting (#83)
|
1435 |
+
|
1436 |
+
0.10.2 (2017-05-05)
|
1437 |
+
===================
|
1438 |
+
|
1439 |
+
* Unexpected hash behavior (#75)
|
1440 |
+
|
1441 |
+
|
1442 |
+
0.10.1 (2017-05-03)
|
1443 |
+
===================
|
1444 |
+
|
1445 |
+
* Unexpected compare behavior (#73)
|
1446 |
+
|
1447 |
+
* Do not quote or unquote + if not a query string. (#74)
|
1448 |
+
|
1449 |
+
|
1450 |
+
0.10.0 (2017-03-14)
|
1451 |
+
===================
|
1452 |
+
|
1453 |
+
* Added ``URL.build`` class method (#58)
|
1454 |
+
|
1455 |
+
* Added ``path_qs`` attribute (#42)
|
1456 |
+
|
1457 |
+
|
1458 |
+
0.9.8 (2017-02-16)
|
1459 |
+
==================
|
1460 |
+
|
1461 |
+
* Do not quote ``:`` in path
|
1462 |
+
|
1463 |
+
|
1464 |
+
0.9.7 (2017-02-16)
|
1465 |
+
==================
|
1466 |
+
|
1467 |
+
* Load from pickle without _cache (#56)
|
1468 |
+
|
1469 |
+
* Percent-encoded pluses in path variables become spaces (#59)
|
1470 |
+
|
1471 |
+
|
1472 |
+
0.9.6 (2017-02-15)
|
1473 |
+
==================
|
1474 |
+
|
1475 |
+
* Revert backward incompatible change (BaseURL)
|
1476 |
+
|
1477 |
+
|
1478 |
+
0.9.5 (2017-02-14)
|
1479 |
+
==================
|
1480 |
+
|
1481 |
+
* Fix BaseURL rich comparison support
|
1482 |
+
|
1483 |
+
|
1484 |
+
0.9.4 (2017-02-14)
|
1485 |
+
==================
|
1486 |
+
|
1487 |
+
* Use BaseURL
|
1488 |
+
|
1489 |
+
|
1490 |
+
0.9.3 (2017-02-14)
|
1491 |
+
==================
|
1492 |
+
|
1493 |
+
* Added BaseURL
|
1494 |
+
|
1495 |
+
|
1496 |
+
0.9.2 (2017-02-08)
|
1497 |
+
==================
|
1498 |
+
|
1499 |
+
* Remove debug print
|
1500 |
+
|
1501 |
+
|
1502 |
+
0.9.1 (2017-02-07)
|
1503 |
+
==================
|
1504 |
+
|
1505 |
+
* Do not lose tail chars (#45)
|
1506 |
+
|
1507 |
+
|
1508 |
+
0.9.0 (2017-02-07)
|
1509 |
+
==================
|
1510 |
+
|
1511 |
+
* Allow to quote ``%`` in non strict mode (#21)
|
1512 |
+
|
1513 |
+
* Incorrect parsing of query parameters with %3B (;) inside (#34)
|
1514 |
+
|
1515 |
+
* Fix core dumps (#41)
|
1516 |
+
|
1517 |
+
* ``tmpbuf`` - compiling error (#43)
|
1518 |
+
|
1519 |
+
* Added ``URL.update_path()`` method
|
1520 |
+
|
1521 |
+
* Added ``URL.update_query()`` method (#47)
|
1522 |
+
|
1523 |
+
|
1524 |
+
0.8.1 (2016-12-03)
|
1525 |
+
==================
|
1526 |
+
|
1527 |
+
* Fix broken aiohttp: revert back ``quote`` / ``unquote``.
|
1528 |
+
|
1529 |
+
|
1530 |
+
0.8.0 (2016-12-03)
|
1531 |
+
==================
|
1532 |
+
|
1533 |
+
* Support more verbose error messages in ``.with_query()`` (#24)
|
1534 |
+
|
1535 |
+
* Don't percent-encode ``@`` and ``:`` in path (#32)
|
1536 |
+
|
1537 |
+
* Don't expose ``yarl.quote`` and ``yarl.unquote``, these functions are
|
1538 |
+
part of private API
|
1539 |
+
|
1540 |
+
0.7.1 (2016-11-18)
|
1541 |
+
==================
|
1542 |
+
|
1543 |
+
* Accept not only ``str`` but all classes inherited from ``str`` also (#25)
|
1544 |
+
|
1545 |
+
0.7.0 (2016-11-07)
|
1546 |
+
==================
|
1547 |
+
|
1548 |
+
* Accept ``int`` as value for ``.with_query()``
|
1549 |
+
|
1550 |
+
0.6.0 (2016-11-07)
|
1551 |
+
==================
|
1552 |
+
|
1553 |
+
* Explicitly use UTF8 encoding in ``setup.py`` (#20)
|
1554 |
+
* Properly unquote non-UTF8 strings (#19)
|
1555 |
+
|
1556 |
+
0.5.3 (2016-11-02)
|
1557 |
+
==================
|
1558 |
+
|
1559 |
+
* Don't use ``typing.NamedTuple`` fields but indexes on URL construction
|
1560 |
+
|
1561 |
+
0.5.2 (2016-11-02)
|
1562 |
+
==================
|
1563 |
+
|
1564 |
+
* Inline ``_encode`` class method
|
1565 |
+
|
1566 |
+
0.5.1 (2016-11-02)
|
1567 |
+
==================
|
1568 |
+
|
1569 |
+
* Make URL construction faster by removing extra classmethod calls
|
1570 |
+
|
1571 |
+
0.5.0 (2016-11-02)
|
1572 |
+
==================
|
1573 |
+
|
1574 |
+
* Add Cython optimization for quoting/unquoting
|
1575 |
+
* Provide binary wheels
|
1576 |
+
|
1577 |
+
0.4.3 (2016-09-29)
|
1578 |
+
==================
|
1579 |
+
|
1580 |
+
* Fix typing stubs
|
1581 |
+
|
1582 |
+
0.4.2 (2016-09-29)
|
1583 |
+
==================
|
1584 |
+
|
1585 |
+
* Expose ``quote()`` and ``unquote()`` as public API
|
1586 |
+
|
1587 |
+
0.4.1 (2016-09-28)
|
1588 |
+
==================
|
1589 |
+
|
1590 |
+
* Support empty values in query (``'/path?arg'``)
|
1591 |
+
|
1592 |
+
0.4.0 (2016-09-27)
|
1593 |
+
==================
|
1594 |
+
|
1595 |
+
* Introduce ``relative()`` (#16)
|
1596 |
+
|
1597 |
+
0.3.2 (2016-09-27)
|
1598 |
+
==================
|
1599 |
+
|
1600 |
+
* Typo fixes #15
|
1601 |
+
|
1602 |
+
0.3.1 (2016-09-26)
|
1603 |
+
==================
|
1604 |
+
|
1605 |
+
* Support sequence of pairs as ``with_query()`` parameter
|
1606 |
+
|
1607 |
+
0.3.0 (2016-09-26)
|
1608 |
+
==================
|
1609 |
+
|
1610 |
+
* Introduce ``is_default_port()``
|
1611 |
+
|
1612 |
+
0.2.1 (2016-09-26)
|
1613 |
+
==================
|
1614 |
+
|
1615 |
+
* Raise ValueError for URLs like 'http://:8080/'
|
1616 |
+
|
1617 |
+
0.2.0 (2016-09-18)
|
1618 |
+
==================
|
1619 |
+
|
1620 |
+
* Avoid doubling slashes when joining paths (#13)
|
1621 |
+
|
1622 |
+
* Appending path starting from slash is forbidden (#12)
|
1623 |
+
|
1624 |
+
0.1.4 (2016-09-09)
|
1625 |
+
==================
|
1626 |
+
|
1627 |
+
* Add ``kwargs`` support for ``with_query()`` (#10)
|
1628 |
+
|
1629 |
+
0.1.3 (2016-09-07)
|
1630 |
+
==================
|
1631 |
+
|
1632 |
+
* Document ``with_query()``, ``with_fragment()`` and ``origin()``
|
1633 |
+
|
1634 |
+
* Allow ``None`` for ``with_query()`` and ``with_fragment()``
|
1635 |
+
|
1636 |
+
0.1.2 (2016-09-07)
|
1637 |
+
==================
|
1638 |
+
|
1639 |
+
* Fix links, tune docs theme.
|
1640 |
+
|
1641 |
+
0.1.1 (2016-09-06)
|
1642 |
+
==================
|
1643 |
+
|
1644 |
+
* Update README, old version used obsolete API
|
1645 |
+
|
1646 |
+
0.1.0 (2016-09-06)
|
1647 |
+
==================
|
1648 |
+
|
1649 |
+
* The library was deeply refactored, bytes are gone away but all
|
1650 |
+
accepted strings are encoded if needed.
|
1651 |
+
|
1652 |
+
0.0.1 (2016-08-30)
|
1653 |
+
==================
|
1654 |
+
|
1655 |
+
* The first release.
|
.cache/pip/http-v2/5/8/d/9/8/58d9818b2a061ba2b595a1744fd86d4eb017703b38f7209903256e4e
ADDED
Binary file (1.2 kB). View file
|
|
.cache/pip/http-v2/5/9/5/1/1/595119384424f750543e201763b875c3f3e0ff028ba41e4b528b7dca.body
ADDED
Binary file (5.29 kB). View file
|
|
.cache/pip/http-v2/6/0/1/a/a/601aa27698da49f5bed3bc91bb41d8245b8316b66bd86059ef3b929e.body
ADDED
@@ -0,0 +1,360 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.3
|
2 |
+
Name: einops
|
3 |
+
Version: 0.8.0
|
4 |
+
Summary: A new flavour of deep learning operations
|
5 |
+
Project-URL: Homepage, https://github.com/arogozhnikov/einops
|
6 |
+
Author: Alex Rogozhnikov
|
7 |
+
License: MIT
|
8 |
+
License-File: LICENSE
|
9 |
+
Keywords: deep learning,einops,machine learning,neural networks,scientific computations,tensor manipulation
|
10 |
+
Classifier: Intended Audience :: Science/Research
|
11 |
+
Classifier: License :: OSI Approved :: MIT License
|
12 |
+
Classifier: Programming Language :: Python :: 3
|
13 |
+
Requires-Python: >=3.8
|
14 |
+
Description-Content-Type: text/markdown
|
15 |
+
|
16 |
+
|
17 |
+
<!--
|
18 |
+
<a href='http://arogozhnikov.github.io/images/einops/einops_video.mp4' >
|
19 |
+
<div align="center">
|
20 |
+
<img src="http://arogozhnikov.github.io/images/einops/einops_video.gif" alt="einops package examples" />
|
21 |
+
<br>
|
22 |
+
<small><a href='http://arogozhnikov.github.io/images/einops/einops_video.mp4'>This video in high quality (mp4)</a></small>
|
23 |
+
<br><br>
|
24 |
+
</div>
|
25 |
+
</a>
|
26 |
+
-->
|
27 |
+
|
28 |
+
<!-- this link magically rendered as video, unfortunately not in docs -->
|
29 |
+
|
30 |
+
https://user-images.githubusercontent.com/6318811/177030658-66f0eb5d-e136-44d8-99c9-86ae298ead5b.mp4
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
# einops
|
36 |
+
[![Run tests](https://github.com/arogozhnikov/einops/actions/workflows/run_tests.yml/badge.svg)](https://github.com/arogozhnikov/einops/actions/workflows/run_tests.yml)
|
37 |
+
[![PyPI version](https://badge.fury.io/py/einops.svg)](https://badge.fury.io/py/einops)
|
38 |
+
[![Documentation](https://img.shields.io/badge/documentation-link-blue.svg)](https://einops.rocks/)
|
39 |
+
![Supported python versions](https://raw.githubusercontent.com/arogozhnikov/einops/master/docs/resources/python_badge.svg)
|
40 |
+
|
41 |
+
|
42 |
+
Flexible and powerful tensor operations for readable and reliable code. <br />
|
43 |
+
Supports numpy, pytorch, tensorflow, jax, and [others](#supported-frameworks).
|
44 |
+
|
45 |
+
## Recent updates:
|
46 |
+
|
47 |
+
- 0.7.0: no-hassle `torch.compile`, support of [array api standard](https://data-apis.org/array-api/latest/API_specification/index.html) and more
|
48 |
+
- 10'000🎉: github reports that more than 10k project use einops
|
49 |
+
- einops 0.6.1: paddle backend added
|
50 |
+
- einops 0.6 introduces [packing and unpacking](https://github.com/arogozhnikov/einops/blob/master/docs/4-pack-and-unpack.ipynb)
|
51 |
+
- einops 0.5: einsum is now a part of einops
|
52 |
+
- [Einops paper](https://openreview.net/pdf?id=oapKSVM2bcj) is accepted for oral presentation at ICLR 2022 (yes, it worth reading).
|
53 |
+
Talk recordings are [available](https://iclr.cc/virtual/2022/oral/6603)
|
54 |
+
|
55 |
+
|
56 |
+
<details markdown="1">
|
57 |
+
<summary>Previous updates</summary>
|
58 |
+
- flax and oneflow backend added
|
59 |
+
- torch.jit.script is supported for pytorch layers
|
60 |
+
- powerful EinMix added to einops. [Einmix tutorial notebook](https://github.com/arogozhnikov/einops/blob/master/docs/3-einmix-layer.ipynb)
|
61 |
+
</details>
|
62 |
+
|
63 |
+
<!--<div align="center">
|
64 |
+
<img src="http://arogozhnikov.github.io/images/einops/einops_logo_350x350.png"
|
65 |
+
alt="einops package logo" width="250" height="250" />
|
66 |
+
<br><br>
|
67 |
+
</div> -->
|
68 |
+
|
69 |
+
|
70 |
+
## Tweets
|
71 |
+
|
72 |
+
> In case you need convincing arguments for setting aside time to learn about einsum and einops...
|
73 |
+
[Tim Rocktäschel](https://twitter.com/_rockt/status/1230818967205425152)
|
74 |
+
|
75 |
+
> Writing better code with PyTorch and einops 👌
|
76 |
+
[Andrej Karpathy](https://twitter.com/karpathy/status/1290826075916779520)
|
77 |
+
|
78 |
+
> Slowly but surely, einops is seeping in to every nook and cranny of my code. If you find yourself shuffling around bazillion dimensional tensors, this might change your life
|
79 |
+
[Nasim Rahaman](https://twitter.com/nasim_rahaman/status/1216022614755463169)
|
80 |
+
|
81 |
+
[More testimonials](https://einops.rocks/pages/testimonials/)
|
82 |
+
|
83 |
+
<!--
|
84 |
+
## Recordings of talk at ICLR 2022
|
85 |
+
|
86 |
+
<a href='https://iclr.cc/virtual/2022/oral/6603'>
|
87 |
+
<img width="922" alt="Screen Shot 2022-07-03 at 1 00 15 AM" src="https://user-images.githubusercontent.com/6318811/177030789-89d349bf-ef75-4af5-a71f-609896d1c8d9.png">
|
88 |
+
</a>
|
89 |
+
|
90 |
+
Watch [a 15-minute talk](https://iclr.cc/virtual/2022/oral/6603) focused on main problems of standard tensor manipulation methods, and how einops improves this process.
|
91 |
+
-->
|
92 |
+
|
93 |
+
## Contents
|
94 |
+
|
95 |
+
- [Installation](#Installation)
|
96 |
+
- [Documentation](https://einops.rocks/)
|
97 |
+
- [Tutorial](#Tutorials)
|
98 |
+
- [API micro-reference](#API)
|
99 |
+
- [Why using einops](#Why-using-einops-notation)
|
100 |
+
- [Supported frameworks](#Supported-frameworks)
|
101 |
+
- [Citing](#Citing)
|
102 |
+
- [Repository](https://github.com/arogozhnikov/einops) and [discussions](https://github.com/arogozhnikov/einops/discussions)
|
103 |
+
|
104 |
+
## Installation <a name="Installation"></a>
|
105 |
+
|
106 |
+
Plain and simple:
|
107 |
+
```bash
|
108 |
+
pip install einops
|
109 |
+
```
|
110 |
+
|
111 |
+
<!--
|
112 |
+
`einops` has no mandatory dependencies (code examples also require jupyter, pillow + backends).
|
113 |
+
To obtain the latest github version
|
114 |
+
|
115 |
+
```bash
|
116 |
+
pip install https://github.com/arogozhnikov/einops/archive/master.zip
|
117 |
+
```
|
118 |
+
-->
|
119 |
+
|
120 |
+
## Tutorials <a name="Tutorials"></a>
|
121 |
+
|
122 |
+
Tutorials are the most convenient way to see `einops` in action
|
123 |
+
|
124 |
+
- part 1: [einops fundamentals](https://github.com/arogozhnikov/einops/blob/master/docs/1-einops-basics.ipynb)
|
125 |
+
- part 2: [einops for deep learning](https://github.com/arogozhnikov/einops/blob/master/docs/2-einops-for-deep-learning.ipynb)
|
126 |
+
- part 3: [packing and unpacking](https://github.com/arogozhnikov/einops/blob/master/docs/4-pack-and-unpack.ipynb)
|
127 |
+
- part 4: [improve pytorch code with einops](http://einops.rocks/pytorch-examples.html)
|
128 |
+
|
129 |
+
Kapil Sachdeva recorded a small [intro to einops](https://www.youtube.com/watch?v=xGy75Pjsqzo).
|
130 |
+
|
131 |
+
## API <a name="API"></a>
|
132 |
+
|
133 |
+
`einops` has a minimalistic yet powerful API.
|
134 |
+
|
135 |
+
Three core operations provided ([einops tutorial](https://github.com/arogozhnikov/einops/blob/master/docs/)
|
136 |
+
shows those cover stacking, reshape, transposition, squeeze/unsqueeze, repeat, tile, concatenate, view and numerous reductions)
|
137 |
+
|
138 |
+
```python
|
139 |
+
from einops import rearrange, reduce, repeat
|
140 |
+
# rearrange elements according to the pattern
|
141 |
+
output_tensor = rearrange(input_tensor, 't b c -> b c t')
|
142 |
+
# combine rearrangement and reduction
|
143 |
+
output_tensor = reduce(input_tensor, 'b c (h h2) (w w2) -> b h w c', 'mean', h2=2, w2=2)
|
144 |
+
# copy along a new axis
|
145 |
+
output_tensor = repeat(input_tensor, 'h w -> h w c', c=3)
|
146 |
+
```
|
147 |
+
|
148 |
+
Later additions to the family are `pack` and `unpack` functions (better than stack/split/concatenate):
|
149 |
+
|
150 |
+
```python
|
151 |
+
from einops import pack, unpack
|
152 |
+
# pack and unpack allow reversibly 'packing' multiple tensors into one.
|
153 |
+
# Packed tensors may be of different dimensionality:
|
154 |
+
packed, ps = pack([class_token_bc, image_tokens_bhwc, text_tokens_btc], 'b * c')
|
155 |
+
class_emb_bc, image_emb_bhwc, text_emb_btc = unpack(transformer(packed), ps, 'b * c')
|
156 |
+
```
|
157 |
+
|
158 |
+
Finally, einops provides einsum with a support of multi-lettered names:
|
159 |
+
|
160 |
+
```python
|
161 |
+
from einops import einsum, pack, unpack
|
162 |
+
# einsum is like ... einsum, generic and flexible dot-product
|
163 |
+
# but 1) axes can be multi-lettered 2) pattern goes last 3) works with multiple frameworks
|
164 |
+
C = einsum(A, B, 'b t1 head c, b t2 head c -> b head t1 t2')
|
165 |
+
```
|
166 |
+
|
167 |
+
### EinMix
|
168 |
+
|
169 |
+
`EinMix` is a generic linear layer, perfect for MLP Mixers and similar architectures.
|
170 |
+
|
171 |
+
### Layers
|
172 |
+
|
173 |
+
Einops provides layers (`einops` keeps a separate version for each framework) that reflect corresponding functions
|
174 |
+
|
175 |
+
```python
|
176 |
+
from einops.layers.torch import Rearrange, Reduce
|
177 |
+
from einops.layers.tensorflow import Rearrange, Reduce
|
178 |
+
from einops.layers.flax import Rearrange, Reduce
|
179 |
+
from einops.layers.paddle import Rearrange, Reduce
|
180 |
+
from einops.layers.chainer import Rearrange, Reduce
|
181 |
+
```
|
182 |
+
|
183 |
+
<details markdown="1">
|
184 |
+
<summary>Example of using layers within a pytorch model</summary>
|
185 |
+
Example given for pytorch, but code in other frameworks is almost identical
|
186 |
+
|
187 |
+
```python
|
188 |
+
from torch.nn import Sequential, Conv2d, MaxPool2d, Linear, ReLU
|
189 |
+
from einops.layers.torch import Rearrange
|
190 |
+
|
191 |
+
model = Sequential(
|
192 |
+
...,
|
193 |
+
Conv2d(6, 16, kernel_size=5),
|
194 |
+
MaxPool2d(kernel_size=2),
|
195 |
+
# flattening without need to write forward
|
196 |
+
Rearrange('b c h w -> b (c h w)'),
|
197 |
+
Linear(16*5*5, 120),
|
198 |
+
ReLU(),
|
199 |
+
Linear(120, 10),
|
200 |
+
)
|
201 |
+
```
|
202 |
+
|
203 |
+
No more flatten needed!
|
204 |
+
|
205 |
+
Additionally, torch users will benefit from layers as those are script-able and compile-able.
|
206 |
+
</details>
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
## Naming <a name="Naming"></a>
|
212 |
+
|
213 |
+
`einops` stands for Einstein-Inspired Notation for operations
|
214 |
+
(though "Einstein operations" is more attractive and easier to remember).
|
215 |
+
|
216 |
+
Notation was loosely inspired by Einstein summation (in particular by `numpy.einsum` operation).
|
217 |
+
|
218 |
+
## Why use `einops` notation?! <a name="Why-using-einops-notation"></a>
|
219 |
+
|
220 |
+
|
221 |
+
### Semantic information (being verbose in expectations)
|
222 |
+
|
223 |
+
```python
|
224 |
+
y = x.view(x.shape[0], -1)
|
225 |
+
y = rearrange(x, 'b c h w -> b (c h w)')
|
226 |
+
```
|
227 |
+
While these two lines are doing the same job in *some* context,
|
228 |
+
the second one provides information about the input and output.
|
229 |
+
In other words, `einops` focuses on interface: *what is the input and output*, not *how* the output is computed.
|
230 |
+
|
231 |
+
The next operation looks similar:
|
232 |
+
|
233 |
+
```python
|
234 |
+
y = rearrange(x, 'time c h w -> time (c h w)')
|
235 |
+
```
|
236 |
+
but it gives the reader a hint:
|
237 |
+
this is not an independent batch of images we are processing,
|
238 |
+
but rather a sequence (video).
|
239 |
+
|
240 |
+
Semantic information makes the code easier to read and maintain.
|
241 |
+
|
242 |
+
### Convenient checks
|
243 |
+
|
244 |
+
Reconsider the same example:
|
245 |
+
|
246 |
+
```python
|
247 |
+
y = x.view(x.shape[0], -1) # x: (batch, 256, 19, 19)
|
248 |
+
y = rearrange(x, 'b c h w -> b (c h w)')
|
249 |
+
```
|
250 |
+
The second line checks that the input has four dimensions,
|
251 |
+
but you can also specify particular dimensions.
|
252 |
+
That's opposed to just writing comments about shapes since comments don't prevent mistakes, not tested, and without code review tend to be outdated
|
253 |
+
```python
|
254 |
+
y = x.view(x.shape[0], -1) # x: (batch, 256, 19, 19)
|
255 |
+
y = rearrange(x, 'b c h w -> b (c h w)', c=256, h=19, w=19)
|
256 |
+
```
|
257 |
+
|
258 |
+
### Result is strictly determined
|
259 |
+
|
260 |
+
Below we have at least two ways to define the depth-to-space operation
|
261 |
+
```python
|
262 |
+
# depth-to-space
|
263 |
+
rearrange(x, 'b c (h h2) (w w2) -> b (c h2 w2) h w', h2=2, w2=2)
|
264 |
+
rearrange(x, 'b c (h h2) (w w2) -> b (h2 w2 c) h w', h2=2, w2=2)
|
265 |
+
```
|
266 |
+
There are at least four more ways to do it. Which one is used by the framework?
|
267 |
+
|
268 |
+
These details are ignored, since *usually* it makes no difference,
|
269 |
+
but it can make a big difference (e.g. if you use grouped convolutions in the next stage),
|
270 |
+
and you'd like to specify this in your code.
|
271 |
+
|
272 |
+
|
273 |
+
### Uniformity
|
274 |
+
|
275 |
+
```python
|
276 |
+
reduce(x, 'b c (x dx) -> b c x', 'max', dx=2)
|
277 |
+
reduce(x, 'b c (x dx) (y dy) -> b c x y', 'max', dx=2, dy=3)
|
278 |
+
reduce(x, 'b c (x dx) (y dy) (z dz) -> b c x y z', 'max', dx=2, dy=3, dz=4)
|
279 |
+
```
|
280 |
+
These examples demonstrated that we don't use separate operations for 1d/2d/3d pooling,
|
281 |
+
those are all defined in a uniform way.
|
282 |
+
|
283 |
+
Space-to-depth and depth-to space are defined in many frameworks but how about width-to-height? Here you go:
|
284 |
+
|
285 |
+
```python
|
286 |
+
rearrange(x, 'b c h (w w2) -> b c (h w2) w', w2=2)
|
287 |
+
```
|
288 |
+
|
289 |
+
### Framework independent behavior
|
290 |
+
|
291 |
+
Even simple functions are defined differently by different frameworks
|
292 |
+
|
293 |
+
```python
|
294 |
+
y = x.flatten() # or flatten(x)
|
295 |
+
```
|
296 |
+
|
297 |
+
Suppose `x`'s shape was `(3, 4, 5)`, then `y` has shape ...
|
298 |
+
|
299 |
+
- numpy, pytorch, cupy, chainer: `(60,)`
|
300 |
+
- keras, tensorflow.layers, gluon: `(3, 20)`
|
301 |
+
|
302 |
+
`einops` works the same way in all frameworks.
|
303 |
+
|
304 |
+
### Independence of framework terminology
|
305 |
+
|
306 |
+
Example: `tile` vs `repeat` causes lots of confusion. To copy image along width:
|
307 |
+
```python
|
308 |
+
np.tile(image, (1, 2)) # in numpy
|
309 |
+
image.repeat(1, 2) # pytorch's repeat ~ numpy's tile
|
310 |
+
```
|
311 |
+
|
312 |
+
With einops you don't need to decipher which axis was repeated:
|
313 |
+
```python
|
314 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in numpy
|
315 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in pytorch
|
316 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in tf
|
317 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in jax
|
318 |
+
repeat(image, 'h w -> h (tile w)', tile=2) # in cupy
|
319 |
+
... (etc.)
|
320 |
+
```
|
321 |
+
|
322 |
+
[Testimonials](https://einops.rocks/pages/testimonials/) provide users' perspective on the same question.
|
323 |
+
|
324 |
+
## Supported frameworks <a name="Supported-frameworks"></a>
|
325 |
+
|
326 |
+
Einops works with ...
|
327 |
+
|
328 |
+
- [numpy](http://www.numpy.org/)
|
329 |
+
- [pytorch](https://pytorch.org/)
|
330 |
+
- [tensorflow](https://www.tensorflow.org/)
|
331 |
+
- [jax](https://github.com/google/jax)
|
332 |
+
- [cupy](https://cupy.chainer.org/)
|
333 |
+
- [chainer](https://chainer.org/)
|
334 |
+
- [tf.keras](https://www.tensorflow.org/guide/keras)
|
335 |
+
- [flax](https://github.com/google/flax) (experimental)
|
336 |
+
- [paddle](https://github.com/PaddlePaddle/Paddle) (experimental)
|
337 |
+
- [oneflow](https://github.com/Oneflow-Inc/oneflow) (community)
|
338 |
+
- [tinygrad](https://github.com/tinygrad/tinygrad) (community)
|
339 |
+
|
340 |
+
Additionally, starting from einops 0.7.0 einops can be used with any framework that supports [Python array API standard](https://data-apis.org/array-api/latest/API_specification/index.html)
|
341 |
+
|
342 |
+
## Citing einops <a name="Citing"></a>
|
343 |
+
|
344 |
+
Please use the following bibtex record
|
345 |
+
|
346 |
+
```text
|
347 |
+
@inproceedings{
|
348 |
+
rogozhnikov2022einops,
|
349 |
+
title={Einops: Clear and Reliable Tensor Manipulations with Einstein-like Notation},
|
350 |
+
author={Alex Rogozhnikov},
|
351 |
+
booktitle={International Conference on Learning Representations},
|
352 |
+
year={2022},
|
353 |
+
url={https://openreview.net/forum?id=oapKSVM2bcj}
|
354 |
+
}
|
355 |
+
```
|
356 |
+
|
357 |
+
|
358 |
+
## Supported python versions
|
359 |
+
|
360 |
+
`einops` works with python 3.8 or later.
|
.cache/pip/http-v2/6/4/6/e/5/646e5ac002367fdec50dea7e9d47599302e4790e77000da2571c33e8
ADDED
Binary file (1.11 kB). View file
|
|
.cache/pip/http-v2/6/6/6/2/c/6662c3d76e9c2f7783002d2625d92517b2c4b994197bd6d5da887f1e
ADDED
Binary file (1.15 kB). View file
|
|
.cache/pip/http-v2/6/6/e/c/7/66ec76a7b6ed4081044f5c7821af293b63c17bc2ac523ff93d5ca7d5
ADDED
Binary file (1.82 kB). View file
|
|
.cache/pip/http-v2/8/7/3/3/b/8733b40e52a573d98e55534434c69a8765ca0cd71166704a3188ddb3.body
ADDED
Binary file (8.98 kB). View file
|
|
.cache/pip/http-v2/9/f/e/d/0/9fed0241b6f6a060996284779065d8ed334b4bc0892996ee7a865868
ADDED
Binary file (1.17 kB). View file
|
|
.cache/pip/http-v2/9/f/e/d/0/9fed0241b6f6a060996284779065d8ed334b4bc0892996ee7a865868.body
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: jupyter
|
3 |
+
Version: 1.1.1
|
4 |
+
Summary: Jupyter metapackage. Install all the Jupyter components in one go.
|
5 |
+
Home-page: https://jupyter.org
|
6 |
+
Author: Jupyter Development Team
|
7 |
+
Author-email: jupyter@googlegroups.org
|
8 |
+
License: BSD
|
9 |
+
Classifier: Intended Audience :: Developers
|
10 |
+
Classifier: Intended Audience :: System Administrators
|
11 |
+
Classifier: Intended Audience :: Science/Research
|
12 |
+
Classifier: License :: OSI Approved :: BSD License
|
13 |
+
Classifier: Programming Language :: Python
|
14 |
+
Classifier: Programming Language :: Python :: 3
|
15 |
+
Classifier: Programming Language :: Python :: 3.6
|
16 |
+
Classifier: Programming Language :: Python :: 3.7
|
17 |
+
Classifier: Programming Language :: Python :: 3.8
|
18 |
+
Classifier: Programming Language :: Python :: 3.9
|
19 |
+
Description-Content-Type: text/markdown
|
20 |
+
License-File: LICENSE
|
21 |
+
Requires-Dist: notebook
|
22 |
+
Requires-Dist: jupyter-console
|
23 |
+
Requires-Dist: nbconvert
|
24 |
+
Requires-Dist: ipykernel
|
25 |
+
Requires-Dist: ipywidgets
|
26 |
+
Requires-Dist: jupyterlab
|
27 |
+
|
28 |
+
# Jupyter metapackage
|
29 |
+
|
30 |
+
Find more information on [the Jupyter homepage](https://jupyter.org).
|
31 |
+
|
32 |
+
## A default installation of most common Jupyter packages
|
33 |
+
|
34 |
+
`pip install jupyter` installs the Jupyter Notebook, JupyterLab, and the IPython Kernel.
|
35 |
+
|
36 |
+
This is an empty metapackage for user convenience,
|
37 |
+
only expressing dependencies on multiple Jupyter packages.
|
38 |
+
`jupyter` should not be used as a dependency for any packages.
|
39 |
+
|
40 |
+
For more efficient installation of what you need,
|
41 |
+
all Jupyter components installed by `pip install jupyter` can be installed separately.
|
42 |
+
For example:
|
43 |
+
|
44 |
+
- `notebook` - Jupyter Notebook
|
45 |
+
- `jupyterlab` - JupyterLab (added to metapackage v1.1)
|
46 |
+
- `ipython` - IPython (terminal)
|
47 |
+
- `ipykernel` - IPython Kernel for Jupyter
|
48 |
+
- `jupyter-console` - terminal Jupyter client
|
49 |
+
- `nbconvert` - convert notebooks between formats
|
50 |
+
- `ipywidgets` - interactive widgets package for IPython
|
51 |
+
|
52 |
+
No longer included in `pip install jupyter`, but still supported:
|
53 |
+
|
54 |
+
- `qtconsole` - Qt Console (removed in metapackage v1.1)
|
.cache/pip/http-v2/a/1/9/5/3/a19537d3cf37c122db841d6fe4cd322bc10d1a558bb00d146b85cb9a
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/a/6/6/7/4/a6674e44f8dbb270324765d1fb568b86858877aed299a2428f81e802
ADDED
Binary file (1.81 kB). View file
|
|
.cache/pip/http-v2/a/8/1/3/d/a813d38208b26d1643cfecf26bd5ddeb869c95933e4bf304b8f6f1bb
ADDED
Binary file (1.19 kB). View file
|
|
.cache/pip/http-v2/a/b/7/2/8/ab7286aff652f0ea3cc68322991122267ea675cbb86a9b1ccfe4ace3
ADDED
Binary file (1.19 kB). View file
|
|
.cache/pip/http-v2/a/b/7/2/8/ab7286aff652f0ea3cc68322991122267ea675cbb86a9b1ccfe4ace3.body
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: aiohttp
|
3 |
+
Version: 3.10.6
|
4 |
+
Summary: Async http client/server framework (asyncio)
|
5 |
+
Home-page: https://github.com/aio-libs/aiohttp
|
6 |
+
Maintainer: aiohttp team <team@aiohttp.org>
|
7 |
+
Maintainer-email: team@aiohttp.org
|
8 |
+
License: Apache 2
|
9 |
+
Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
|
10 |
+
Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
|
11 |
+
Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
|
12 |
+
Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiohttp
|
13 |
+
Project-URL: Docs: Changelog, https://docs.aiohttp.org/en/stable/changes.html
|
14 |
+
Project-URL: Docs: RTD, https://docs.aiohttp.org
|
15 |
+
Project-URL: GitHub: issues, https://github.com/aio-libs/aiohttp/issues
|
16 |
+
Project-URL: GitHub: repo, https://github.com/aio-libs/aiohttp
|
17 |
+
Classifier: Development Status :: 5 - Production/Stable
|
18 |
+
Classifier: Framework :: AsyncIO
|
19 |
+
Classifier: Intended Audience :: Developers
|
20 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
21 |
+
Classifier: Operating System :: POSIX
|
22 |
+
Classifier: Operating System :: MacOS :: MacOS X
|
23 |
+
Classifier: Operating System :: Microsoft :: Windows
|
24 |
+
Classifier: Programming Language :: Python
|
25 |
+
Classifier: Programming Language :: Python :: 3
|
26 |
+
Classifier: Programming Language :: Python :: 3.8
|
27 |
+
Classifier: Programming Language :: Python :: 3.9
|
28 |
+
Classifier: Programming Language :: Python :: 3.10
|
29 |
+
Classifier: Programming Language :: Python :: 3.11
|
30 |
+
Classifier: Programming Language :: Python :: 3.12
|
31 |
+
Classifier: Programming Language :: Python :: 3.13
|
32 |
+
Classifier: Topic :: Internet :: WWW/HTTP
|
33 |
+
Requires-Python: >=3.8
|
34 |
+
Description-Content-Type: text/x-rst
|
35 |
+
License-File: LICENSE.txt
|
36 |
+
Requires-Dist: aiohappyeyeballs >=2.3.0
|
37 |
+
Requires-Dist: aiosignal >=1.1.2
|
38 |
+
Requires-Dist: attrs >=17.3.0
|
39 |
+
Requires-Dist: frozenlist >=1.1.1
|
40 |
+
Requires-Dist: multidict <7.0,>=4.5
|
41 |
+
Requires-Dist: yarl <2.0,>=1.12.0
|
42 |
+
Requires-Dist: async-timeout <5.0,>=4.0 ; python_version < "3.11"
|
43 |
+
Provides-Extra: speedups
|
44 |
+
Requires-Dist: brotlicffi ; (platform_python_implementation != "CPython") and extra == 'speedups'
|
45 |
+
Requires-Dist: Brotli ; (platform_python_implementation == "CPython") and extra == 'speedups'
|
46 |
+
Requires-Dist: aiodns >=3.2.0 ; (sys_platform == "linux" or sys_platform == "darwin") and extra == 'speedups'
|
47 |
+
|
48 |
+
==================================
|
49 |
+
Async http client/server framework
|
50 |
+
==================================
|
51 |
+
|
52 |
+
.. image:: https://raw.githubusercontent.com/aio-libs/aiohttp/master/docs/aiohttp-plain.svg
|
53 |
+
:height: 64px
|
54 |
+
:width: 64px
|
55 |
+
:alt: aiohttp logo
|
56 |
+
|
57 |
+
|
|
58 |
+
|
59 |
+
.. image:: https://github.com/aio-libs/aiohttp/workflows/CI/badge.svg
|
60 |
+
:target: https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
|
61 |
+
:alt: GitHub Actions status for master branch
|
62 |
+
|
63 |
+
.. image:: https://codecov.io/gh/aio-libs/aiohttp/branch/master/graph/badge.svg
|
64 |
+
:target: https://codecov.io/gh/aio-libs/aiohttp
|
65 |
+
:alt: codecov.io status for master branch
|
66 |
+
|
67 |
+
.. image:: https://badge.fury.io/py/aiohttp.svg
|
68 |
+
:target: https://pypi.org/project/aiohttp
|
69 |
+
:alt: Latest PyPI package version
|
70 |
+
|
71 |
+
.. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest
|
72 |
+
:target: https://docs.aiohttp.org/
|
73 |
+
:alt: Latest Read The Docs
|
74 |
+
|
75 |
+
.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
76 |
+
:target: https://matrix.to/#/%23aio-libs:matrix.org
|
77 |
+
:alt: Matrix Room — #aio-libs:matrix.org
|
78 |
+
|
79 |
+
.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
80 |
+
:target: https://matrix.to/#/%23aio-libs-space:matrix.org
|
81 |
+
:alt: Matrix Space — #aio-libs-space:matrix.org
|
82 |
+
|
83 |
+
|
84 |
+
Key Features
|
85 |
+
============
|
86 |
+
|
87 |
+
- Supports both client and server side of HTTP protocol.
|
88 |
+
- Supports both client and server Web-Sockets out-of-the-box and avoids
|
89 |
+
Callback Hell.
|
90 |
+
- Provides Web-server with middleware and pluggable routing.
|
91 |
+
|
92 |
+
|
93 |
+
Getting started
|
94 |
+
===============
|
95 |
+
|
96 |
+
Client
|
97 |
+
------
|
98 |
+
|
99 |
+
To get something from the web:
|
100 |
+
|
101 |
+
.. code-block:: python
|
102 |
+
|
103 |
+
import aiohttp
|
104 |
+
import asyncio
|
105 |
+
|
106 |
+
async def main():
|
107 |
+
|
108 |
+
async with aiohttp.ClientSession() as session:
|
109 |
+
async with session.get('http://python.org') as response:
|
110 |
+
|
111 |
+
print("Status:", response.status)
|
112 |
+
print("Content-type:", response.headers['content-type'])
|
113 |
+
|
114 |
+
html = await response.text()
|
115 |
+
print("Body:", html[:15], "...")
|
116 |
+
|
117 |
+
asyncio.run(main())
|
118 |
+
|
119 |
+
This prints:
|
120 |
+
|
121 |
+
.. code-block::
|
122 |
+
|
123 |
+
Status: 200
|
124 |
+
Content-type: text/html; charset=utf-8
|
125 |
+
Body: <!doctype html> ...
|
126 |
+
|
127 |
+
Coming from `requests <https://requests.readthedocs.io/>`_ ? Read `why we need so many lines <https://aiohttp.readthedocs.io/en/latest/http_request_lifecycle.html>`_.
|
128 |
+
|
129 |
+
Server
|
130 |
+
------
|
131 |
+
|
132 |
+
An example using a simple server:
|
133 |
+
|
134 |
+
.. code-block:: python
|
135 |
+
|
136 |
+
# examples/server_simple.py
|
137 |
+
from aiohttp import web
|
138 |
+
|
139 |
+
async def handle(request):
|
140 |
+
name = request.match_info.get('name', "Anonymous")
|
141 |
+
text = "Hello, " + name
|
142 |
+
return web.Response(text=text)
|
143 |
+
|
144 |
+
async def wshandle(request):
|
145 |
+
ws = web.WebSocketResponse()
|
146 |
+
await ws.prepare(request)
|
147 |
+
|
148 |
+
async for msg in ws:
|
149 |
+
if msg.type == web.WSMsgType.text:
|
150 |
+
await ws.send_str("Hello, {}".format(msg.data))
|
151 |
+
elif msg.type == web.WSMsgType.binary:
|
152 |
+
await ws.send_bytes(msg.data)
|
153 |
+
elif msg.type == web.WSMsgType.close:
|
154 |
+
break
|
155 |
+
|
156 |
+
return ws
|
157 |
+
|
158 |
+
|
159 |
+
app = web.Application()
|
160 |
+
app.add_routes([web.get('/', handle),
|
161 |
+
web.get('/echo', wshandle),
|
162 |
+
web.get('/{name}', handle)])
|
163 |
+
|
164 |
+
if __name__ == '__main__':
|
165 |
+
web.run_app(app)
|
166 |
+
|
167 |
+
|
168 |
+
Documentation
|
169 |
+
=============
|
170 |
+
|
171 |
+
https://aiohttp.readthedocs.io/
|
172 |
+
|
173 |
+
|
174 |
+
Demos
|
175 |
+
=====
|
176 |
+
|
177 |
+
https://github.com/aio-libs/aiohttp-demos
|
178 |
+
|
179 |
+
|
180 |
+
External links
|
181 |
+
==============
|
182 |
+
|
183 |
+
* `Third party libraries
|
184 |
+
<http://aiohttp.readthedocs.io/en/latest/third_party.html>`_
|
185 |
+
* `Built with aiohttp
|
186 |
+
<http://aiohttp.readthedocs.io/en/latest/built_with.html>`_
|
187 |
+
* `Powered by aiohttp
|
188 |
+
<http://aiohttp.readthedocs.io/en/latest/powered_by.html>`_
|
189 |
+
|
190 |
+
Feel free to make a Pull Request for adding your link to these pages!
|
191 |
+
|
192 |
+
|
193 |
+
Communication channels
|
194 |
+
======================
|
195 |
+
|
196 |
+
*aio-libs Discussions*: https://github.com/aio-libs/aiohttp/discussions
|
197 |
+
|
198 |
+
*Matrix*: `#aio-libs:matrix.org <https://matrix.to/#/#aio-libs:matrix.org>`_
|
199 |
+
|
200 |
+
We support `Stack Overflow
|
201 |
+
<https://stackoverflow.com/questions/tagged/aiohttp>`_.
|
202 |
+
Please add *aiohttp* tag to your question there.
|
203 |
+
|
204 |
+
Requirements
|
205 |
+
============
|
206 |
+
|
207 |
+
- attrs_
|
208 |
+
- multidict_
|
209 |
+
- yarl_
|
210 |
+
- frozenlist_
|
211 |
+
|
212 |
+
Optionally you may install the aiodns_ library (highly recommended for sake of speed).
|
213 |
+
|
214 |
+
.. _aiodns: https://pypi.python.org/pypi/aiodns
|
215 |
+
.. _attrs: https://github.com/python-attrs/attrs
|
216 |
+
.. _multidict: https://pypi.python.org/pypi/multidict
|
217 |
+
.. _frozenlist: https://pypi.org/project/frozenlist/
|
218 |
+
.. _yarl: https://pypi.python.org/pypi/yarl
|
219 |
+
.. _async-timeout: https://pypi.python.org/pypi/async_timeout
|
220 |
+
|
221 |
+
License
|
222 |
+
=======
|
223 |
+
|
224 |
+
``aiohttp`` is offered under the Apache 2 license.
|
225 |
+
|
226 |
+
|
227 |
+
Keepsafe
|
228 |
+
========
|
229 |
+
|
230 |
+
The aiohttp community would like to thank Keepsafe
|
231 |
+
(https://www.getkeepsafe.com) for its support in the early days of
|
232 |
+
the project.
|
233 |
+
|
234 |
+
|
235 |
+
Source code
|
236 |
+
===========
|
237 |
+
|
238 |
+
The latest developer version is available in a GitHub repository:
|
239 |
+
https://github.com/aio-libs/aiohttp
|
240 |
+
|
241 |
+
Benchmarks
|
242 |
+
==========
|
243 |
+
|
244 |
+
If you are interested in efficiency, the AsyncIO community maintains a
|
245 |
+
list of benchmarks on the official wiki:
|
246 |
+
https://github.com/python/asyncio/wiki/Benchmarks
|