[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2020-04-14 Thread Brian Murray
** Package changed: apport (Ubuntu Focal) => python3.7 (Ubuntu Focal)

** Changed in: python3.7 (Ubuntu Focal)
   Status: Triaged => Invalid

** Also affects: python3.8 (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: python3.8 (Ubuntu Focal)
   Status: New => Invalid

** Summary changed:

- apport python exception handler messes up python3.7
+ apport python exception for python versions which python-apt is not built on

** Also affects: python-apt (Ubuntu Eoan)
   Importance: Undecided
   Status: New

** Also affects: python3.7 (Ubuntu Eoan)
   Importance: Undecided
   Status: New

** Also affects: python3.8 (Ubuntu Eoan)
   Importance: Undecided
   Status: New

** Also affects: python-apt (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Also affects: python3.7 (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Also affects: python3.8 (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Changed in: python3.7 (Ubuntu Bionic)
   Importance: Undecided => Medium

** Changed in: python3.7 (Ubuntu Bionic)
   Status: New => Triaged

** Changed in: python3.7 (Ubuntu Eoan)
   Importance: Undecided => Medium

** Changed in: python3.7 (Ubuntu Eoan)
   Status: New => Triaged

** Changed in: python3.8 (Ubuntu Eoan)
   Importance: Undecided => Medium

** Changed in: python3.8 (Ubuntu Eoan)
   Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception for python versions which python-apt is not
  built on

Status in Apport:
  New
Status in python-apt package in Ubuntu:
  Invalid
Status in python3.7 package in Ubuntu:
  Invalid
Status in python3.8 package in Ubuntu:
  Invalid
Status in python-apt source package in Bionic:
  New
Status in python3.7 source package in Bionic:
  Triaged
Status in python3.8 source package in Bionic:
  New
Status in python-apt source package in Eoan:
  New
Status in python3.7 source package in Eoan:
  Triaged
Status in python3.8 source package in Eoan:
  Triaged
Status in python-apt source package in Focal:
  Invalid
Status in python3.7 source package in Focal:
  Invalid
Status in python3.8 source package in Focal:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  

[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2019-12-20 Thread Francis Ginther
** Tags added: id-5de941fa03cfeb8f3edbe11c

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in Apport:
  New
Status in apport package in Ubuntu:
  Triaged
Status in python-apt package in Ubuntu:
  Invalid
Status in apport source package in Focal:
  Triaged
Status in python-apt source package in Focal:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2019-12-05 Thread Brian Murray
** Also affects: python-apt (Ubuntu Focal)
   Importance: Undecided
   Status: Invalid

** Also affects: apport (Ubuntu Focal)
   Importance: Medium
   Status: Triaged

** Tags removed: rls-ff-incoming

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in Apport:
  New
Status in apport package in Ubuntu:
  Triaged
Status in python-apt package in Ubuntu:
  Invalid
Status in apport source package in Focal:
  Triaged
Status in python-apt source package in Focal:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2019-10-21 Thread Brian Murray
** Tags added: rls-ff-incoming

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in Apport:
  New
Status in apport package in Ubuntu:
  Triaged
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2019-10-21 Thread Calvin Cheng
Just ran into this same problem.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 18.04.3 LTS
Release:18.04
Codename:   bionic

$ python3 --version
Python 3.7.3

$ apt-cache policy python3.7
python3.7:
  Installed: 3.7.3-2~18.04.1
  Candidate: 3.7.3-2~18.04.1
  Version table:
 *** 3.7.3-2~18.04.1 500
500 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 
Packages
500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 
Packages
100 /var/lib/dpkg/status
 3.7.0~b3-1 500
500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in Apport:
  New
Status in apport package in Ubuntu:
  Triaged
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2019-02-18 Thread Jeff Larson
Any update on this issue?

** Also affects: apport
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in Apport:
  New
Status in apport package in Ubuntu:
  Triaged
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2018-10-07 Thread Stephen Croll
As a workaround, I removed the 3.7 sitecustomize.py files:

  squirrel:~ 0:7> sudo rm /etc/python3.7/sitecustomize.py
/usr/lib/python3.7/sitecustomize.py

The above files were apparently installed by libpython3.7-minimal:

  squirrel:~ 0:8> dpkg -S /etc/python3.7/sitecustomize.py 
/usr/lib/python3.7/sitecustomize.py
  libpython3.7-minimal:amd64: /etc/python3.7/sitecustomize.py
  libpython3.7-minimal:amd64: /usr/lib/python3.7/sitecustomize.py

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in apport package in Ubuntu:
  Triaged
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2018-06-15 Thread Brian Murray
** Changed in: apport (Ubuntu)
   Status: New => Triaged

** Changed in: apport (Ubuntu)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in apport package in Ubuntu:
  Triaged
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2018-06-07 Thread Bart Goeman
well my reasoning was slightly different from supported/unsupported
i am not familiar with the exact scope of the apport project,
but I assume the goal is to collect info on ubuntu packages, not any unrelated 
code,
and since afaik all packages one one release all use the same (system) python 
version( i.e. 3.6 for bionic),
-> code running under any other python is of no interest anyhow
-> it only makes sense to install the apport exception hook for that python 
version,

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in apport package in Ubuntu:
  New
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2018-06-06 Thread Julian Andres Klode
So apport needs to catch the exception and do nothing / not register an
excepthook on unsupported python versions.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in apport package in Ubuntu:
  New
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2018-06-06 Thread Julian Andres Klode
python 3.7 is not a supported version, hence modules are not built for
it.

** Changed in: python-apt (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in apport package in Ubuntu:
  New
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1774843] Re: apport python exception handler messes up python3.7

2018-06-06 Thread Brian Murray
** Also affects: python-apt (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1774843

Title:
  apport python exception handler messes up python3.7

Status in apport package in Ubuntu:
  New
Status in python-apt package in Ubuntu:
  Invalid

Bug description:
  it seems apport installs an exception hook whenever running python3.
  This hook is apparently installed for python3.7 too.
  This exception handler has a dependency on apt_pkg, which is a binary that is 
not compatible with python3.7 it seems (you can't import it, see below)

  As a result, whenever I run a python3.7 script and run into an exception 
(which happens often when writing code), I get an additional exception in the 
exception handler + a copy of the original exception, so three stacktraces in 
total.
  A solution would be to only install the exception hook for the system python  
i.e. python3.6

  
  $ lsb_release -rd
  Description:  Ubuntu 18.04 LTS
  Release:  18.04

  apport: 2.20.9-0ubuntu7
  python-apt: 1.6.0
  python3.7: 3.7.0~b3-1

  Demo with a trivial error:
  $ python3 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?

  
  $ python3.7 -c 'print hello'
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?
  Error in sys.excepthook:
  Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in 
apport_excepthook
  from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 

  from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
  import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 

  from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in 

  import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
  import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'

  Original exception was:
File "", line 1
  print hello
^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(hello)?


  Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >>> import apt_pkg
  >>> apt_pkg.__file__
  '/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
  >>> 

  Python 3.7.0b3 (default, Mar 30 2018, 04:35:22) 
  [GCC 7.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> sys.excepthook
  
  >> import apt_pkg
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'apt_pkg'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1774843/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp