[issue29693] DeprecationWarning/SyntaxError in test_import

2017-03-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 15aa4c88f6052af6279e6be3fcd2f968f1c53eae by Serhiy Storchaka 
(Anish Shah) in branch 'master':
bpo-29693: Fix for DeprecationWarning in test_import (#421)
https://github.com/python/cpython/commit/15aa4c88f6052af6279e6be3fcd2f968f1c53eae


--

___
Python tracker 

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



[issue29693] DeprecationWarning/SyntaxError in test_import

2017-03-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Anish. DeprecationWarning is converted to SyntaxError when run Python 
with -We.

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue29693] DeprecationWarning/SyntaxError in test_import

2017-03-02 Thread Anish Shah

Changes by Anish Shah :


--
pull_requests: +350

___
Python tracker 

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



[issue29693] DeprecationWarning/SyntaxError in test_import

2017-03-02 Thread Anish Shah

Anish Shah added the comment:

I'm not able to reproduce the SyntaxError on latest commit 
902e9c50e31209e796b6bbe26f8d2f57ec12071b on master branch.

--

___
Python tracker 

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



[issue29693] DeprecationWarning/SyntaxError in test_import

2017-03-02 Thread Anish Shah

Anish Shah added the comment:

I will try to work on this! :)

--
nosy: +anish.shah

___
Python tracker 

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



[issue29693] DeprecationWarning/SyntaxError in test_import

2017-03-02 Thread Matthias Bussonnier

Changes by Matthias Bussonnier :


--
nosy: +mbussonn

___
Python tracker 

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



[issue29693] DeprecationWarning/SyntaxError in test_import

2017-03-02 Thread Brett Cannon

Brett Cannon added the comment:

Looks like the 'r' prefix is missing on the regex string. Marking this as 
"easy" if someone wants to try and solve this.

And FYI I double-checked that this is only in 3.7.

--
keywords: +easy

___
Python tracker 

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



[issue29693] DeprecationWarning/SyntaxError in test_import

2017-03-02 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

$ ./python -Wa -m test.regrtest test_import
Run tests sequentially
0:00:00 [1/1] test_import
/home/serhiy/py/cpython/Lib/test/test_import/__init__.py:88: 
DeprecationWarning: invalid escape sequence \(
  self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 
'os' \(.*os.py\)")
/home/serhiy/py/cpython/Lib/test/test_import/__init__.py:96: 
DeprecationWarning: invalid escape sequence \(
  self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 
'select' \(.*\.(so|pyd)\)")
1 test OK.

Total duration: 2 sec
Tests result: SUCCESS

$ ./python -We -m test.regrtest test_import
Run tests sequentially
0:00:00 [1/1] test_import
test test_import crashed -- Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/libregrtest/runtest.py", line 152, in 
runtest_inner
the_module = importlib.import_module(abstest)
  File "/home/serhiy/py/cpython/Lib/importlib/__init__.py", line 127, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 978, in _gcd_import
  File "", line 961, in _find_and_load
  File "", line 950, in _find_and_load_unlocked
  File "", line 655, in _load_unlocked
  File "", line 675, in exec_module
  File "", line 782, in get_code
  File "", line 742, in source_to_code
  File "", line 205, in _call_with_frames_removed
  File "/home/serhiy/py/cpython/Lib/test/test_import/__init__.py", line 88
self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 
'os' \(.*os.py\)")
   ^
SyntaxError: invalid escape sequence \(

test_import failed

1 test failed:
test_import

Total duration: 244 ms
Tests result: FAILURE

--
components: Tests
messages: 288799
nosy: benjamin.peterson, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: DeprecationWarning/SyntaxError in test_import
type: behavior
versions: Python 3.7

___
Python tracker 

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