STINNER Victor added the comment:
It tests nothing on utf-8 locale (test passed even when bug is not fixed).
The issue is about Windows and UTF-8 is never used as filesystem encoding on
Windows.
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
The test is still failing on Mac OS X:
==
FAIL: test_non_ascii (test.test_cmd_line_script.CmdLineTest)
--
Traceback (most
Tim Golden added the comment:
I've got a patch for this which applies cleanly to the 3.4 tip. I still need to
sort out the Windows issues (which I don't think will be difficult; it looks
like a test issue, not a code issue)
--
assignee: - tim.golden
Mathieu Bridon added the comment:
I have to apologize for not following up on this patch. At first I had no time
to go on pushing for it, and then (after a change of job), I completely forgot
about it. :(
I guess rebasing the patch on the latest tip is not that useful if you already
have
Serhiy Storchaka added the comment:
The issue is about Windows and UTF-8 is never used as filesystem encoding
on Windows.
The issue exists on Linux as I reported in msg173373.
--
___
Python tracker rep...@bugs.python.org
Tim Golden added the comment:
I'm planning to refactor the tests and the code very slightly. When I've
got a reworked patch I'll ping it back to you to ensure it matches your
intent. IIUC you're implementing comma-separated lists {abc,def} and
nested braces {a{b,c}d,efg} but not ranges {a..z}.
Mathieu Bridon added the comment:
IIUC you're implementing comma-separated lists {abc,def} and nested braces
{a{b,c}d,efg} but not ranges {a..z}.
Exactly.
Although that's just because at the time I sent the patch, I didn't know about
ranges in shells.
So I just implemented the part of
Serhiy Storchaka added the comment:
Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function
can fail.
But it does.
.. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \
Py_ssize_t start, Py_ssize_t end, int direction)
Return
Andrew Svetlov added the comment:
Christian,
Is there ``os.confstr`` supported by MaxOS X?
Is there using of environ['PATH'] makes sense as good callback if former is not
present?
About COMSPEC. From my point of view it's useful if we need default path.
Or if we have Win9x, where shell is
Chris Jerdonek added the comment:
Any interest in doing like os.get_terminal_size/shutil.get_terminal_size
If functions with two different behaviors are needed, I think the two functions
should probably have different names (e.g. get_shell() and get_user_shell()).
Otherwise, it may create
anatoly techtonik added the comment:
Please note that changes to urlretrieve to return block size 0 in callback
breaks existing PyPI apps, such as http://pypi.python.org/pypi/wget
It would be nice if you revert this part from
http://hg.python.org/cpython/rev/53715804dc71
Also if you change
Changes by anatoly techtonik techto...@gmail.com:
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10050
___
___
Nick Coghlan added the comment:
I've been working through the known crashers list in the stdlib. The
recursive import one was fixed with the migration to importlib in 3.3, the
compiler one will be fixed in 3.3.1 (with an enforced nesting limit). One of
those remaining is actually a
Serhiy Storchaka added the comment:
The decompressor does not hold a reference to the data object, but it holds a
reference to the data. It's the unconsumed_tail attribute.
The patch is simple.
--
keywords: +patch
Added file: http://bugs.python.org/file27891/issue16411.patch
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16411
___
___
New submission from anatoly techtonik:
os.path.split('c:foo') gives ('c:', 'foo') on Windows and ('', 'c:foo') on
Linux, which is not documented. IIUC, the behavior change in os module is not
possible, so a documentation note will be appreciated.
--
assignee: docs@python
components:
Serhiy Storchaka added the comment:
.. note::
Since different operating systems have different path name conventions, there
are several versions of this module in the standard library. The
:mod:`os.path` module is always the path module suitable for the operating
system Python is
Roundup Robot added the comment:
New changeset 0dfa3b09a6fe by Nick Coghlan in branch '3.2':
Record a known crasher from #6717
http://hg.python.org/cpython/rev/0dfa3b09a6fe
New changeset 509f7a53f8cc by Nick Coghlan in branch '3.3':
Merge #6717 crasher from 3.2
STINNER Victor added the comment:
Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function
can fail.
But it does.
.. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \
Py_ssize_t start, Py_ssize_t end, int direction)
Nick Coghlan added the comment:
Changing the type, since the crash bug has been fixed for a long time.
--
nosy: +ncoghlan
stage: - test needed
title: crash when calling urllib.getproxies() under OSX with subprocess /
particular memory usage - Test fix for past crash when calling
Changes by Nick Coghlan ncogh...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3367
___
___
Python-bugs-list mailing
Changes by R. David Murray rdmur...@bitdance.com:
--
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16413
___
anatoly techtonik added the comment:
Historically os.path.split() on Windows is able to grok UNIX paths easily.
Don't you think that Python language reference for the os.path should include
less vague definition of Windows, UNIX-style and old-style MacOS paths it works
with?
--
anatoly techtonik added the comment:
User story: as a Python programmer working with different systems, I'd like to
know how os.path module threats paths on these systems.
--
___
Python tracker rep...@bugs.python.org
New submission from STINNER Victor:
Attached patch adds support.NONASCII to have a portable non-ASCII character
that can be used to test non-ASCII strings. The patch uses it in some existing
functions.
I wrote the patch on the default branch, we may start to use it since Python
3.2.
Changes by Nick Coghlan ncogh...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15001
___
___
Python-bugs-list
STINNER Victor added the comment:
It skipped on locales which does not support £ (cp1006, cp1250, cp1251,
cp737, cp852, cp855, cp866, cp874, cp949, euc_kr, gb2312, gbk, hz, iso2022_kr,
iso8859_10, iso8859_11, iso8859_16, iso8859_2, iso8859_4, iso8859_5, iso8859_6,
johab, koi8_r, koi8_u,
STINNER Victor added the comment:
It tests nothing on utf-8 locale (test passed even when bug is not fixed).
The issue is about Windows and UTF-8 is never used as filesystem encoding on
Windows.
The issue exists on Linux as I reported in msg173373.
I don't understand your problem.
Serhiy Storchaka added the comment:
I think you should ensure that os.fsdecode(os.fsencode(character)) == character.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16414
___
Serhiy Storchaka added the comment:
Non-ASCII filenames were already supported with UTF-8 locale encoding.
Test the example in msg173373. It fails without fix.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
Eric V. Smith added the comment:
To Heikki Partanen excellent point in the review about date __format__ strings
allowing you to combine date formatting with other types of formatting:
This is a great point. It's the lack of this that (for example) requires the
logging module to have a
Kristof Csillag added the comment:
I have prepared a patch to build the 2.7 docs in EPUB format, too.
(Since this was already done on Python 3; this is only a very simple backport
of a few lines in a Makefile, a readme and a HTML download page.)
--
keywords: +patch
nosy: +csillag
Added
Andrew Svetlov added the comment:
Is it should be separate binary?
Or problem can be solved by regular python script with executable bit? What's
about Windows?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14266
Mark Dickinson added the comment:
Thread on #python-dev:
http://mail.python.org/pipermail/python-dev/2012-November/122543.html
If this is documented, direct tests for this form of exec should also be added.
--
___
Python tracker
Michael Foord added the comment:
A python script should be fine - this is what unittest2 does and I haven't had
any requests from Windows users for a binary.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14266
Changes by Ramchandra Apte maniandra...@gmail.com:
--
components: +Library (Lib)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8243
___
___
New submission from Ramchandra Apte:
AutoBump™.
--
nosy: +ramchandra.apte
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8243
___
___
Changes by Ramchandra Apte maniandra...@gmail.com:
--
versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4887
___
Ramchandra Apte added the comment:
Buu..mp
--
nosy: +ramchandra.apte
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7292
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
These were not idle questions. I wrote the patch, and I had to know what
behavior is correct.
Here's the patch. It fixes potential memory bug (unconsumed_tail sets to NULL
in case of out of memory), resets the unconsumed_tail to b'' after EOF, updates
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Extension Modules -Library (Lib)
versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8243
Andrew Svetlov added the comment:
I would say
@x.deleter
def x(self):
del super().x
confuses me a bit.
But I'm only -0, let's see other developers for their opinions.
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
unconsumed_tail should be private hidden attribute, which automatically
prepends any consumed data. This should not be very complicated. But
benchmarks needed to show what kind of approach is more efficient.
--
akira added the comment:
The summary assumes that issue 10050 is valid i.e., urlretrieve is
reimplemented using new urlopen and 2.x FancyURLopener is deprecated.
It might not be so [1]. In this case the summary is incorrect.
Old implementation is available as:
opener = FancyURLopener()
Serhiy Storchaka added the comment:
Quite the contrary. The ZipExtFile closes the file descriptor if the ZipFile
is constructed on a filename.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16408
New submission from Alessandro Pilotti:
eventlet.monkey_patch() breaks subprocess.Popen on Windows with error:
NotImplementedError: set_nonblocking() on a file object with no setblocking()
method (Windows pipes don't support non-blocking I/O)
Here's the full stack trace:
Tim Golden added the comment:
Attached is a refactored version of Mathieu's patch which, when applied to tip,
passes all tests.
--
Added file: http://bugs.python.org/file27894/0003-reworked-issue9584.patch
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
eventlet is not a part of the Python standard library. Please report this bug
to the project's bug tracker.
--
nosy: +r.david.murray
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Ezio Melotti added the comment:
Attached a proof of concept that removes the caching for re.compile, as
suggested in msg174599.
--
Added file: http://bugs.python.org/file27895/issue16389.diff
___
Python tracker rep...@bugs.python.org
Tim Golden added the comment:
Something went wrong with that patch; it doesn't include all the changes to
test_glob. I'll upload a newer patch later.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9584
Raymond Hettinger added the comment:
FWIW, I agree with this rejection.
--
nosy: +rhettinger
stage: - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16385
___
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16404
___
___
Python-bugs-list mailing list
Jesús Cea Avión added the comment:
I think this is a duplicate of issue #16183. Are you sure python 3 is affected?.
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16408
___
Chris Jerdonek added the comment:
+# NONASCII: non-ASCII character encodable by os.fsencode(),
+# or None if there is no such character.
+NONASCII = None
Can you use a name that reflects that this is a specific type of non-ASCII
character having a special property (e.g. FS_NONASCII)? I think
Serhiy Storchaka added the comment:
No, this is not a duplicate. ZipExtFile.close() closes a file handle, but
ZipExtFile.close() is not used here. I see also some possible FD leaks in
ZipFile.open(). It will be good to fix all them in this issue. If no one will
make a patch for this easy
Changes by Richard Oudkerk shibt...@gmail.com:
--
nosy: +sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7292
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Ezio, I agree with you, but I think this should be a separate issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16389
___
Ambroz Bizjak added the comment:
I've applied all patches from py3k-20121004-CROSS.tgz to Python 3.3.0 except 2,
4, and 9 (which didn't apply), but it's not working. After it builds the built
in modules, it tries to run the parser generator which was cross-compiled.
make Parser/pgen
make[1]:
Ambroz Bizjak added the comment:
Forgot to mention: I did run autoreconf after applying the patches. I'm
attaching the full output.
--
Added file: http://bugs.python.org/file27896/log
___
Python tracker rep...@bugs.python.org
Ezio Melotti added the comment:
I think the lru_cache should be kept if possible (i.e. I'm -0.5 on your patch).
If this result in a slowdown (as the mako_v2 benchmark indicates), then there
are two options:
1) optimize lru_cache;
2) avoid using it for regular expressions compiled with
Ambroz Bizjak added the comment:
A minor issue: if only --host= is specified on command line but not --build=,
then cross_compiling variable is only defined after AC_PROG_CC is called.
However, configure.ac uses it before that (e.g. the part at the top which looks
for a python interpreter).
Taras Lyapun added the comment:
Updated patch.
Moved function to os and used Christian Heimes implementation.
Updated doc, and test.
Also renamed function to get_shell.
Test passes on mac os and windows.
--
Added file: http://bugs.python.org/file27897/issue16353.diff
Christian Heimes added the comment:
I've tested confstr(CS_PATH) on Linux, Mac OS X, Solaris, HP-UX and BSD. It
works and the path to `sh` is always included.
Taras:
You don't have to perform the platform inside the get_shell() function. I
suggest that you define the function depending on the
Georg Brandl added the comment:
Please submit a patch.
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16413
___
___
Taras Lyapun added the comment:
Updated patch in regards to Christian Heimes remark.
--
Added file: http://bugs.python.org/file27898/issue16353.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16353
Chris Jerdonek added the comment:
Is someone able to test the patch on Android (the impetus for this issue)?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16353
___
Serhiy Storchaka added the comment:
I suggest to use fseek(fp, relative_offset, SEEK_CUR). It doesn't force a
system call (at least on Linux) and may be a little faster than fread() or
multiple getc().
--
nosy: +serhiy.storchaka
___
Python tracker
Jesús Cea Avión added the comment:
Serhiy Storchaka, go for it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16408
___
___
Python-bugs-list
Taras Lyapun added the comment:
Hello!
I don't understand issue - FileHandler is a subclass of StreamHandler, so you
can use terminator for FileHandler instances in the same way as for
StreamHandler instances.
--
nosy: +lyapun
___
Python tracker
Chris Jerdonek added the comment:
Some minor comments.
+.. function :: get_shell()
+
+ Return the path to default shell.
Three leading spaces needed. Also, Return the path to the default shell.
+ For unix system returns path to ``sh``, for windows returns path to
``cmd.exe``.
On Unix
Tim Golden added the comment:
Scratch that last comment: the patch does apply. I've tested it against Windows
Ubuntu. If no one comes in with any objections I'll commit it within the next
day.
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Maybe we should add a warning in some documentation somewhere about
this and then close the issue?
I don't really know where to add it, in the C API docs perhaps,
--
___
Python tracker rep...@bugs.python.org
Mark Gius added the comment:
My contributor form has been accepted. Anything else I should be doing to work
towards getting a fix applied?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16327
Rafik Draoui added the comment:
Here is a new patch addressing some of storchaka review comments, and
implementing a version in ntpath.
For the Windows version, I did as proposed in msg174819, but as I am not
familiar with the semantics and subtleties of paths in Windows maybe this
version
Serhiy Storchaka added the comment:
Here is a patch. In additional to leaks in testzip and ZipFile.open() I fixed
possible leaks in other places.
--
keywords: +patch
stage: needs patch - patch review
title: zipfile.testzip() opens file but does not close it. - FD leaks in
zipfile
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file27901/zipfile_fd_leaks-3.2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16408
___
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file27902/zipfile_fd_leaks-2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16408
___
New submission from STINNER Victor:
Since the changeset 45079ad1e260 (issue #4388), command line arguments are
decoded from UTF-8 instead of the locale encoding. Functions of
Python/fileutils.c are still using the locale encoding.
It does not work: see issue #16218. On Mac OS X, in the
STINNER Victor added the comment:
I created the issue #16416 to fix the Mac OS X case.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16416
___
___
New submission from Rosa Maria:
in instruction:
b = int(input('Dame valor (mayor) de b = '))
later is an instruction:
while b 0:
and the result is:
Traceback (most recent call last):
File H:\Soft_nuevo\Reptil\GCD_MCD_Euclides_Extendido-0.py, line 39, in
module
while b 0:
New submission from Juraj Variny:
Example:
parser.add_argument(-p,--port, help=Listening port, type=int,
choices=range(1, 65535),default=8007,required = False)
generates this usage text:
usage: agent.py [-h]
[-p
STINNER Victor added the comment:
If NONASCII is None I suggest the followed fallback code
I prefer to not brute force Unicode because it would slow down any test, even
tests not using FS_NONASCII. I wrote attached brute.py script to compute an
exhaustive list of non-ASCII characters
STINNER Victor added the comment:
I tested support_non_ascii-2.patch on Windows with cp932 ANSI code page (FS
encoding), and on Linux with ASCII, ISO-8859-1, ISO-8859-15 and UTF-8 locale
encodings.
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
I think you should ensure that os.fsdecode(os.fsencode(character)) ==
character.
Chosen characters respect this property, but it doesn't hurt to add such check.
Can you use a name that reflects that this is a specific type
of non-ASCII character having a
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file27892/support_non_ascii.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16414
___
R. David Murray added the comment:
You did request a tuple:
r = a - q * b,
That is equivalent to
r = (a - q * b,)
which is a single element tuple.
I had to put in some print statements in your loop to find that, it wasn't
obvious. This is perhaps a disadvantage of Python's tuple
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6280
___
___
Python-bugs-list mailing list
R. David Murray added the comment:
I don't think choices is a good choice there (pardon the pun). You really want
a custom type. I'm inclined to think that that applies to any 'choices' value
that is 'too large' for the help display. Part of the point of choices is that
you *want* the help
New submission from DDarko:
in Python 3.3 lib.email.message
File email/message.py, line 151, in as_string
g.flatten(self, unixfrom=unixfrom)
File email/generator.py, line 112, in flatten
self._write(msg)
File email/generator.py, line 171, in _write
self._write_headers(msg)
Ezio Melotti added the comment:
Lists have a new copy method starting from Python 3.3:
Python 3.3.0+ (3.3:549f7b5baa83+, Nov 4 2012, 23:18:06)
[GCC 4.6.3] on linux
Type help, copyright, credits or license for more information.
list.copy
method 'copy' of 'list' objects
--
nosy:
Nikolay Bryskin added the comment:
Hello, Taras.
I've renamed the issue - StreamHandler should also have a terminator __init__
keyword argument.
This argument is mostly needed for automatic logging configuration using
logging.config.dictConfig or logging.config.fileConfig.
--
title:
Lukas Lueg added the comment:
PyLint or PyChecker can only do this if the keys are all simple objects like
ints or strings. Consider a class with a custom __hash__
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16385
Chris Jerdonek added the comment:
I agree with David. Another sign that using choices isn't the right approach
is that it requires constructing a list of 66,000 elements. There are better
ways of checking if a provided argument is an integer between 1 and 65,535.
--
nosy:
Chris Jerdonek added the comment:
The argparse documentation says in one part, The choices keyword argument may
be more convenient for type checkers that simply check against a range of
values.
Thus, I wouldn't object to language clarifying that choices is meant for lists
of choices that
Sean Ochoa added the comment:
Tests updated for coverage and to use assertRaisesRegex.
--
Added file: http://bugs.python.org/file27907/issue13349.patch.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13349
96 matches
Mail list logo