Python-future: `backports` ๋ฐ `moves` ํŒจํ‚ค์ง€ ๊ฐ€์ ธ์˜ค๊ธฐ, ์‚ฌ์šฉ์ž ํด๋”์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ(์˜ˆ: `test.py`),

์— ๋งŒ๋“  2017๋…„ 01์›” 28์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: PythonCharmers/python-future

๋ฏธ๋ž˜ ๋ฒ„์ „: 0.16.0
ํŒŒ์ด์ฌ ๋ฒ„์ „: 3.5

future.moves ๋˜๋Š” future.backports ํŒจํ‚ค์ง€๋ฅผ ๊ฐ€์ ธ์˜ฌ ๋•Œ ์ด๋ฆ„๋ณ„๋กœ ๋‹ค์–‘ํ•œ ๋ชจ๋“ˆ ์„ ๊ฐ€์ ธ์˜ค๋ ค๊ณ  ์‹œ๋„ํ•˜๋Š” import_top_level_modules() ๋ฅผ ํ˜ธ์ถœํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์‚ฌ์šฉ์ž ํ”„๋กœ์ ํŠธ์— test.py ๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ์—๋„ ์˜ˆ๊ธฐ์น˜ ์•Š๊ฒŒ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.

์•”์‹œ๋œ ์ปค๋ฐ‹ 264f9bcdf0์˜ ๋ฉ”์‹œ์ง€์— ๋”ฐ๋ฅด๋ฉด "ํ…Œ์ŠคํŠธ ๋Ÿฌ๋„ˆ๊ฐ€ Py3์˜ travis-ci์—์„œ ์ž‘์—…ํ•˜๊ฒŒ ํ•˜๊ธฐ import_top_level_modules() ๋ฉ”์„œ๋“œ๊ฐ€ ๋„์ž…๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
์ด ์ฝ”๋“œ๋ฅผ ํ…Œ์ŠคํŠธ ํŒจํ‚ค์ง€์— ๋ฐฐ์น˜ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์ง€ ์•Š์„๊นŒ์š”?

0.19 bug

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋‚˜๋Š” python3๊ณผ ํ•จ๊ป˜ apache_beam์„ ์‚ฌ์šฉํ•  ๋•Œ ์ด๊ฒƒ์— ๋ฌผ๋ ธ์Šต๋‹ˆ๋‹ค.

์žฌํ˜„ํ•˜๋ ค๋ฉด:

echo "raise NotImplementedError('This test.py file should not be touched')" >> ./test.py
pip install apache_beam
python -c "import apache_beam as beam"

import_top_level_modules ์—์„œ ํ˜ธ์ถœ๋˜๋Š” exclude_local_folder_imports ๋Œ€ํ•œ ์ฃผ์„์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

(This was need prior to v0.16.0 because the presence of a configparser
    folder would otherwise have prevented setuptools from running on Py3. Maybe
    it's not needed any more?)

๊ทธ๊ฒƒ ์—†์ด๋Š” ์ž˜ ์ž‘๋™ํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์•„๋งˆ๋„ ์‹œ๊ฐ„์ž…๋‹ˆ๋‹ค.

๋ชจ๋“  4 ๋Œ“๊ธ€

์ด๊ฒƒ์— ๋ฌผ๋ฆฐ ๊ฒƒ๋ฟ์ž…๋‹ˆ๋‹ค.
https://bitbucket.org/pyglet/pyglet/issues/117/pyglet-produces-spurious-imports

์ด๊ฒƒ์— ๋Œ€ํ•œ ์–ด๋–ค ์—…๋ฐ์ดํŠธ?

๋‚˜๋Š” python3๊ณผ ํ•จ๊ป˜ apache_beam์„ ์‚ฌ์šฉํ•  ๋•Œ ์ด๊ฒƒ์— ๋ฌผ๋ ธ์Šต๋‹ˆ๋‹ค.

์žฌํ˜„ํ•˜๋ ค๋ฉด:

echo "raise NotImplementedError('This test.py file should not be touched')" >> ./test.py
pip install apache_beam
python -c "import apache_beam as beam"

import_top_level_modules ์—์„œ ํ˜ธ์ถœ๋˜๋Š” exclude_local_folder_imports ๋Œ€ํ•œ ์ฃผ์„์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

(This was need prior to v0.16.0 because the presence of a configparser
    folder would otherwise have prevented setuptools from running on Py3. Maybe
    it's not needed any more?)

๊ทธ๊ฒƒ ์—†์ด๋Š” ์ž˜ ์ž‘๋™ํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์•„๋งˆ๋„ ์‹œ๊ฐ„์ž…๋‹ˆ๋‹ค.

๋˜ํ•œ ์ด ํŒจํ‚ค์ง€์— ์˜์กดํ•˜๋Š” ๋Œ€์‹œ ํ”Œ๋กœํŒ… ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋™์•ˆ ๋ฌผ๋ ธ์Šต๋‹ˆ๋‹ค. ๊ฐœ๋ฐœ ์ค‘์— ํŒจํ‚ค์ง€๋ฅผ ์‹คํ—˜ํ•˜๊ธฐ ์œ„ํ•ด ๋น ๋ฅด๊ณ  ๋”๋Ÿฌ์šด test.py ๊ฐ€ ๋ฐœ์ƒํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋งค์šฐ ์ด์ƒํ•œ ๋™์ž‘์ด ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ๋กœ์ปฌ ํ…Œ์ŠคํŠธ๋ฅผ ์ˆ˜ํ–‰ํ•  ๋•Œ๋งˆ๋‹ค ์‹คํ–‰ ์ค‘์ด๊ณ  ์ž๋™์œผ๋กœ ์ค‘์š”ํ•œ ์ƒํƒœ๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋‚˜ํƒ€๋‚ฌ์Šต๋‹ˆ๋‹ค. ๋‚ด ์•ฑ์˜. ๋‚˜๋Š” ์ด๋Ÿฐ ์กฐ์šฉํ•œ ๋ฌธ์ œ๋ฅผ ๋””๋ฒ„๊น…ํ•˜๋Š” ๊ฒƒ์„ ์ •๋ง ์‹ซ์–ดํ•ฉ๋‹ˆ๋‹ค. ์ด ๋™์ž‘์„ ์ œ๊ฑฐํ•˜๋Š” ๊ฒƒ์„ ์šฐ์„ ์ ์œผ๋กœ ๊ณ ๋ คํ•˜์‹ญ์‹œ์˜ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