Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1177053 - fpaste doesn't work when default python is python3
Summary: fpaste doesn't work when default python is python3
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: fpaste
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-24 00:26 UTC by Kunal Mehta
Modified: 2015-09-11 06:52 UTC (History)
5 users (show)

Fixed In Version: 0.3.8.0-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-26 04:33:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kunal Mehta 2014-12-24 00:26:34 UTC
Description of problem:

If your environment's `python` is set to python3, the fpaste script won't work due to a syntax error.

Version-Release number of selected component (if applicable): fpaste 0.3.7.3.3

How reproducible: always

Steps to Reproduce:
1. Create a virtualenv using python3 (virtualenv -p python3) and activate it
2. echo "hi" | fpaste

Actual results:

$ echo "hi" | fpaste
  File "/usr/bin/fpaste", line 87
    except ValueError, e:
                     ^
SyntaxError: invalid syntax

Expected results: It should work.

Additional info:

This was originally filed as https://fedorahosted.org/fpaste/ticket/16, but hasn't had a response in 6 months. There's a patch to change the shebang to explicitly reference "python2" which should fix the issue

I additionally filed https://fedorahosted.org/fpaste/ticket/17 to port fpaste to python3 (which seems like a good idea in general given that it will be the default in F22).

Comment 1 Jaroslav Reznik 2015-03-03 16:39:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 2 Ankur Sinha (FranciscoD) 2015-05-22 10:54:40 UTC
I hadn't realised this. Are you sure that python refers to py3 in F22? I'm on F22 and mines set to /usr/bin/python which points to /usr/bin/python2. Fpaste works here, at least for the time being. 

I can begin working on the porting, including your patches, but I'm not sure if this can be done before F22 release. 

Cheers,
Ankur

Comment 3 Kunal Mehta 2015-06-24 19:47:28 UTC
(In reply to Ankur Sinha (FranciscoD) from comment #2)
> I hadn't realised this. Are you sure that python refers to py3 in F22? I'm
> on F22 and mines set to /usr/bin/python which points to /usr/bin/python2.
> Fpaste works here, at least for the time being. 

It does not. But if you use a virtualenv that is using Python 3, then "/usr/bin/env python" will use Python 3.

The original plan was to have Python 3 be installed by default in F22 (using /usr/bin/python3), but I think that was bumped to F23.

Comment 4 Ankur Sinha (FranciscoD) 2015-07-16 14:13:03 UTC
A build for rawhide has been pushed with py3. I'll wait for a bit to see if folks running rawhide run into any issues before pushing updates for F23/F22.

http://koji.fedoraproject.org/koji/buildinfo?buildID=668962

Comment 5 Peter Robinson 2015-08-19 12:30:40 UTC
So in a Fedora minimal install with only python3 this doesn't work work with the current F-23 fpaste :-(

$ dmesg | fpaste
/usr/bin/env: python: No such file or directory
$

Comment 6 Peter Robinson 2015-08-19 12:52:48 UTC
Can confirm fpaste-0.3.8.0-1.fc24 works as expected on F-23 (dmesg | fpaste) on a python3 only system. Can we please get this pushed to F-23

Comment 7 Ankur Sinha (FranciscoD) 2015-08-20 18:28:06 UTC
Will push an update when I get back to work tomorrow.

Cheers,
Ankur

Comment 8 Fedora Update System 2015-08-21 10:05:02 UTC
fpaste-0.3.8.0-1.fc23 has been submitted as an update to Fedora 23. https://bugzilla.redhat.com/show_bug.cgi?id=1177053

Comment 9 Fedora Update System 2015-08-21 10:08:13 UTC
fpaste-0.3.8.0-1.fc22 has been submitted as an update to Fedora 22. https://bugzilla.redhat.com/show_bug.cgi?id=1177053

Comment 10 Fedora Update System 2015-08-22 02:51:19 UTC
fpaste-0.3.8.0-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update fpaste'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-13891

Comment 11 Fedora Update System 2015-08-22 16:25:00 UTC
fpaste-0.3.8.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update fpaste'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-13890

Comment 12 Fedora Update System 2015-08-26 04:33:04 UTC
fpaste-0.3.8.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2015-09-10 20:21:35 UTC
fpaste-0.3.8.0-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Kunal Mehta 2015-09-11 06:52:32 UTC
It now works in F22. Thanks! :)


Note You need to log in before you can comment on or make changes to this bug.