Run of fresh-releases for python-pathlib2

Try this locally (using silver-platter):

debian-svp new-upstream python-pathlib2 

Merge these changes:

git pull https://janitor.debian.net/git/python-pathlib2 fresh-releases/main

Summary

Merged new upstream version: 2.3.5 (was: 2.3.4).

Diff

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index ea270ab..867c1b3 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,12 @@
 History
 -------
 
+Version 2.3.5
+^^^^^^^^^^^^^
+
+- Fall back to ascii when getfilesystemencoding returns None (see
+  issue #59).
+
 Version 2.3.4
 ^^^^^^^^^^^^^
 
diff --git a/PKG-INFO b/PKG-INFO
index 558f50d..a203693 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pathlib2
-Version: 2.3.4
+Version: 2.3.5
 Summary: Object-oriented filesystem paths
 Home-page: https://github.com/mcmtroffaes/pathlib2
 Author: Matthias C. M. Troffaes
diff --git a/VERSION b/VERSION
index 3f684d2..cc6c9a4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.4
+2.3.5
diff --git a/debian/changelog b/debian/changelog
index bd08cbe..c505ac1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-pathlib2 (2.3.5-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Tue, 01 Oct 2019 00:56:30 +0000
+
 python-pathlib2 (2.3.4-2) unstable; urgency=medium
 
   [ Ondřej Nový ]
diff --git a/pathlib2.egg-info/PKG-INFO b/pathlib2.egg-info/PKG-INFO
index 558f50d..a203693 100644
--- a/pathlib2.egg-info/PKG-INFO
+++ b/pathlib2.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pathlib2
-Version: 2.3.4
+Version: 2.3.5
 Summary: Object-oriented filesystem paths
 Home-page: https://github.com/mcmtroffaes/pathlib2
 Author: Matthias C. M. Troffaes
diff --git a/pathlib2/__init__.py b/pathlib2/__init__.py
index 0db87ac..d5a47a6 100644
--- a/pathlib2/__init__.py
+++ b/pathlib2/__init__.py
@@ -882,7 +882,11 @@ class PurePath(object):
                 # also handle unicode for PY2 (six.text_type = unicode)
                 elif six.PY2 and isinstance(a, six.text_type):
                     # cast to str using filesystem encoding
-                    parts.append(a.encode(sys.getfilesystemencoding()))
+                    # note: in rare circumstances, on Python < 3.2,
+                    # getfilesystemencoding can return None, in that
+                    # case fall back to ascii
+                    parts.append(a.encode(
+                        sys.getfilesystemencoding() or "ascii"))
                 else:
                     raise TypeError(
                         "argument should be a str object or an os.PathLike "

Full worker log Full build log