๊ธฐ์
์ด๊ฒ์ด ์ผ์์์ ๊ด์ฐฐ ๋์๊ธฐ ๋๋ฌธ์ ํน์ ํจํค์ง์ ๋ํด ๋
ผ์ ํ ๊ฒ์
๋๋ค (HypothesisWorks / hypothesis # 2113) : ์ต๊ทผ์ attrs>=16.0
์ ๋ํ install_requires
์ข
์์ฑ์ attrs>=19.2
๋ก ์
๋ฐ์ดํธํ์ต๋๋ค. ์ต์ ๋ฒ์ ์ ๊ฐ์ค์ ์ค์นํ๋ฉด ์ฌ์ฉ์์ ์์ฑ๋ ์
๋ฐ์ดํธ๋๋ค๋ ๊ทผ๊ฑฐ๊ฐ๋ฉ๋๋ค.
pip install hypothesis
๋ ์ค์ ๋ก ์๋ํฉ๋๋ค.pip install pytest hypothesis
๋ ์ด์ ๋ฒ์ ์ attrs๊ฐ ์์ง ์ค์น๋์ง ์์ ๊ฒฝ์ฐ ์๋ํฉ๋๋ค.์ฌ๋ฌ ํจํค์ง๊ฐ ์ค์น ๋ช ๋ น์ ๋์ด๋๋ฉด ์ด๋ฏธ ์ค์น๋ ์ข ์์ฑ์ ํธํ์ฑ์ ๋์ด๋ ์ฒซ ๋ฒ์งธ ํจํค์ง์ ๋ํด์๋ง ํ๊ฐ๋๊ณ ์ดํ ํจํค์ง์ ๊ฒฝ์ฐ ์ข ์์ฑ ๋ฒ์ ์ด ์๋ ์กด์ฌ ์ฌ๋ถ๋ฅผ ํ์ธํ๋ ๊ฒ์ฒ๋ผ ๋ณด์ ๋๋ค. ์ด๋ ์๊ตฌ ์ฌํญ ํ์ผ ์ฌ์ฉ์๋ ์ํฅ์์ค๋๋ค.
์์๋๋ ํ๋
์ค์น ๋ชฉ๋ก์ ์๊ฑฐ๋ ์ด๋ฏธ์๋ ๋ค๋ฅธ ํจํค์ง์ ๊ด๊ณ์์ด pip install hypothesis
๋ ํธํ๋๋ ํจํค์ง ์ธํธ๋ฅผ ์ค์นํ๊ฑฐ๋ ์ค๋ฅ ๋ฉ์์ง๋ฅผ ํ์ํด์ผํฉ๋๋ค. ์ด๋ ์์๋ ํ๊ฒฝ์ด ์๋๋๋ค.
์ฌํ ๋ฐฉ๋ฒ
[tox]
skipsdist=True
[testenv]
deps =
pip
attrs==19.1.0
commands =
## Execute the problematic install command
# pip install hypothesis # works
# pip install hypothesis pytest # works
pip install pytest hypothesis # fails, as does `pip install attrs hypothesis` !
# pip install --upgrade pytest hypothesis # works
## Check that the installed packages are compatible
python -c "import hypothesis"
๊ทธ๋ฐ ๋ค์ tox --recreate
๋ฅผ ์คํํ์ฌ ๊ฐ์ ํ๊ฒฝ์ ๋ค์ ๋ง๋ค๊ณ ๋ช
๋ น์ ์คํํฉ๋๋ค.
(๊ทธ๋ฆฌ๊ณ pip
์์
ํ๋ ๋ชจ๋ ๋ถ๋ค ๋๋ถ์ ๋งค์ฐ ๊ฐ์น ์๊ณ ๊ฐ์ฌํฉ๋๋ค ๐)
์ธ๋ถ ์ฌํญ๊ณผ ์ฌ์ด ์ฌํ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค! ๋งค์ฐ ๊ฐ์ฌ!
์ด๊ฒ์ ๊ธฐ๋ณธ์ ์ผ๋ก # 988์ ๋๋ค. ๊ฐ๋ตํ ์์ฝ :
ERROR
์ ํจ๊ป ๋นจ๊ฐ์์ผ๋ก ๋ฉ์์ง๋ฅผ ์ธ์ํฉ๋๋ค.
ERROR: hypothesis 4.38.2 has requirement attrs>=19.2.0, but you'll have attrs 19.1.0 which is incompatible.
pip check
๋ฅผ CI์ ์ผ๋ถ๋ก ์ฌ์ฉํ์ฌ pip๊ฐ ์ด๋ฆฌ์์ ์ผ์ํ์ง ์์๋์ง ํ์ธํ์ญ์์ค.pip-tools
(Pi๋ฅผ ๋ ๋์ ๋ฆฌ์กธ๋ฒ๋ก ๋ํ) ๋๋ pipenv
( pip-tools
) ๋๋ poetry
(์์ฒด ๋ฆฌ์กธ๋ฒ๊ฐ ์์) ์ฌ์ฉ pip์ ๋ฆฌ์กธ๋ฒ์ ํน์ง.์, ์๊ฒ ์ต๋๋ค! ๋ฌธ์ ์ ๋ง์ง๋ง ๋ช ํ์ด์ง๋ฅผ ํ์ธํ์ง๋ง ๊ทธ ์ด์ ์ ๋ฌธ์ ๋ ์์ต๋๋ค. ์ถ๊ฐ ์ ๋ณด๊ฐ ์๋ค๊ณ ์๊ฐํ๋ฏ๋ก์ด ๋ฌธ์ ๋ฅผ ์ค๋ณต์ผ๋ก ์ข ๋ฃ ํ ์ ์๋์?
# 988์ ์ค๋ณต์ผ๋ก ๋ซ์ต๋๋ค.