[issue28627] [alpine] shutil.copytree fail to copy a direcotry with broken symlinks
Israel Fruchter added the comment: the failure looks like that: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/shutil.py", line 359, in copytree raise Error(errors) shutil.Error: [('/bug/broken', '/temp/broken', "[Errno 95] Not supported: '/temp/broken'")] -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28627> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28627] [alpine] shutil.copytree fail to copy a direcotry with broken symlinks
New submission from Israel Fruchter: this fails on python3.5-alpine and python3.6-alpine (works as fine in python2.7-alpine) cd /bug && ln -s /broken_path/to_nowhere broken python -c "import shutil; shutil.copytree('/bug', '/temp', symlinks=True)" Dockerfile example here: https://github.com/docker-library/python/issues/155 https://github.com/python/cpython/blob/c30098c8c6014f3340a369a31df9c74bdbacc269/Lib/shutil.py#L198 seem like its suppressing NotImplementedError, and in our case OsError with ENOSUP was raised -- components: Library (Lib) messages: 280178 nosy: fruch priority: normal severity: normal status: open title: [alpine] shutil.copytree fail to copy a direcotry with broken symlinks type: behavior versions: Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28627> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27376] Add mock_import method to mock module
Israel Fruchter added the comment: Some real use cases is needed, like testing a code that behave differently on case of package availability. I think something like patch for modules can be useful here, so you could have some control on what would be returned. -- nosy: +fruch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27376> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27899] Apostrophe is not replace with ElementTree.tostring (also in Element.write)
Israel Fruchter added the comment: I've now found http://bugs.python.org/issue2647, and seem like this was classify as not a bug. maybe documetion should say it ? or anther way to actuly decide about how to output those -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27899> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27899] Apostrophe is not replace with ElementTree.tostring (also in Element.write)
New submission from Israel Fruchter: Both on python2.7 and python3.4 >>> from xml.etree import cElementTree as ET >>> text = 'its' >>> root = ET.fromstring(text.encode('utf-8')) >>> ET.tostring(root, method="xml") its' I would expected to return the same as the input to be a complient XML 1.0 I would understand why for html it would return something diffrent, see: http://stackoverflow.com/questions/2083754/why-shouldnt-apos-be-used-to-escape-single-quotes as a workaround I had to path ElementTree: from xml.etree.ElementTree import _escape_cdata ,_raise_serialization_error from mock import patch def _escape_cdata(text): # escape character data try: # it's worth avoiding do-nothing calls for strings that are # shorter than 500 character, or so. assume that's, by far, # the most common case in most applications. if "&" in text: text = text.replace("&", "") if "<" in text: text = text.replace("<", "") if ">" in text: text = text.replace(">", "") if "'" in text: text = text.replace("'", "") return text except (TypeError, AttributeError): _raise_serialization_error(text) from xml.etree import cElementTree as ET text = 'its' root = ET.fromstring(text.encode('utf-8')) with patch('xml.etree.ElementTree._escape_cdata', new=_escape_cdata): s = ET.tostring(root, encoding='unicode', method="xml") print(s) -- components: XML messages: 273937 nosy: fruch priority: normal severity: normal status: open title: Apostrophe is not replace with ElementTree.tostring (also in Element.write) type: behavior versions: Python 2.7, Python 3.4 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27899> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time
Israel Fruchter israel.fruch...@gmail.com added the comment: I think (2) is very important, and I agree Gregory about the distro responsibility for size. further more, if everything is define using the standard Modules/Setup, or Modules/Setup.local during compile/build time, why having a fallback anyhow in hashlib.py ? BTW anyone that compiles for embedded systems adds a patch for remove all the code that detects modules automatically see this from openembeded.org: http://cgit.openembedded.org/openembedded/tree/recipes/python/python-2.6.6/nohostlibs.patch?id=9389f986ac8672cb671f00ab749ce323340b9500 -- nosy: +fruch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14693 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time
Changes by Israel Fruchter israel.fruch...@gmail.com: -- versions: +Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14693 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13929] fnmatch to support escape characters
New submission from Israel Fruchter israel.fruch...@gmail.com: fnmatch to support escape characters: like that: name = Document[Ver.2].doc pattern = *\[Ver.2\]* fnmatch.fnmatch(name, pattern) True that's also fix glob module: pattern = ipconfig /\? glob.glob(pattern) ipconfig /? -- components: Library (Lib) messages: 152495 nosy: fruch priority: normal severity: normal status: open title: fnmatch to support escape characters type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com