Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 940943 Details for
Bug 1146308
MultipartPostHandler2 0.1.5 is available
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
git diff to 0.1.5
0.1.5.patch (text/plain), 5.20 KB, created by
Sergio Basto
on 2014-09-25 01:24:18 UTC
(
hide
)
Description:
git diff to 0.1.5
Filename:
MIME Type:
Creator:
Sergio Basto
Created:
2014-09-25 01:24:18 UTC
Size:
5.20 KB
patch
obsolete
>diff --git a/python-MultipartPostHandler2-python3.patch b/python-MultipartPostHandler2-python3.patch >index d6e0108..d0a9765 100644 >--- a/python-MultipartPostHandler2-python3.patch >+++ b/python-MultipartPostHandler2-python3.patch >@@ -1,16 +1,15 @@ >-diff -ruN a/MultipartPostHandler-example.py b/MultipartPostHandler-example.py >---- a/MultipartPostHandler-example.py 2013-03-21 20:12:27.959314233 +0100 >-+++ b/MultipartPostHandler-example.py 2013-03-22 14:02:15.151389848 +0100 >-@@ -13,17 +13,19 @@ >+--- ./examples/MultipartPostHandler-example.py.orig 2014-09-25 01:35:28.857398162 +0100 >++++ ./examples/MultipartPostHandler-example.py 2014-09-25 01:37:06.753159514 +0100 >+@@ -13,17 +13,19 @@ def main(): > def validateFile(url): > temp = tempfile.mkstemp(suffix=".html") > os.write(temp[0], opener.open(url).read()) > + # use the encoding of the uploaded page in open().read().decode() > params = { "ss" : "0", # show source >- "doctype" : "Inline", >-- "uploaded_file" : open(temp[1], "rb") } >-- print(opener.open(validatorURL, params).read()) >-+ "uploaded_file" : open(temp[1], "rb").read().decode('utf-8') } >+ "doctype" : "Inline", >+- "uploaded_file" : open(temp[1], "rb") } >+- print((opener.open(validatorURL, params).read())) >++ "uploaded_file" : open(temp[1], "rb").read().decode('utf-8') } > + # use the encoding of the validator here > + print(opener.open(validatorURL, params).read().decode('utf-8')) > os.remove(temp[1]) >@@ -24,10 +23,9 @@ diff -ruN a/MultipartPostHandler-example.py b/MultipartPostHandler-example.py > > if __name__=="__main__": > main() >-diff -ruN a/MultipartPostHandler.py b/MultipartPostHandler.py >---- a/MultipartPostHandler.py 2013-03-21 20:12:28.001314190 +0100 >-+++ b/MultipartPostHandler.py 2013-03-22 12:47:39.280527608 +0100 >-@@ -38,9 +38,8 @@ >+--- ./MultipartPostHandler.py.orig 2014-05-25 04:09:41.800449820 +0100 >++++ ./MultipartPostHandler.py 2014-05-25 04:09:41.847450321 +0100 >+@@ -51,9 +51,8 @@ Example: > > import urllib.request, urllib.parse, urllib.error > import urllib.request, urllib.error, urllib.parse >@@ -39,7 +37,7 @@ diff -ruN a/MultipartPostHandler.py b/MultipartPostHandler.py > > class Callable: > def __init__(self, anycallable): >-@@ -60,7 +59,7 @@ >+@@ -73,7 +72,7 @@ class MultipartPostHandler(urllib.reques > v_vars = [] > try: > for(key, value) in list(data.items()): >@@ -48,7 +46,7 @@ diff -ruN a/MultipartPostHandler.py b/MultipartPostHandler.py > v_files.append((key, value)) > else: > v_vars.append((key, value)) >-@@ -78,7 +77,7 @@ >+@@ -91,7 +90,7 @@ class MultipartPostHandler(urllib.reques > print("Replacing %s with %s" % (request.get_header('content-type'), 'multipart/form-data')) > request.add_unredirected_header('Content-Type', contenttype) > >diff --git a/python-MultipartPostHandler2.spec b/python-MultipartPostHandler2.spec >index 4afa820..2ca39e5 100644 >--- a/python-MultipartPostHandler2.spec >+++ b/python-MultipartPostHandler2.spec >@@ -1,19 +1,16 @@ > %global with_python3 1 > # comment this out in koji >-#%%global locally 1 >+#global locally 1 > %global pypi_name MultipartPostHandler2 > Name: python-%{pypi_name} >-Version: 0.1.1 >-Release: 6%{?dist} >+Version: 0.1.5 >+Release: 1%{?dist} > Summary: A handler for urllib2 to enable multipart form uploading > # License note in MultipartPostHandler.py > License: LGPLv2+ > URL: http://pypi.python.org/pypi/%{pypi_name}/%{version} > Source0: http://pypi.python.org/packages/source/M/%{pypi_name}/%{pypi_name}-%{version}.tar.gz > >-# Remove the example in main() from the library and keep it separated >-Patch0: %{name}-cut-out-main.patch >- > # Several Python3 specific things, needs to be applied after 2to3! > Patch1: %{name}-python3.patch > >@@ -42,7 +39,6 @@ Enables the use of multipart/form-data for posting forms. > > %prep > %setup -q -n %{pypi_name}-%{version} >-%patch0 -p1 > rm -rf doc # no real doc there > > %if 0%{?with_python3} >@@ -50,11 +46,11 @@ rm -rf %{py3dir} > cp -a . %{py3dir} > cd %{py3dir} > find . -name '*.py' | xargs sed -i '1s|^#!%{__python}|#!%{__python3}|' >-2to3 --write --nobackup *.py >+2to3 --write --nobackup *.py examples/*.py > %patch1 -p1 > cd - > # copy the example back so it can be used in %%doc >-cp %{py3dir}/MultipartPostHandler-example.py python3-MultipartPostHandler-example.py >+cp %{py3dir}/examples/MultipartPostHandler-example.py python3-MultipartPostHandler-example.py > %endif # with_python3 > > %build >@@ -86,13 +82,19 @@ cd - > %endif # locally > > %files >-%doc README.txt MultipartPostHandler-example.py >+%doc README.txt examples/MultipartPostHandler-example.py > %{python_sitelib}/* > %files -n python3-%{pypi_name} > %doc README.txt python3-MultipartPostHandler-example.py > %{python3_sitelib}/* > > %changelog >+* Thu Sep 25 2014 Sérgio Basto <sergio@serjux.com> - 0.1.5-1 >+- Update to 0.1.5 >+ >+* Sun May 25 2014 Sérgio Basto <sergio@serjux.com> - 0.1.4-1 >+- Update to 0.1.4 >+ > * Fri May 02 2014 Miro HronÄok <mhroncok@redhat.com> - 0.1.1-6 > - Rebuilt for Python 3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1146308
: 940943