Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency Package Version 지정 필요 #389

Open
hexists opened this issue Jan 4, 2022 · 6 comments
Open

Dependency Package Version 지정 필요 #389

hexists opened this issue Jan 4, 2022 · 6 comments

Comments

@hexists
Copy link
Contributor

hexists commented Jan 4, 2022

Dependency Package Version 지정 필요

  • 대부분의 이슈들이 dependency package의 version과 관련된 내용들이 많음
  • requirements.txt에 현재 실행 가능한 package version 지정 필요
  • 현재는 최소 버전만 지정되어 있음, 최대 버전 지정 필요
ASIS: JPype1>=0.7.0
TOBE: JPype1>=0.7.0, <0.?.?"
@combacsa
Copy link
Contributor

combacsa commented Jan 5, 2022

현재 JPype1 의 경우엔 1.3.0 을 써야만 하게 하는 게 좋지 않나 싶고 (단, Python 2.7 지원을 끊는다는 전제) numpyJPype1의 숨겨진 dependency '였'지만 최신 버전에서는 없이도 작동하는 것으로 생각되어 슬슬 없애는 방향으로 가도 좋지 않을까 생각됩니다.

@combacsa
Copy link
Contributor

combacsa commented Jan 5, 2022

#284 의 논의와도 함께 묶어서 얘기하는 게 좋겠네요.

@hexists
Copy link
Contributor Author

hexists commented Jan 5, 2022

@combacsa
좋은 내용을 @minhoryang 가 먼저 고민하고 계셨네요^^
같이 이야기해보면 좋을 것 같습니다.

python2 지원 종료도 이렇게 활발해진 틈을 타서 정리하면 좋겠네요 ㅎ

@combacsa
Copy link
Contributor

combacsa commented Jan 9, 2022

(Intel Mac) Python 2.7 에서는 JPype 1.3, 1.2 버전대가 전부 설치 불가능하군요. print() statement 의 영향 같네요.

Python 2, JPype1 0.7.0, pip uninstall numpy 이후 아래와 같이 진행해 보았습니다.

(venv) ➜  bin ipython
Python 2.7.16 (default, Sep  6 2021, 07:39:44)
Type "copyright", "credits" or "license" for more information.

IPython 5.10.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from konlpy import tag

In [2]: kkma = tag.Kkma()

In [4]: from konlpy.utils import pprint

In [5]: pprint(kkma.pos(u"Python 2.7에서도 잘 되나?"))
[('Python', 'OL'),
 ('2.7', 'NR'),
 (에서, 'JKM'),
 (도, 'JX'),
 (잘, 'MAG'),
 (되, 'VV'),
 (나, 'ECE'),
 ('?', 'SF')]

실험해보니 JPype1 의 경우 Python 2.7 에서는 0.7.0, 0.7.1 이렇게 2가지 버전만 사용 가능하고, 그보다 높은 버전은 모두 사용할 수 없는 것으로 보입니다. 조금 고민을 해 보자면 0.6.x 을 Python 2.7 을 지원하는 마지막 버전으로 하고, 0.7 부터 Python 2.7 support 를 drop 하는 것이 어떨까 싶네요.

MeCab 의 경우 Python 2.7 에서는 현재 사용이 잘 안 되는데(Type Hinting code 영향) 관련된 코드가 동작하도록 수정하는 건 어렵지 않을 거 같습니다.

@hexists
Copy link
Contributor Author

hexists commented Jan 9, 2022

@combacsa
많은 테스트를 해주셨네요. 감사합니다!

python2.7에 대해서는 0.7.1을 마지막 지원 버전으로 하는게 어떨까요?
0.6.3 (2018-04-03) 이후 0.7.1 (2019-12-16)까지 코드 변경 내용도 많고, 개발 시점도 차이가 많이나서 지원이 가능한 가장 최근 버전을 명시해두면 좋을 것 같습니다. jpype1 changelog
python2.7 환경에서 konlpy 설치와 관련된 예제들도 대부분 0.7.x를 기준으로 정리된 것도 고려할만한 부분 같습니다^^;

가장 좋은 것은 python2.7을 deprecated 하는 방향이 좋겠습니다만, 한번에 없앨 수 없으니 @combacsa 가 정리해주신대로 python2.7 지원 버전을 명시해주는 선에서 정리해도 좋을 것 같습니다.

의견 주세요~

to. @minhoryang
그리고, 저는 이 버전이 정리되면 requirements.txt에 버전을 명시하는 것을 생각했는데, 그렇게 작업하면 될까요?

@minhoryang
Copy link
Member

@hexists @combacsa 네 그렇습니다!! 바로 명시하면 될 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants