Hello community,
here is the log from the commit of package python-python-editor for
openSUSE:Factory checked in at 2019-05-13 14:50:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-editor (Old)
and /work/SRC/openSUSE:Factory/.python-python-editor.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-editor"
Mon May 13 14:50:04 2019 rev:6 rq:701751 version:1.0.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-python-editor/python-python-editor.changes
2018-12-24 11:46:26.373184004 +0100
+++
/work/SRC/openSUSE:Factory/.python-python-editor.new.5148/python-python-editor.changes
2019-05-13 14:50:05.646721348 +0200
@@ -1,0 +2,6 @@
+Thu May 9 06:53:20 UTC 2019 - [email protected]
+
+- version update to 1.0.4
+ * no upstream changelog
+
+-------------------------------------------------------------------
Old:
----
python-editor-1.0.3.tar.gz
New:
----
python-editor-1.0.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-editor.spec ++++++
--- /var/tmp/diff_new_pack.qZwOUc/_old 2019-05-13 14:50:06.334723082 +0200
+++ /var/tmp/diff_new_pack.qZwOUc/_new 2019-05-13 14:50:06.342723102 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-python-editor
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-python-editor
-Version: 1.0.3
+Version: 1.0.4
Release: 0
Summary: Python library to programmatically open an editor and capture
the result
License: Apache-2.0
@@ -42,13 +42,15 @@
%setup -q -n python-editor-%{version}
%build
+find -type f -exec chmod 644 {} +
%python_build
%install
%python_install
+%python_expand sed -i -e '/^#!\/usr\/bin\/env/d'
%{buildroot}%{$python_sitelib}/editor.py
%if 0%{?is_opensuse}
-# do not run tests for now (https://github.com/fmoo/python-editor/issues/14)
+# the example does not look like an unit test
# %check
# export EDITOR='nano'
# Xpython_exec test.py
++++++ python-editor-1.0.3.tar.gz -> python-editor-1.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-editor-1.0.3/PKG-INFO
new/python-editor-1.0.4/PKG-INFO
--- old/python-editor-1.0.3/PKG-INFO 2016-11-27 20:02:18.000000000 +0100
+++ new/python-editor-1.0.4/PKG-INFO 2019-02-01 08:28:49.000000000 +0100
@@ -1,12 +1,61 @@
Metadata-Version: 1.1
Name: python-editor
-Version: 1.0.3
+Version: 1.0.4
Summary: Programmatically open an editor, capture the result.
Home-page: https://github.com/fmoo/python-editor
Author: Peter Ruibal
Author-email: [email protected]
License: Apache
-Description: UNKNOWN
+Description: `python-editor` is a library that provides the `editor` module
for programmatically
+ interfacing with your system's $EDITOR.
+
+ Examples
+ --------
+
+ ```python
+ import editor
+ commit_msg = editor.edit(contents=b"# Enter commit message here")
+ ```
+
+ Opens an editor, prefilled with the contents, `# Enter commit message
here`.
+ When the editor is closed, returns the contents (bytes) in variable
`commit_msg`.
+ Note that the argument to `contents` needs to be a bytes object on
Python 3.
+
+
+ ```python
+ editor.edit(file="README.txt")
+ ```
+
+ Opens README.txt in an editor. Changes are saved in place. If there
is
+ a `contents` argument then the file contents will be overwritten.
+
+ ```python
+ editor.edit(..., use_tty=True)
+ ```
+
+ Opens the editor in a TTY. This is usually done in programs which
output is
+ piped to other programs. In this case the TTY is used as the editor's
stdout,
+ allowing interactive usage.
+
+
+ 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 `editor.edit`, an editor will be opened in a subprocess,
inheriting
+ the parent process's stdin, stdout.
+
Keywords: editor library vim emacs
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
@@ -14,10 +63,9 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-editor-1.0.3/editor.py
new/python-editor-1.0.4/editor.py
--- old/python-editor-1.0.3/editor.py 2016-11-27 19:54:48.000000000 +0100
+++ new/python-editor-1.0.4/editor.py 2019-02-01 08:10:18.000000000 +0100
@@ -17,7 +17,7 @@
'EditorError',
]
-__version__ = '1.0.3'
+__version__ = '1.0.4'
class EditorError(RuntimeError):
@@ -73,7 +73,7 @@
return '/dev/tty'
-def edit(filename=None, contents=None, use_tty=None):
+def edit(filename=None, contents=None, use_tty=None, suffix=''):
editor = get_editor()
args = [editor] +
get_editor_args(os.path.basename(os.path.realpath(editor)))
@@ -81,10 +81,14 @@
use_tty = sys.stdin.isatty() and not sys.stdout.isatty()
if filename is None:
- tmp = tempfile.NamedTemporaryFile()
+ tmp = tempfile.NamedTemporaryFile(suffix=suffix)
filename = tmp.name
if contents is not None:
+ # For python3 only. If str is passed instead of bytes, encode default
+ if hasattr(contents, 'encode'):
+ contents = contents.encode()
+
with open(filename, mode='wb') as f:
f.write(contents)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-editor-1.0.3/python_editor.egg-info/PKG-INFO
new/python-editor-1.0.4/python_editor.egg-info/PKG-INFO
--- old/python-editor-1.0.3/python_editor.egg-info/PKG-INFO 2016-11-27
20:02:18.000000000 +0100
+++ new/python-editor-1.0.4/python_editor.egg-info/PKG-INFO 2019-02-01
08:28:49.000000000 +0100
@@ -1,12 +1,61 @@
Metadata-Version: 1.1
Name: python-editor
-Version: 1.0.3
+Version: 1.0.4
Summary: Programmatically open an editor, capture the result.
Home-page: https://github.com/fmoo/python-editor
Author: Peter Ruibal
Author-email: [email protected]
License: Apache
-Description: UNKNOWN
+Description: `python-editor` is a library that provides the `editor` module
for programmatically
+ interfacing with your system's $EDITOR.
+
+ Examples
+ --------
+
+ ```python
+ import editor
+ commit_msg = editor.edit(contents=b"# Enter commit message here")
+ ```
+
+ Opens an editor, prefilled with the contents, `# Enter commit message
here`.
+ When the editor is closed, returns the contents (bytes) in variable
`commit_msg`.
+ Note that the argument to `contents` needs to be a bytes object on
Python 3.
+
+
+ ```python
+ editor.edit(file="README.txt")
+ ```
+
+ Opens README.txt in an editor. Changes are saved in place. If there
is
+ a `contents` argument then the file contents will be overwritten.
+
+ ```python
+ editor.edit(..., use_tty=True)
+ ```
+
+ Opens the editor in a TTY. This is usually done in programs which
output is
+ piped to other programs. In this case the TTY is used as the editor's
stdout,
+ allowing interactive usage.
+
+
+ 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 `editor.edit`, an editor will be opened in a subprocess,
inheriting
+ the parent process's stdin, stdout.
+
Keywords: editor library vim emacs
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
@@ -14,10 +63,9 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-editor-1.0.3/setup.cfg
new/python-editor-1.0.4/setup.cfg
--- old/python-editor-1.0.3/setup.cfg 2016-11-27 20:02:18.000000000 +0100
+++ new/python-editor-1.0.4/setup.cfg 2019-02-01 08:28:49.000000000 +0100
@@ -1,5 +1,5 @@
[egg_info]
+tag_svn_revision = 0
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-editor-1.0.3/setup.py
new/python-editor-1.0.4/setup.py
--- old/python-editor-1.0.3/setup.py 2016-11-27 19:54:51.000000000 +0100
+++ new/python-editor-1.0.4/setup.py 2019-02-01 08:04:43.000000000 +0100
@@ -1,29 +1,27 @@
-__VERSION__ = '1.0.3'
+__VERSION__ = '1.0.4'
from setuptools import setup
-try:
- import pypandoc
- long_description = pypandoc.convert('README.md', 'rst')
-except ImportError:
- long_description = None
+
+with open('README.md') as f:
+ long_description = f.read()
setup(
name='python-editor',
version=__VERSION__,
description="Programmatically open an editor, capture the result.",
long_description=long_description,
+ long_description_content_type='text/markdown',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries',
],
keywords='editor library vim emacs',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-editor-1.0.3/test.py
new/python-editor-1.0.4/test.py
--- old/python-editor-1.0.3/test.py 2016-11-16 18:31:45.000000000 +0100
+++ new/python-editor-1.0.4/test.py 2019-02-01 07:57:42.000000000 +0100
@@ -3,4 +3,4 @@
cont = editor.edit(contents='ABC!',
use_tty='use_tty' in sys.argv)
-sys.stdout.write(cont)
+sys.stdout.write(cont.decode())