[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
Mgs M Rizqi Fadhlurrahman added the comment: OK, thank you for the answers. Sorry for the false alarm. -- ___ Python tracker ___

[issue45698] Error on importing getopt

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this, since I don't think it's a bug in python, but rather in the user's setup. -- resolution: -> works for me stage: -> resolved status: open -> closed type: crash -> behavior ___ Python

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
Mgs M Rizqi Fadhlurrahman added the comment: @eric.smith Wow you're right! Somehow the """ got deleted. (screenshot attached) It can run normally now after I added the """ back. More details: I'm using Ubuntu 18.04.2. I installed python 3.10.0 using pyenv by running: `pyenv install 3.10.0`

[issue45698] Error on importing getopt

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: I'm guessing the first line of getopt.py got deleted somehow. @rizqirizqi23: what do the first 10 lines of /home/mgsrizqi/.pyenv/versions/3.10.0/lib/python3.10/getopt.py look like? How did you install python? -- nosy: +eric.smith

[issue45698] Error on importing getopt

2021-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks strange. The line containing "function (including the special meanings of arguments of the form `-'" is a part of a multiline string literal, so there should not be such error. And it is line 4, not line 3 as in your traceback. --

[issue45698] Error on importing getopt

2021-11-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Could you please provide more details regarding the OS, whether you compiled Python yourself and the env settings you used ? Thanks, -- Marc-Andre Lemburg eGenix.com -- nosy: +lemburg ___ Python tracker

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
Mgs M Rizqi Fadhlurrahman added the comment: Here: ``` Python 3.10.0 (default, Oct 30 2021, 15:16:25) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import getopt Traceback (most recent call last): File "", line 1, in File

[issue45698] Error on importing getopt

2021-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide an output as a text? -- ___ Python tracker ___ ___ Python-bugs-list

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
Mgs M Rizqi Fadhlurrahman added the comment: Screenshot attached https://bugs.python.org/file50422/OnPaste.20211103-125049.png -- ___ Python tracker ___

[issue45698] Error on importing getopt

2021-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What error? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
New submission from Mgs M Rizqi Fadhlurrahman : It looks like there is a breaking change related to python 3.10.0 implementation that impacted getopt package. https://docs.python.org/3/library/getopt.html https://github.com/python/cpython/blob/3.10/Lib/getopt.py Steps to reproduce: 1. Run