Hello community,

here is the log from the commit of package python-python-editor for 
openSUSE:Factory checked in at 2016-09-27 13:44:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-editor (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-editor.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-editor"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-editor/python-python-editor.changes    
    2016-01-13 22:46:24.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-python-editor.new/python-python-editor.changes
   2016-09-27 13:44:55.000000000 +0200
@@ -1,0 +2,14 @@
+Fri Sep 16 14:35:20 UTC 2016 - toddrme2...@gmail.com
+
+- Fix Download URL
+
+-------------------------------------------------------------------
+Thu Sep 15 22:17:54 UTC 2016 - toddrme2...@gmail.com
+
+- Update to 1.0.1
+  * Detect tty and add helper function
+  * Default to not using tty
+  * Use branch instead of ternary operator
+  * Use /dev/tty by default
+
+-------------------------------------------------------------------

Old:
----
  python-editor-0.5.tar.gz

New:
----
  python-editor-1.0.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-editor.spec ++++++
--- /var/tmp/diff_new_pack.Cccq2k/_old  2016-09-27 13:44:56.000000000 +0200
+++ /var/tmp/diff_new_pack.Cccq2k/_new  2016-09-27 13:44:56.000000000 +0200
@@ -17,15 +17,18 @@
 
 
 Name:           python-python-editor
-Version:        0.5
+Version:        1.0.1
 Release:        0
 Summary:        Programmatically open an editor, capture the result
 License:        Apache-2.0
 Group:          Development/Languages/Python
 Url:            https://github.com/fmoo/python-editor
-Source:         
https://pypi.python.org/packages/source/p/python-editor/python-editor-%{version}.tar.gz
+Source:         
https://files.pythonhosted.org/packages/source/p/python-editor/python-editor-%{version}.tar.gz
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
+%if 0%{?is_opensuse}
+BuildRequires:  nano
+%endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{?suse_version} && 0%{?suse_version} <= 1110
 %{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
@@ -46,6 +49,12 @@
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
 
+%if 0%{?is_opensuse}
+%check
+export EDITOR='nano'
+python test.py
+%endif
+
 %files
 %defattr(-,root,root,-)
 %doc LICENSE README.md

++++++ python-editor-0.5.tar.gz -> python-editor-1.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-0.5/PKG-INFO 
new/python-editor-1.0.1/PKG-INFO
--- old/python-editor-0.5/PKG-INFO      2015-12-03 07:16:40.000000000 +0100
+++ new/python-editor-1.0.1/PKG-INFO    2016-06-14 21:28:03.000000000 +0200
@@ -1,15 +1,55 @@
 Metadata-Version: 1.1
 Name: python-editor
-Version: 0.5
+Version: 1.0.1
 Summary: Programmatically open an editor, capture the result.
 Home-page: https://github.com/fmoo/python-editor
 Author: Peter Ruibal
 Author-email: ruib...@gmail.com
 License: Apache
-Description: UNKNOWN
+Description: ``python-editor`` is a library that provides the ``editor`` 
module for
+        programmatically interfacing with your system's $EDITOR.
+        
+        Examples
+        --------
+        
+        .. code:: python
+        
+            import editor
+            commit_msg = editor.edit(contents="# Enter commit message here")
+        
+        Opens an editor, prefilled with the contents,
+        ``# Enter commit message here``. When the editor is closed, returns the
+        contents in variable ``commit_msg``.
+        
+        .. code:: python
+        
+            import editor
+            editor.edit(file="README.txt")
+        
+        Opens README.txt in an editor. Changes are saved in place.
+        
+        How it Works
+        ------------
+        
+        ``editor`` first looks for the ${EDITOR} environment variable. If set,
+        it uses the value as-is, without fallbacks.
+        
+        If no $EDITOR is set, editor will search through a list of known
+        editors, and use the first one that exists on the system.
+        
+        For example, on Linux, ``editor`` will look for the following editors 
in
+        order:
+        
+        -  vim
+        -  emacs
+        -  nano
+        
+        When calling the ``edit()`` function, ``editor`` will open the editor 
in
+        a subprocess, inheriting the parent process's stdin, stdout
+        
 Keywords: editor library vim emacs
 Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
+Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: Apache Software License
 Classifier: Operating System :: OS Independent
@@ -19,4 +59,5 @@
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
 Classifier: Topic :: Software Development :: Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-0.5/editor.py 
new/python-editor-1.0.1/editor.py
--- old/python-editor-0.5/editor.py     2015-10-21 16:40:33.000000000 +0200
+++ new/python-editor-1.0.1/editor.py   2016-06-14 18:31:14.000000000 +0200
@@ -3,6 +3,7 @@
 
 from __future__ import print_function
 
+import sys
 import locale
 import os.path
 import subprocess
@@ -71,11 +72,20 @@
         "Please consider setting your %s variable" % get_platform_editor_var())
 
 
-def edit(filename=None, contents=None):
+def get_tty_filename():
+    if sys.platform == 'win32':
+        return 'CON:'
+    return '/dev/tty'
+
+
+def edit(filename=None, contents=None, use_tty=None):
     editor = get_editor()
     args = get_editor_args(os.path.basename(os.path.realpath(editor)))
     args = [editor] + args.split(' ')
 
+    if use_tty is None:
+        use_tty = sys.stdin.isatty() and not sys.stdout.isatty()
+
     if filename is None:
         tmp = tempfile.NamedTemporaryFile()
         filename = tmp.name
@@ -86,7 +96,11 @@
 
     args += [filename]
 
-    proc = subprocess.Popen(args, close_fds=True)
+    stdout = None
+    if use_tty:
+        stdout = open(get_tty_filename(), 'wb')
+
+    proc = subprocess.Popen(args, close_fds=True, stdout=stdout)
     proc.communicate()
 
     with open(filename, mode='rb') as f:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-0.5/python_editor.egg-info/PKG-INFO 
new/python-editor-1.0.1/python_editor.egg-info/PKG-INFO
--- old/python-editor-0.5/python_editor.egg-info/PKG-INFO       2015-12-03 
07:16:40.000000000 +0100
+++ new/python-editor-1.0.1/python_editor.egg-info/PKG-INFO     2016-06-14 
21:28:03.000000000 +0200
@@ -1,15 +1,55 @@
 Metadata-Version: 1.1
 Name: python-editor
-Version: 0.5
+Version: 1.0.1
 Summary: Programmatically open an editor, capture the result.
 Home-page: https://github.com/fmoo/python-editor
 Author: Peter Ruibal
 Author-email: ruib...@gmail.com
 License: Apache
-Description: UNKNOWN
+Description: ``python-editor`` is a library that provides the ``editor`` 
module for
+        programmatically interfacing with your system's $EDITOR.
+        
+        Examples
+        --------
+        
+        .. code:: python
+        
+            import editor
+            commit_msg = editor.edit(contents="# Enter commit message here")
+        
+        Opens an editor, prefilled with the contents,
+        ``# Enter commit message here``. When the editor is closed, returns the
+        contents in variable ``commit_msg``.
+        
+        .. code:: python
+        
+            import editor
+            editor.edit(file="README.txt")
+        
+        Opens README.txt in an editor. Changes are saved in place.
+        
+        How it Works
+        ------------
+        
+        ``editor`` first looks for the ${EDITOR} environment variable. If set,
+        it uses the value as-is, without fallbacks.
+        
+        If no $EDITOR is set, editor will search through a list of known
+        editors, and use the first one that exists on the system.
+        
+        For example, on Linux, ``editor`` will look for the following editors 
in
+        order:
+        
+        -  vim
+        -  emacs
+        -  nano
+        
+        When calling the ``edit()`` function, ``editor`` will open the editor 
in
+        a subprocess, inheriting the parent process's stdin, stdout
+        
 Keywords: editor library vim emacs
 Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
+Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: Apache Software License
 Classifier: Operating System :: OS Independent
@@ -19,4 +59,5 @@
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
 Classifier: Topic :: Software Development :: Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-0.5/python_editor.egg-info/SOURCES.txt 
new/python-editor-1.0.1/python_editor.egg-info/SOURCES.txt
--- old/python-editor-0.5/python_editor.egg-info/SOURCES.txt    2015-12-03 
07:16:40.000000000 +0100
+++ new/python-editor-1.0.1/python_editor.egg-info/SOURCES.txt  2016-06-14 
21:28:03.000000000 +0200
@@ -3,6 +3,7 @@
 README.md
 editor.py
 setup.py
+test.py
 python_editor.egg-info/PKG-INFO
 python_editor.egg-info/SOURCES.txt
 python_editor.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-0.5/setup.py 
new/python-editor-1.0.1/setup.py
--- old/python-editor-0.5/setup.py      2015-12-03 07:16:15.000000000 +0100
+++ new/python-editor-1.0.1/setup.py    2016-06-14 18:45:56.000000000 +0200
@@ -1,14 +1,19 @@
-from setuptools import setup
+__VERSION__ = '1.0.1'
 
-version = '0.5'
+from setuptools import setup
+try:
+    import pypandoc
+    long_description = pypandoc.convert('README.md', 'rst')
+except ImportError:
+    long_description = None
 
 setup(
     name='python-editor',
-    version=version,
+    version=__VERSION__,
     description="Programmatically open an editor, capture the result.",
-    #long_description='',
+    long_description=long_description,
     classifiers=[
-        'Development Status :: 4 - Beta',
+        'Development Status :: 5 - Production/Stable',
         'Intended Audience :: Developers',
         'License :: OSI Approved :: Apache Software License',
         'Operating System :: OS Independent',
@@ -18,6 +23,7 @@
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
         'Topic :: Software Development :: Libraries',
     ],
     keywords='editor library vim emacs',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-0.5/test.py 
new/python-editor-1.0.1/test.py
--- old/python-editor-0.5/test.py       1970-01-01 01:00:00.000000000 +0100
+++ new/python-editor-1.0.1/test.py     2016-06-14 18:31:15.000000000 +0200
@@ -0,0 +1,6 @@
+import sys
+import editor
+
+cont = editor.edit(contents='ABC!',
+                   use_tty='use_tty' in sys.argv)
+sys.stdout.write(cont)


Reply via email to