Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] screenplain: update to 0.9.0.
@ 2020-07-14 14:10 abenson
  2020-07-14 14:19 ` [PR PATCH] [Updated] " abenson
  2020-07-14 14:27 ` [PR PATCH] [Merged]: " abenson
  0 siblings, 2 replies; 3+ messages in thread
From: abenson @ 2020-07-14 14:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

There is a new pull request by abenson against master on the void-packages repository

https://github.com/abenson/void-packages screenplain_0.9.0
https://github.com/void-linux/void-packages/pull/23566

screenplain: update to 0.9.0.


A patch file from https://github.com/void-linux/void-packages/pull/23566.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-screenplain_0.9.0-23566.patch --]
[-- Type: text/x-diff, Size: 6965 bytes --]

From 75d22a4e2271662f6738c33d77ceb296c82ea51b Mon Sep 17 00:00:00 2001
From: Andrewb Benson <abenson+void@gmail.com>
Date: Tue, 14 Jul 2020 09:05:23 -0500
Subject: [PATCH] screenplain: update to 0.9.0.

---
 .../patches/python3-cgi-escape.patch          | 78 -------------------
 .../patches/python3-stdout-buffer.patch       | 35 ---------
 srcpkgs/screenplain/template                  |  9 +--
 3 files changed, 4 insertions(+), 118 deletions(-)
 delete mode 100644 srcpkgs/screenplain/patches/python3-cgi-escape.patch
 delete mode 100644 srcpkgs/screenplain/patches/python3-stdout-buffer.patch

