Serhiy Storchaka added the comment:
Resolved conflicts, fixed some noted issues in the patch and committed
unquestionable changes. Thank you for your patch Ramchandra.
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Roundup Robot added the comment:
New changeset b3a7215b9ce4 by Serhiy Storchaka in branch 'default':
Issue #16261: Converted some bare except statements to except statements
https://hg.python.org/cpython/rev/b3a7215b9ce4
--
___
Python tracker
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24245
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
stage: needs patch - patch review
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16261
Serhiy Storchaka added the comment:
Added comments on Rietveld. But I'm not sure that this change is worth to do.
Only low-level functions in os.path and os modules (and few other) support
bytes names (and only bytes, not bytearray!). High level interfaces, such as in
tarfile or zipfile, work
Serhiy Storchaka added the comment:
Just committed smaller patch in issue16261 and closed the issue.
Not all changes in the patch in this issue look innocent and correct.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
Martin Panter added the comment:
Doing a quick review, expect a few comments on Rietveld
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24230
___
Serhiy Storchaka added the comment:
Changes look mostly good, but IDLE changes should be applied to all versions
and the code in test_queue.py is dim.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24245
R. David Murray added the comment:
We have a number of other places in the stdlib where bytes-in-bytes-out is
observed, at various levels of abstraction. I think this is reasonable. To
answer your direct question, I think tempfile is a convenience-and-do-it-right
wrapper around what is
Changes by Emmanuel Gamby e.ga...@gmail.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24246
___
___
Python-bugs-list
swanson added the comment:
Thanks for pointing out how count and replace operate. I don't mind the
ValueError: empty separator on split and partition - makes sense to me.
re: at least as long as the slice indexes are within range
If the slices indexes had to be in range, that would be
Roundup Robot added the comment:
New changeset 004c689d259c by Serhiy Storchaka in branch 'default':
Issue #24245: Eliminated senseless expect clauses that have no any effect.
https://hg.python.org/cpython/rev/004c689d259c
New changeset 56e1d24806b3 by Serhiy Storchaka in branch '2.7':
Issue
New submission from Emmanuel Gamby:
Hi,
Following the principle of least astonishment, I would expect the function to
return the same value.
Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type help, copyright, credits or license for more information.
import mimetypes
Martin Panter added the comment:
There are a few related issues here I think:
1. Empty string search: I think it is completely valid to be able to find an
empty string inside another string, at least as long as the slice indexes are
within range. Although I remember it was a bit of a
Changes by Matteo Dell'Amico de...@linux.it:
--
nosy: +della
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24068
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Committed all changes except test_queue.py. Looks as this file is worth
separate issue for refactoring. For example asserRaises() can be used in
multiple places instead of try/fail/except idiom. May be there is other
non-idiomatic code.
--
eryksun added the comment:
This solution no longer works. If the system is configured to use the Japanese
system locale and language pack, then 3.4.3 returns codepage 932 mojibake for
the %Z time zone name. Originally [this approach worked][1] because it called
PyUnicode_Decode using the
eryksun added the comment:
I cannot reproduce it based on the existing issues using python
3.4.1 on Windows 7.
Majeed could be referring to the ValueError that gets raised for this [only on
Windows][1]. In Linux %f passes through silently. Maybe for 3.5 an alternate
approach would be to
Majeed Arni added the comment:
When we have this for format:
date_format = '%Y %m %d %H:%M:%S %z'
I see our logs as:
[2015 05 19 17:36:09 -0500] watcher modified
When I change the format to:
[2015 05 20 08:51:24 -0500] stderr AttributeError: 'StreamLogger' object has no
attribute 'flush'
Serhiy Storchaka added the comment:
Changing behavior of such base methods is dangerous and can break existing
code. Even if the behavior is wrong, some code can depends on it. We should be
very careful with this.
There are several simple invariants for these methods.
s1.index(s2, start,
R. David Murray added the comment:
So, this is expected behavior on Windows. I'm inclined to close the issue as
not a bug unless the Windows folks think eryksun suggestion is worth
considering. (If the error is suppressed, does windows fill in the rest of the
values and just leave the %f in
R. David Murray added the comment:
Serhiy: I agree. I think the consistency with python2's string is the deciding
factor, and we ought to fix it in default. But not 3.4, because it is a
behavior change. I'd like other people's opinions, though.
--
eryksun added the comment:
If the error is suppressed, does windows fill in the rest of
the values and just leave the %f in the string?
No, it does not. I understand now why ValueError was an intentional choice
here. The CRT actually breaks the loop with a goto if any call to expand_time
R. David Murray added the comment:
This is a duplicate of issue 4963.
--
nosy: +r.david.murray
resolution: - duplicate
stage: - resolved
status: open - closed
superseder: - mimetypes.guess_extension result changes after mimetypes.init()
___
Python
R. David Murray added the comment:
The ValueError is not a bug. Not all format codes are supported on all
platforms (we start from what the platform supports, and then we have a few we
have implemented cross platform, but that isn't one of them). We also pass
through the behavior of the
Stefan Krah added the comment:
It seems that it won't be easy to find an API that pleases everyone.
I don't want to prolong the discussion much, but if the macro goes in,
returning PyErr_BadArgument() in the default case would be better than
NotImplemented.
assert(0) would be fine as well.
Majeed Arni added the comment:
Actually it is happening in Python 2.7 too..
Here is the format we are trying to use:
date_format = '%Y %m %d %H:%M:%S:%f %z'
Also, is there something millisecond if not microsecond?
--
title: Python Crash on strftime with %f on Python 3 - Python Crash
R. David Murray added the comment:
If the slices indexes had to be in range, that would be inconsistent with the
behavior of slicing
No, it wouldn't. Your slice example is two operations: the slice returns an
empty string (because that's how the *substring* operation is defined to behave
Serhiy Storchaka added the comment:
I was vague about this feature, but if other core developer found it useful, I
have no objections. Only few nitpicks to the implementation.
--
nosy: +georg.brandl, ncoghlan, pitrou
___
Python tracker
Mateusz Loskot added the comment:
Re msg238016, I confirm python-3.5.0a2-fdvalidation.patch fixes the problem for
Python 3.5.0a4 and VS2013.
The only issue I encountered was with HAVE_FSTAT which is missing from
PC/pyconifg.h, so I edited the patch and removed the check if
Roundup Robot added the comment:
New changeset 435bc22f39e3 by Serhiy Storchaka in branch 'default':
Issue #22955: attrgetter, itemgetter and methodcaller objects in the operator
https://hg.python.org/cpython/rev/435bc22f39e3
--
nosy: +python-dev
___
Terry J. Reedy added the comment:
A couple of years ago, when I pushed 'except: pass', I was told in post-review
that grandfathered bad code is no excuse for more bad code and that I should be
explicit, including if I actually meant except BaseException:, which in this
case I did. No other
Roundup Robot added the comment:
New changeset 2c074a8dd084 by Serhiy Storchaka in branch '3.4':
Issue 24215: Added tests for more builtin types in test_pprint.
https://hg.python.org/cpython/rev/2c074a8dd084
New changeset da711bdcc1bf by Serhiy Storchaka in branch 'default':
Issue 24215: Added
Steve Dower added the comment:
_Py_*_SUPPRESS_IPH is the right thing to use here. It still displays an
assertion dialog in debug builds, but ignoring it has the correct effect.
Patch attached for 3.5
--
keywords: +patch
Added file: http://bugs.python.org/file39438/24244_1.patch
Roundup Robot added the comment:
New changeset cbe28273fd8d by Serhiy Storchaka in branch '2.7':
Issue #24134: Use assertRaises() in context manager form in test_slice to
https://hg.python.org/cpython/rev/cbe28273fd8d
New changeset 3a1ee0b5a096 by Serhiy Storchaka in branch '3.4':
Issue #24134:
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24134
___
Augie Fackler added the comment:
I'll build a patched Python3.5 tomorrow (I'm on the road today) and let you
know if this does everything we need. I'd be shocked if it wasn't plenty.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 962b42d67b9e by Antoine Pitrou in branch 'default':
Issue #9858: Add missing method stubs to _io.RawIOBase. Patch by Laura
Rupprecht.
https://hg.python.org/cpython/rev/962b42d67b9e
--
nosy: +python-dev
Antoine Pitrou added the comment:
I've pushed this to the default branch. Thanks!
--
resolution: - fixed
stage: commit review - resolved
status: open - closed
versions: -Python 2.7, Python 3.4
___
Python tracker rep...@bugs.python.org
Yury Selivanov added the comment:
Patch is attached.
--
keywords: +patch
Added file: http://bugs.python.org/file39439/sig_warns.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24248
___
R. David Murray added the comment:
OK. What made me wonder is that I saw that the 'invalid format string'
exception was removed by the patch...I guess that is also raised at a higher
level in the code.
--
___
Python tracker rep...@bugs.python.org
New submission from R. David Murray:
I have a situation where it would be really helpful to know in my cleanup
routine whether or not the test failed. The situation is this: I'm running a
command in a subprocess, and sometimes it writes output to stderr that I
normally want to ignore. But
New submission from Bill Parker:
In reviewing calls to strcpy(string, ), I found three instances which could
be re-written as *string = '\0'; which would save the minor overhead of a
function call. The patch file is below:
--- install.c.orig 2015-05-20 14:11:27.723397005 -0700
+++
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - duplicate
status: open - closed
superseder: - document PEP 448
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24240
___
Steve Dower added the comment:
It raises ValueError just like now (no visible change), but it won't crash and
doesn't require being able to validate the complete format string.
If we want any different behaviour, we need to reimplement strftime for Python,
which I'd be okay with, but I'm not
Steve Dower added the comment:
It's raised by the existing handling for EINVAL at the end of the function.
Previously we'd crash before getting that far because of the invalid parameter
handler.
--
___
Python tracker rep...@bugs.python.org
New submission from Yury Selivanov:
I want to deprecate Signature.from_function and Signature.from_builtin in 3.5.
There is no use for these methods (they aren't generic), and we also now have a
very handy 'from_callable' for easy Signature subclassing.
--
assignee: yselivanov
Roundup Robot added the comment:
New changeset 0c298f1ee3f6 by Yury Selivanov in branch 'default':
Issue 20691: Add follow_wrapped arg to inspect.signature/from_callable.
https://hg.python.org/cpython/rev/0c298f1ee3f6
--
nosy: +python-dev
___
Python
Roundup Robot added the comment:
New changeset c93e5ba1cc20 by Serhiy Storchaka in branch 'default':
Issue #22955: Fixed test_operator. It left Python implementation in
https://hg.python.org/cpython/rev/c93e5ba1cc20
--
___
Python tracker
Antoine Pitrou added the comment:
__weakref__ is just an implementation detail of how heap types expose weak
references (actually, I'm not sure why it's exposed at all).
Laura, thank you for contributing. Your patch looks good to me.
--
assignee: gregory.p.smith -
resolution:
R. David Murray added the comment:
What's the behavior after this patch? Does it just return the string
unmodified? Or return a null string? Or is the traceback generated at a
higher level (and if so what is the error message?)
--
___
Python
New submission from Sergey Skripnick:
unittest discover does add some directories to sys.path
later some modules can not work with modified sys.path
Here module `pdb` is trying to import standard module `cmd` but does import
`cmd` module from `tests` directory:
unittest discover should not
Yury Selivanov added the comment:
Closing this one.
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20691
___
Laura Rupprecht added the comment:
Can anyone provide feedback on this patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9858
___
___
Robert Collins added the comment:
I think ignoring weakref is wrong: it means the two implementations are
different.
--
nosy: +rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9858
Yury Selivanov added the comment:
Forgot to mention: from_function and from_builtin are not documented.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24248
___
New submission from Hao Huang:
When I was trying to add the same argument to both the root command and the sub
command and you put the arguments before the subcommand, In 2.7.8 the arguments
would be parsed correctly. But in 2.7.9, they wouldn't but these arguments
would show up in the help
Hao Huang added the comment:
I think this patch cause the difference:
https://hg.python.org/cpython/rev/1a3143752db2
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24251
___
Demian Brecht added the comment:
Added comments to Rietveld.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23377
___
___
Python-bugs-list
New submission from ppperry:
When reproducing issue24160 in IDLE, I saw this traceback:
Traceback (most recent call last):
File pyshell#14, line 1, in module
pdb.run(reload(test3))
File C:\Python27\lib\pdb.py, line 1238, in run
Pdb().run(statement, globals, locals)
File
Eric Snow added the comment:
These are the leaks I'm seeing in test_collections (14/24 tests):
test_copying : 178
test_iterators : 40
test_update : 29
test_init: 22
test_move_to_end : 21
test_sorted_iterators: 20
test_setdefault : 16
Petr Viktorin added the comment:
Well, in my opinion NotImplemented is a good value for unknown operation, but
I'll be happy to change to PyErr_BadArgument(); return NULL; if there's support
for that.
--
___
Python tracker rep...@bugs.python.org
Changes by Ned Deily n...@acm.org:
--
components: +Library (Lib) -Argument Clinic
nosy: +bethard, r.david.murray -larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24251
___
Martin Panter added the comment:
Ah sorry I didn’t see the keyword “subprocess”, so --buffer won’t work! But
maybe you can dump the subprocess’s stderr to sys.stderr?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24249
Changes by eryksun eryk...@gmail.com:
--
components: +Windows
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24244
___
___
Python-bugs-list mailing
Yury Selivanov added the comment:
For the documentation, in addition to noting the deprecation itself, it may
also be worth noting how to explicitly recreate the type restriction.
Nick, what do you mean by type restriction? Also, since the functions aren't
documented, I think we don't need
Changes by Ned Deily n...@acm.org:
--
nosy: +ezio.melotti, michael.foord, rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24247
___
___
Martin Panter added the comment:
Can’t you use the -b or --buffer command-line option
https://docs.python.org/dev/library/unittest.html#cmdoption-unittest-b, or
equivalent option to unittest.main() or whatever?
The standard output and standard error streams are buffered during the test
run.
Raymond Hettinger added the comment:
Changing behavior of such base methods is dangerous
and can break existing code.
I agree. The time to argue an API design is before it released not years later
after people have written code that relies on the behavior.
To me, semantically, the
Nick Coghlan added the comment:
+1 from me.
The deprecation warning text in the patch has a typo (callback instead of
callable).
For the documentation, in addition to noting the deprecation itself, it may
also be worth noting how to explicitly recreate the type restriction.
--
Eric Snow added the comment:
I've updated the cordereddict branch on the feature repo to fix the ref leak on
None. I'm still seeing other leaks (regrtest -R 3:3), but I don't think that
should block landing before the feature freeze.
However, I'm concerned about a segfault I'm seeing roughly
Antoine Pitrou added the comment:
A patch shouldn't be integrated if there are known bugs with it (especially
segfaults).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Changes by smparkes smpar...@smparkes.net:
--
nosy: +smparkes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24251
___
___
Python-bugs-list mailing
Eric Snow added the comment:
Agreed. I wanted to be clear about what is blocking landing the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Guido van Rossum added the comment:
I am going to commit this (or something very close to it) unless I hear an
explicit rejection notice from Mark Shannon. Off-list he's promised he'll
approve the PEP provisionally, and the window for beta 1 is closing. It's
better to iterate than to miss the
Nick Coghlan added the comment:
Oh, right - you said they weren't documented, and I completely glazed over that
bit.
The type restrictions comment isn't valid in the absence of documentation,
but it was basically about how to fully replicate the behaviour of the existing
functions in
Roundup Robot added the comment:
New changeset 64fba4ea031b by Yury Selivanov in branch 'default':
Issue 24248: Deprecate inspect.Signature.from_function and .from_builtin
https://hg.python.org/cpython/rev/64fba4ea031b
--
nosy: +python-dev
___
Python
New submission from Antony Lee:
All's in the title: the output of pydoc foo where foo is a namespace package
(... e.g. any directory in the cwd) says that the package is defined as a
builtin (under the FILE entry) -- which is certainly incorrect.
--
components: Library (Lib)
messages:
R. David Murray added the comment:
Having to specify a command line option to get a normally clean test run just
doesn't feel like a good API. If there is a way to set that on the TestCase,
that would be OK.
There are other reasons to want the API I suggest, though...there is at least
one
Changes by Yury Selivanov yseliva...@gmail.com:
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24248
___
Yury Selivanov added the comment:
OK, committed! Thanks for the review, Nick.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24248
___
___
R. David Murray added the comment:
Raymond: this is currently marked as a documentation bug, and documentation is
mostly what the OP was asking for. So I'm reopening it.
That said, I think it is very appropriate to discuss fixing the behavior of
string's endswith and startswith, because
Nick Coghlan added the comment:
Given the two-release deprecation cycle, would it be worth using
PendingDeprecationWarning here? That way folks that only turned on
DeprecationWarning (rather than -Wall) wouldn't need to worry about this until
3.6.
As far as our own test suite goes, when
Eric Snow added the comment:
I've fixed most of the leaks now. The only remaining ones are:
test_clear : 5
test_repr_recursive : 3
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
Changes by Yury Selivanov yseliva...@gmail.com:
--
nosy: +gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24237
___
___
Python-bugs-list
Yury Selivanov added the comment:
Nick, please review the patch.
BTW, we will have *a lot* of warnings now when running tests with -Wall. Are we
going to employ from __future__ import generator_stop everywhere in 3.5?
--
keywords: +patch
nosy: +yselivanov
priority: normal - release
Changes by Yury Selivanov yseliva...@gmail.com:
Added file: http://bugs.python.org/file39443/gen_stop_warn.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24237
___
Changes by Yury Selivanov yseliva...@gmail.com:
Removed file: http://bugs.python.org/file39443/gen_stop_warn.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24237
___
Changes by Yury Selivanov yseliva...@gmail.com:
Removed file: http://bugs.python.org/file39442/gen_stop_warn.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24237
___
Eric Snow added the comment:
Regarding the segfault, the following does not fail:
./python -m test.regrtest --forever -m test_basic test_configparser
but this does:
for i in `seq 1 20`; do ./python -m test.regrtest -m test_basic
test_configparser ; done
--
Yury Selivanov added the comment:
Eric, could you please upload your latest patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
___
Yury Selivanov added the comment:
I documented the deprecation in the whatsnew section anyways.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24248
___
Yury Selivanov added the comment:
Had to regenerate the patch. Fixed some typos + now I use PyErr_WriteUnraisable
if PyErr_WarnFormat returns non-zero.
And yeah, PendingDeprecationWarning is a better choice.
--
Added file: http://bugs.python.org/file39444/gen_stop_warn.patch
Eric Snow added the comment:
Here's a diff from the current cordereddict branch of the feature repo.
--
Added file: http://bugs.python.org/file39445/cOrderedDict-4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
Yury Selivanov added the comment:
Are there really all that many warnings triggered for PEP 479?
Actually, with the attached patch the number of warnings is pretty low, we can
definitely fix/silence them where necessary. (I think I had a bug in one of my
first patches that triggered some
Demian Brecht added the comment:
BTW, thanks for the reviews Martin and the nudge Antoine!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12319
___
Demian Brecht added the comment:
Latest patch should address all outstanding comments.
--
Added file: http://bugs.python.org/file39447/issue12319_6.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12319
New submission from Eric Snow:
Here's a work-in-progress patch that uses OrderedDict as the default class
definition namespace (instead of dict). While the actual class namespace is a
dict, the definition order is preserved on a new attribute on class objects:
__definition_order__. This is
Augie Fackler added the comment:
In any way Mercurial people need their own wrapper if they want to support
Python 3.5.
We need format operations on bytes objects, so we have no plans to support
Python3 for any version before 3.5.
--
___
Python
99 matches
Mail list logo