[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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`

--
Added file: https://bugs.python.org/file50423/OnPaste.20211103-202914.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 "/home/mgsrizqi/.pyenv/versions/3.10.0/lib/python3.10/getopt.py", line 4
function (including the special meanings of arguments of the form `-'
^
SyntaxError: unterminated string literal (detected at line 4)
>>>
```

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 python 3.10.0
2. Type `import getopt`
3. The error shows up

I already tried python 3.9.7 and it's still working as expected.

--
components: Library (Lib)
files: OnPaste.20211103-125049.png
messages: 405582
nosy: rizqirizqi23
priority: normal
severity: normal
status: open
title: Error on importing getopt
type: crash
versions: Python 3.10
Added file: https://bugs.python.org/file50422/OnPaste.20211103-125049.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com