[issue19570] distutils' Command.ensure_dirname fails on Unicode

2020-12-01 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2-only issue.

--
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19570] distutils' Command.ensure_dirname fails on Unicode

2016-06-13 Thread Adam Bartoš

Adam Bartoš added the comment:

Recently, I was also hit by this when trying to autoset `sys.argv` to a list of 
Unicode string (see 
https://github.com/Drekin/win-unicode-console/issues/20#issuecomment-225638271 
).

It would be nice to have this fixed. It seems to me (I may be wrong) that every 
occurence of `isinstance(…, str)` is a potential bug in Python 2.7. Either it 
should be spelled out as `isinstance(…, bytes)` or there should be 
`isinstance(…, types.StringTypes)` or even `isinstance(…, unicode)`.

--
nosy: +Drekin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19570] distutils' Command.ensure_dirname fails on Unicode

2014-02-28 Thread Matt Riedemann

Matt Riedemann added the comment:

For what it's worth, I'm building openstack docs on master (icehouse-3) for 
ceilometer, nova, cinder, heat, glance, keystone, and neutron (plus the 
clients) using sphinx 1.2.1 without this problem (unless I'm just not aware of 
it?).  Anyway, I came across that from this github change for openstack's 
global-requirements:

https://github.com/openstack/requirements/commit/0e8862e958813a031fe7398440e8a3866b42a8e4

--
nosy: +mriedem

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19570
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19570] distutils' Command.ensure_dirname fails on Unicode

2013-12-11 Thread Doug Hellmann

Changes by Doug Hellmann doug.hellm...@gmail.com:


--
nosy: +doughellmann

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19570
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19570] distutils' Command.ensure_dirname fails on Unicode

2013-11-13 Thread Sascha Peilicke

New submission from Sascha Peilicke:

Encountered an isssue with Unicode paths when invoking Sphinx' distutils 
command (i.e. 'setup.py build_sphinx'): 

$ python setup.py build_sphinx
running build_sphinx
error: 'source_dir' must be a directory name (got `doc/source`)

...
(Pdb) l
 96 for root, dirnames, filenames in os.walk(guess):
 97 if 'conf.py' in filenames:
 98 return root
 99 return None
100 
101  - def finalize_options(self):
102 if self.source_dir is None:
103 self.source_dir = self._guess_source_dir()
104 self.announce('Using source directory %s' % self.source_dir)
105 self.ensure_dirname('source_dir')
106 if self.source_dir is None:
(Pdb) n
 /usr/lib/python2.7/site-packages/sphinx/setup_command.py(102)finalize_options()
- if self.source_dir is None:
(Pdb) n
 /usr/lib/python2.7/site-packages/sphinx/setup_command.py(105)finalize_options()
- self.ensure_dirname('source_dir')
(Pdb) s
--Call--
 /usr/lib64/python2.7/distutils/cmd.py(266)ensure_dirname()
- def ensure_dirname(self, option):
(Pdb) s
...
--Call--
 /usr/lib64/python2.7/distutils/cmd.py(253)_ensure_tested_string()
- def _ensure_tested_string(self, option, tester,
(Pdb) 
 /usr/lib64/python2.7/distutils/cmd.py(255)_ensure_tested_string()
- val = self._ensure_stringlike(option, what, default)


Command.ensure_dirname (likewise ensure_filename) fails because 
_ensure_stringlike only tests for isistance(..., str) rather than 
isinstance(..., types.StringTypes).

--
components: Distutils
files: distutils-ensure_stringlike-unicode.patch
keywords: patch
messages: 202741
nosy: saschpe
priority: normal
severity: normal
status: open
title: distutils' Command.ensure_dirname fails on Unicode
type: behavior
versions: Python 2.7
Added file: 
http://bugs.python.org/file32594/distutils-ensure_stringlike-unicode.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19570
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19570] distutils' Command.ensure_dirname fails on Unicode

2013-11-13 Thread STINNER Victor

STINNER Victor added the comment:

This is more a feature request than a bug. You should use an encoded path, or 
upgrade to Python 3 which handles Unicode correctly.

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19570
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19570] distutils' Command.ensure_dirname fails on Unicode

2013-11-13 Thread Sascha Peilicke

Sascha Peilicke added the comment:

Happens since Sphinx-1.2b3, here's some context: 
https://bitbucket.org/birkenfeld/sphinx/issue/1142

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19570
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19570] distutils' Command.ensure_dirname fails on Unicode

2013-11-13 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19570
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com