diff --git a/srcpkgs/screenplain/patches/python3-cgi-escape.patch b/srcpkgs/screenplain/patches/python3-cgi-escape.patch
deleted file mode 100644
index 4d96a757da0..00000000000
--- a/srcpkgs/screenplain/patches/python3-cgi-escape.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-https://github.com/vilcans/screenplain/commit/0e4eb9bff3763d3372f23b27f9c2390705e2d962.patch
-
-From 0e4eb9bff3763d3372f23b27f9c2390705e2d962 Mon Sep 17 00:00:00 2001
-From: Jakub Stasiak <jakub@stasiak.at>
-Date: Fri, 7 Feb 2020 12:59:24 +0100
-Subject: [PATCH] Fix "AttributeError: module 'cgi' has no attribute 'escape'"
- on Python 3.8
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Full error:
-
-    % screenplain Big-Fish.fountain Big-Fish.html
-    Traceback (most recent call last):
-      File "/Users/user/.ve38/bin/screenplain", line 6, in <module>
-        main(sys.argv[1:])
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/main.py", line 125, in main
-        convert(
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 183, in convert
-        convert_full(
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 210, in convert_full
-        convert_bare(screenplay, out)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 225, in convert_bare
-        formatter.convert(screenplay)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 99, in convert
-        format_function(para)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 153, in format_action
-        self.out.write(to_html(line))
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 60, in to_html
-        html = text.to_html()
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/richstring.py", line 62, in to_html
-        html = ''.join(seg.to_html() for seg in self.segments)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/richstring.py", line 62, in <genexpr>
-        html = ''.join(seg.to_html() for seg in self.segments)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/richstring.py", line 136, in to_html
-        _escape(self.text),
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/richstring.py", line 17, in _escape
-        encoded = cgi.escape(s).encode('ascii', 'xmlcharrefreplace')
-    AttributeError: module 'cgi' has no attribute 'escape'
-
-cgi.escape() is gone in Python 3.8, html.escape() should be used
-instead. Since html.escape() defaults to quote=True, we need to
-explicitly disable escaping quotation marks to keep doing the same
-thing. A question arises though – should quotation marks be actually
-kept verbatim here or was it unintentional?
----
- screenplain/richstring.py | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/screenplain/richstring.py b/screenplain/richstring.py
-index ad667d1..1859e12 100644
---- a/screenplain/richstring.py
-+++ b/screenplain/richstring.py
-@@ -3,9 +3,13 @@
- # http://www.opensource.org/licenses/mit-license.php
- 
- import re
--import cgi
- import six
- 
-+try:
-+    from html import escape as html_escape
-+except ImportError:
-+    from cgi import escape as html_escape
-+
- _magic_re = re.compile(u'[\ue700-\ue705]')
- 
- 
-@@ -14,7 +18,7 @@ def _escape(s):
-     and non-ascii characters with ampersand escapes.
- 
-     """
--    encoded = cgi.escape(s).encode('ascii', 'xmlcharrefreplace')
-+    encoded = html_escape(s, quote=False).encode('ascii', 'xmlcharrefreplace')
-     # In Py3, encoded is bytes type, so convert it to a string
-     return encoded.decode('ascii')
- 
diff --git a/srcpkgs/screenplain/patches/python3-stdout-buffer.patch b/srcpkgs/screenplain/patches/python3-stdout-buffer.patch
deleted file mode 100644
index f9f22ccd158..00000000000
--- a/srcpkgs/screenplain/patches/python3-stdout-buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-https://github.com/vilcans/screenplain/commit/e946ac7cdb4e61458502da629d79d78cac22d060.patch
-
-From e946ac7cdb4e61458502da629d79d78cac22d060 Mon Sep 17 00:00:00 2001
-From: Jakub Stasiak <jakub@stasiak.at>
-Date: Sat, 8 Feb 2020 13:52:06 +0100
-Subject: [PATCH] Fix "TypeError: write() argument must be str, not bytes" on
- Python 3
-
-This used to happen when writing to stdout. On Python 3 stdout is an
-instance of TextIOWrapper which is a text-based interface. It wraps a
-bytes-based writer though which is accessible through the buffer
-attribute, so let's use that to either write to it directly or to get an
-encoding writer.
-
-Fixes https://github.com/vilcans/screenplain/issues/53.
----
- screenplain/main.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/screenplain/main.py b/screenplain/main.py
-index 770427c..313498f 100644
---- a/screenplain/main.py
-+++ b/screenplain/main.py
-@@ -109,9 +109,9 @@ def main(args):
-             output = open(output_file, 'wb')
-     else:
-         if output_encoding:
--            output = codecs.getwriter(output_encoding)(sys.stdout)
-+            output = codecs.getwriter(output_encoding)(sys.stdout.buffer)
-         else:
--            output = sys.stdout
-+            output = sys.stdout.buffer
- 
-     try:
-         if format == 'text':
diff --git a/srcpkgs/screenplain/template b/srcpkgs/screenplain/template
index 341668cf1fa..566ff671e83 100644
--- a/srcpkgs/screenplain/template
+++ b/srcpkgs/screenplain/template
@@ -1,18 +1,17 @@
 # Template file for 'screenplain'
 pkgname=screenplain
-version=0.8.0
-revision=3
+version=0.9.0
+revision=0
 archs=noarch
 build_style=python3-module
 hostmakedepends="python3-setuptools"
-depends="python3-reportlab python3-six"
+depends="python3-reportlab"
 short_desc="Convert Fountain screenplays to HMTL, FDX, and PDF"
 maintainer="Andrew Benson <abenson+void@gmail.com>"
 license="MIT"
 homepage="http://www.screenplain.com/"
 distfiles="https://github.com/vilcans/screenplain/archive/${version}.tar.gz"
-checksum=aef5e50bf4ea072c3d3a9384b66fe34a40e8d2d55ed226624aaabc226cec0d9a
-patch_args="-Np1"
+checksum=b506d4ec2463ea670db753f16fd88a77c6dbfb1096e5f4956c7736a117cea4f1
 
 post_install() {
 	vlicense LICENSE.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] screenplain: update to 0.9.0.
  2020-07-14 14:10 [PR PATCH] screenplain: update to 0.9.0 abenson
@ 2020-07-14 14:19 ` abenson
  2020-07-14 14:27 ` [PR PATCH] [Merged]: " abenson
  1 sibling, 0 replies; 3+ messages in thread
From: abenson @ 2020-07-14 14:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

There is an updated pull request by abenson against master on the void-packages repository

https://github.com/abenson/void-packages screenplain_0.9.0
https://github.com/void-linux/void-packages/pull/23566

screenplain: update to 0.9.0.


A patch file from https://github.com/void-linux/void-packages/pull/23566.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-screenplain_0.9.0-23566.patch --]
[-- Type: text/x-diff, Size: 6965 bytes --]

From f36fecf1241908d6e688648f78c1a3d9a587fb2a Mon Sep 17 00:00:00 2001
From: Andrewb Benson <abenson+void@gmail.com>
Date: Tue, 14 Jul 2020 09:05:23 -0500
Subject: [PATCH] screenplain: update to 0.9.0.

---
 .../patches/python3-cgi-escape.patch          | 78 -------------------
 .../patches/python3-stdout-buffer.patch       | 35 ---------
 srcpkgs/screenplain/template                  |  9 +--
 3 files changed, 4 insertions(+), 118 deletions(-)
 delete mode 100644 srcpkgs/screenplain/patches/python3-cgi-escape.patch
 delete mode 100644 srcpkgs/screenplain/patches/python3-stdout-buffer.patch

diff --git a/srcpkgs/screenplain/patches/python3-cgi-escape.patch b/srcpkgs/screenplain/patches/python3-cgi-escape.patch
deleted file mode 100644
index 4d96a757da0..00000000000
--- a/srcpkgs/screenplain/patches/python3-cgi-escape.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-https://github.com/vilcans/screenplain/commit/0e4eb9bff3763d3372f23b27f9c2390705e2d962.patch
-
-From 0e4eb9bff3763d3372f23b27f9c2390705e2d962 Mon Sep 17 00:00:00 2001
-From: Jakub Stasiak <jakub@stasiak.at>
-Date: Fri, 7 Feb 2020 12:59:24 +0100
-Subject: [PATCH] Fix "AttributeError: module 'cgi' has no attribute 'escape'"
- on Python 3.8
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Full error:
-
-    % screenplain Big-Fish.fountain Big-Fish.html
-    Traceback (most recent call last):
-      File "/Users/user/.ve38/bin/screenplain", line 6, in <module>
-        main(sys.argv[1:])
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/main.py", line 125, in main
-        convert(
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 183, in convert
-        convert_full(
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 210, in convert_full
-        convert_bare(screenplay, out)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 225, in convert_bare
-        formatter.convert(screenplay)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 99, in convert
-        format_function(para)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 153, in format_action
-        self.out.write(to_html(line))
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/export/html.py", line 60, in to_html
-        html = text.to_html()
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/richstring.py", line 62, in to_html
-        html = ''.join(seg.to_html() for seg in self.segments)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/richstring.py", line 62, in <genexpr>
-        html = ''.join(seg.to_html() for seg in self.segments)
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/richstring.py", line 136, in to_html
-        _escape(self.text),
-      File "/Users/user/.ve38/lib/python3.8/site-packages/screenplain/richstring.py", line 17, in _escape
-        encoded = cgi.escape(s).encode('ascii', 'xmlcharrefreplace')
-    AttributeError: module 'cgi' has no attribute 'escape'
-
-cgi.escape() is gone in Python 3.8, html.escape() should be used
-instead. Since html.escape() defaults to quote=True, we need to
-explicitly disable escaping quotation marks to keep doing the same
-thing. A question arises though – should quotation marks be actually
-kept verbatim here or was it unintentional?
----
- screenplain/richstring.py | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/screenplain/richstring.py b/screenplain/richstring.py
-index ad667d1..1859e12 100644
---- a/screenplain/richstring.py
-+++ b/screenplain/richstring.py
-@@ -3,9 +3,13 @@
- # http://www.opensource.org/licenses/mit-license.php
- 
- import re
--import cgi
- import six
- 
-+try:
-+    from html import escape as html_escape
-+except ImportError:
-+    from cgi import escape as html_escape
-+
- _magic_re = re.compile(u'[\ue700-\ue705]')
- 
- 
-@@ -14,7 +18,7 @@ def _escape(s):
-     and non-ascii characters with ampersand escapes.
- 
-     """
--    encoded = cgi.escape(s).encode('ascii', 'xmlcharrefreplace')
-+    encoded = html_escape(s, quote=False).encode('ascii', 'xmlcharrefreplace')
-     # In Py3, encoded is bytes type, so convert it to a string
-     return encoded.decode('ascii')
- 
diff --git a/srcpkgs/screenplain/patches/python3-stdout-buffer.patch b/srcpkgs/screenplain/patches/python3-stdout-buffer.patch
deleted file mode 100644
index f9f22ccd158..00000000000
--- a/srcpkgs/screenplain/patches/python3-stdout-buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-https://github.com/vilcans/screenplain/commit/e946ac7cdb4e61458502da629d79d78cac22d060.patch
-
-From e946ac7cdb4e61458502da629d79d78cac22d060 Mon Sep 17 00:00:00 2001
-From: Jakub Stasiak <jakub@stasiak.at>
-Date: Sat, 8 Feb 2020 13:52:06 +0100
-Subject: [PATCH] Fix "TypeError: write() argument must be str, not bytes" on
- Python 3
-
-This used to happen when writing to stdout. On Python 3 stdout is an
-instance of TextIOWrapper which is a text-based interface. It wraps a
-bytes-based writer though which is accessible through the buffer
-attribute, so let's use that to either write to it directly or to get an
-encoding writer.
-
-Fixes https://github.com/vilcans/screenplain/issues/53.
----
- screenplain/main.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/screenplain/main.py b/screenplain/main.py
-index 770427c..313498f 100644
---- a/screenplain/main.py
-+++ b/screenplain/main.py
-@@ -109,9 +109,9 @@ def main(args):
-             output = open(output_file, 'wb')
-     else:
-         if output_encoding:
--            output = codecs.getwriter(output_encoding)(sys.stdout)
-+            output = codecs.getwriter(output_encoding)(sys.stdout.buffer)
-         else:
--            output = sys.stdout
-+            output = sys.stdout.buffer
- 
-     try:
-         if format == 'text':
diff --git a/srcpkgs/screenplain/template b/srcpkgs/screenplain/template
index 341668cf1fa..e3ce1bc7ff2 100644
--- a/srcpkgs/screenplain/template
+++ b/srcpkgs/screenplain/template
@@ -1,18 +1,17 @@
 # Template file for 'screenplain'
 pkgname=screenplain
-version=0.8.0
-revision=3
+version=0.9.0
+revision=1
 archs=noarch
 build_style=python3-module
 hostmakedepends="python3-setuptools"
-depends="python3-reportlab python3-six"
+depends="python3-reportlab"
 short_desc="Convert Fountain screenplays to HMTL, FDX, and PDF"
 maintainer="Andrew Benson <abenson+void@gmail.com>"
 license="MIT"
 homepage="http://www.screenplain.com/"
 distfiles="https://github.com/vilcans/screenplain/archive/${version}.tar.gz"
-checksum=aef5e50bf4ea072c3d3a9384b66fe34a40e8d2d55ed226624aaabc226cec0d9a
-patch_args="-Np1"
+checksum=b506d4ec2463ea670db753f16fd88a77c6dbfb1096e5f4956c7736a117cea4f1
 
 post_install() {
 	vlicense LICENSE.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: screenplain: update to 0.9.0.
  2020-07-14 14:10 [PR PATCH] screenplain: update to 0.9.0 abenson
  2020-07-14 14:19 ` [PR PATCH] [Updated] " abenson
@ 2020-07-14 14:27 ` abenson
  1 sibling, 0 replies; 3+ messages in thread
From: abenson @ 2020-07-14 14:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

There's a merged pull request on the void-packages repository

screenplain: update to 0.9.0.
https://github.com/void-linux/void-packages/pull/23566

Description:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-14 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 14:10 [PR PATCH] screenplain: update to 0.9.0 abenson
2020-07-14 14:19 ` [PR PATCH] [Updated] " abenson
2020-07-14 14:27 ` [PR PATCH] [Merged]: " abenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).