Ethan Furman added the comment:
Huh. I just checked `help(Color)` on my proposed __dir__ and got the two-line,
rather useless, response. Perhaps help() is broken with all custom __dir__s.
--
___
Python tracker rep...@bugs.python.org
Vajrasky Kok added the comment:
Thanks, Benjamin, for reviewing my patch.
Attached the fourth patch to wrap the business part inside the try ...
finally.
--
Added file:
http://bugs.python.org/file31237/formatter_fix_resource_warning_v4.patch
___
Benjamin Peterson added the comment:
That will fail if fp is not assigned before an exception is raised. I mostly
mean the part starting with the for loop.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18644
Vajrasky Kok added the comment:
Ah, sorry about that.
Attached the fifth patch to only wrap for loop section inside the try...
finally.
--
Added file:
http://bugs.python.org/file31238/formatter_fix_resource_warning_v5.patch
___
Python tracker
Mark Dickinson added the comment:
About the implementation of sum: it's worth noting that the algorithm you're
using for floats depends on correct rounding of addition and subtraction, and
that that's not guaranteed. See the existing test (testFsum) in test_math for
more information, and
Serhiy Storchaka added the comment:
Which one is the preferred way to go? requires or test needs or needs?
Or it does not matter?
I used the wording which used in other skips in the same file or in similar
skips in other files. If it matters I will correct messages.
Which one is the
Serhiy Storchaka added the comment:
See also issue17974.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16799
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Error message got more than %d bytes is misleading because in most cases
(except storlines()) we read not bytes but a text string.
There are 4 changes in the ftplib module but only one of them covered by test.
--
nosy: +serhiy.storchaka
Mark Dickinson added the comment:
From the code:
# Also, like all dunder methods, we should call
# __float__ on the class, not the instance.
Why? I've never encountered this recommendation before. x.__float__() would
be clearer, IMO.
--
Mark Dickinson added the comment:
Why? I've never encountered this recommendation before. x.__float__()
would be clearer, IMO.
Hmm; it would be better if I engaged by brain before commenting. I guess the
point is that type(x).__float__(x) better matches the behaviour of the builtin
Mark Dickinson added the comment:
(We don't seem to care too much about the distinction in general, though:
there are a good few places in the std. lib. where obj.__index__() is used
instead of the more correct type(obj).__index__(obj).)
--
___
Antoine Pitrou added the comment:
PEP 445 allows you to customize the Python memory allocators, which is a better
solution than shipping several ones with Python ;-)
--
resolution: - wont fix
status: open - closed
___
Python tracker
Vajrasky Kok added the comment:
It happens because if the length of data is more than 1000:
def __write(self, line):
line is always bytes, not string
if self.__file is not None:
if self.__file.tell() + len(line) 1000:
self.file = self.make_file()
Vajrasky Kok added the comment:
Superseded by bug #18394.
Should we close this one by marking it as duplicate?
--
nosy: +vajrasky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18700
___
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: wont fix - out of date
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12075
___
___
Antoine Pitrou added the comment:
Yes, __del__ will interfere with garbage collection before Python 3.4. This is
pretty much expected (and is fixed in Python 3.4, but won't be backported).
--
nosy: +pitrou
resolution: - wont fix
stage: - committed/rejected
status: open - closed
Antoine Pitrou added the comment:
We need maybe an helper to clear all frames referenced by a traceback?
Yes. Something in the traceback module would be fine.
--
components: +Library (Lib) -Interpreter Core
versions: +Python 3.4 -Python 3.2
___
New submission from Christian Heimes:
Ryan Sleevi of the Google Chrome Security Team has informed us that Python's
SSL module doesn't handle NULL bytes inside subjectAltNames general names. It's
related to Ruby's CVE-2013-4073
Changes by Christian Heimes li...@cheimes.de:
Added file: http://bugs.python.org/file31242/CVE-2013-4073_py33.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18709
___
Changes by Christian Heimes li...@cheimes.de:
--
keywords: +patch
Added file: http://bugs.python.org/file31241/CVE-2013-4073_py34.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18709
Changes by Christian Heimes li...@cheimes.de:
Added file: http://bugs.python.org/file31243/CVE-2013-4073_py27.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18709
___
Christian Heimes added the comment:
Demo certificate:
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 0 (0x0)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation,
OU=Python Core Development,
Martijn Pieters added the comment:
The formatter module was deprecated? When?
It wasn't, that's the point I am raising. The `formatter` module was
exclusively used by the `htmllib` module, I am surprised the `formatter` module
wasn't part of that deprecation.
--
R. David Murray added the comment:
Pydoc uses DumbWriter.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18644
___
___
Ezio Melotti added the comment:
Even if the patch is applied only on 3.4, I would still like to see the
ValueError turned into ImportError for 2.7/3.3.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16396
New submission from Antoine Pitrou:
Attached patch adds PyState_GetModuleAttr() and converts the _csv module to use
it (as an example).
As you can see, the _csv module grows a little but it now has proper error
handling (previously, it didn't check for PyState_FindModule() returning NULL).
Christian Heimes added the comment:
Ryan Sleevi of the Google Chrome Security Team has informed us about another
issue that is caused by our failure to implement RFC 6125 wildcard matching
rules. RFC 6125 allows only one wildcard in the left-most fragment of a
hostname. For security reasons
Eli Bendersky added the comment:
Ethan, please revert your commit first. I liked the previous dir. The current
one is useless.
I think you may be right about help, but I didn't dig deep enough to be sure.
--
___
Python tracker
New submission from Antoine Pitrou:
PyErr_FormatV can be useful to write third-party helper functions. Patch
attached.
--
components: Interpreter Core
files: pyerr_formatv.patch
keywords: patch
messages: 194952
nosy: pitrou
priority: low
severity: normal
stage: patch review
status:
STINNER Victor added the comment:
I don't understand your change. Why do we need to change the _csv module and
why storing module global variables in the module dict is better than storing
them in a simple C structure?
--
nosy: +haypo
___
Python
Changes by Ronald Oussoren ronaldousso...@mac.com:
--
nosy: +ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18693
___
___
Antoine Pitrou added the comment:
I don't understand your change. Why do we need to change the _csv
module and why storing module global variables in the module dict is
better than storing them in a simple C structure?
I won't repeat what was already said in the python-dev thread:
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18711
___
___
Python-bugs-list
Christian Heimes added the comment:
The patch contains the new function and a patch for the CSV module. How about
you split it up across two patches: one for the new feature and one for the CSV
module? It makes review easier.
--
nosy: +christian.heimes
Antoine Pitrou added the comment:
Bundling the two was aimed at showcasing the effect the new function can have.
The function itself is trivial, there's not much point in reviewing it alone.
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
+PyObject *
+PyState_GetModuleAttr(struct PyModuleDef *def,
+ const char *name,
+ PyObject *restrict_type)
When the char* type is used, the function has usually the suffix String. I
prefer the PyIdentifier API because
STINNER Victor added the comment:
Does it really make sense to allow to open a certificate containing a NUL byte
in its name? How does OpenSSL and other projects handle this case?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18709
___
___
Python-bugs-list mailing
Christian Heimes added the comment:
OpenSSL's print() functions fail to handle the NULL byte in subjectAltName
(SAN) general names as they use strlen() or printf() functions with %s format
char. The subject and issuer elements with NULL bytes are handled correctly by
OpenSSL.
wget and curl
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17997
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
When the char* type is used, the function has usually the suffix
String. I prefer the PyIdentifier API because it avoids to create a
temporary Python Unicode object.
This is a convenience API, not a performance optimization.
It's the first type that I see
Roundup Robot added the comment:
New changeset 39697dcd97e3 by Ethan Furman in branch 'default':
Issue 18693: Put custom __dir__ back in place. Will instead look at fixing
`help()`.
http://hg.python.org/cpython/rev/39697dcd97e3
--
___
Python
Eli Bendersky added the comment:
The patched code looks better than the original one in several respects, but I
think it raises some questions.
I agree with Victor that the type-checking API is unnatural, but I also think
there may be a deeper issue hiding behind. You felt compelled to add
Antoine Pitrou added the comment:
Previously, the only way to add a dialect was through register_dialect that
does
type checking to make sure it gets a legit dialect object. Now, the _dialects
dict is
directly accessible to Python code and it can add arbitrary objects to it
(both as
New submission from Mark Dickinson:
Nitpick: the pure Python version of operator.index (new in Python 3.4,
introduced in issue #16694) doesn't match the C version, in that it looks up
__index__ on the object rather than the class.
iwasawa:cpython mdickinson$ ./python.exe
Python 3.4.0a1+
Nick Coghlan added the comment:
Breaking the 1:1 interpreter - extension module mapping involves
adding custom types to sys.modules rather than module objects. Making
that work sensibly will involve larger changes to the extension
initialisation APIs. import-sig already has plans for this :)
Eli Bendersky added the comment:
Previously, the only way to add a dialect was through register_dialect
that does
type checking to make sure it gets a legit dialect object. Now, the
_dialects dict is
directly accessible to Python code and it can add arbitrary objects to
it (both as
Louis Riviere added the comment:
Thanks Benjamin !
I should have known that Python doesn't break things :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18660
___
New submission from Nick Coghlan:
One problem with Unicode in 3.x is that surrogateescape isn't normally enabled
on stdin and stdout. This means the following code will fail with
UnicodeEncodeError in the presence of invalid filesystem metadata:
print(os.listdir())
We don't really want
R. David Murray added the comment:
My gut reaction to this is that it feels dangerous. That doesn't mean my gut
is right, I'm just reporting my reaction :)
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
Nick Coghlan added the comment:
Everything about surrogateescape is dangerous - we're trying to work
around the presence of bad data by at least allowing it to be
tunnelled through Python code without corrupting it further :)
--
___
Python tracker
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18367
___
Changes by Brett Cannon br...@python.org:
--
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18451
___
Derek Wilson added the comment:
dictConfig and fileConfig are nice for static needs, but when I want to quickly
enable a complex (but not complicated) logging flow I find it just as tedious
as the current situation with the direct API.
... as at the very least every handler would need to be
Seydou Dia added the comment:
I have a hard time figuring out what exactly BytecodeTestCase methods actually
do. Thus the documentation is not probably accurate.
--
keywords: +patch
Added file: http://bugs.python.org/file31247/issue-18578.diff
___
Roundup Robot added the comment:
New changeset 2294594fbe6c by Brett Cannon in branch 'default':
Closes issue #18598: Have the exception message for
http://hg.python.org/cpython/rev/2294594fbe6c
--
nosy: +python-dev
___
Python tracker
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18598
___
Brett Cannon added the comment:
This is still a warning and so I'm still looking for a solution.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12837
___
Roundup Robot added the comment:
New changeset a89226508a04 by Larry Hastings in branch '3.3':
Issue #18667: Add missing HAVE_FCHOWNAT symbol to posix._have_functions.
http://hg.python.org/cpython/rev/a89226508a04
--
nosy: +python-dev
___
Python
Roundup Robot added the comment:
New changeset 92de1a5dc3ea by Larry Hastings in branch 'default':
Issue #18667: Add missing HAVE_FCHOWNAT symbol to posix._have_functions.
http://hg.python.org/cpython/rev/92de1a5dc3ea
--
___
Python tracker
Larry Hastings added the comment:
Fixed in 3.3 and trunk. Thanks for the report!
--
assignee: - larry
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
Madison May added the comment:
Here's a minor revision to that patch removing an unnecessary
@skip_if_dont_write_bytecode decorator from the test I added to test_import.py.
No docs changes are included in the current patch -- I'm guessing this should
probably wait until we have all the
Changes by Madison May madison@students.olin.edu:
Added file: http://bugs.python.org/file31248/Issue18416_v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18416
___
Madison May added the comment:
Good catch, Vajrasky. I'll close the issue and add my brief report to bug
#18394.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18700
Madison May added the comment:
I ran into a similar issue (see #18700) with test_cgi.
``/home/mmay/cpython/Lib/test/test_cgi.py:276: ResourceWarning: unclosed file
_io.BufferedRandom name=3``
--
nosy: +madison.may
___
Python tracker
Antoine Pitrou added the comment:
Hey Catherine,
Do you want to update your patch to include Vajrasky's suggestion?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1666318
___
Larry Hastings added the comment:
Attached is an updated patch, this time for 3.3. (So I'm guessing we won't get
a review link.) It incorporates Benjamin's two comments.
--
Added file: http://bugs.python.org/file31249/larry.setxattr.zfs.3.3.patch.1.txt
Benjamin Peterson added the comment:
Okay. Hopefully, we can kill that thing one day...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
Steven D'Aprano added the comment:
On 09/08/13 21:49, Oscar Benjamin wrote:
I think that the argument `m` to variance, pvariance, stdev and pstdev
should be renamed to `mu` for pvariance/pstdev and `xbar` for
variance/stdev. The doc-strings should carefully distinguish that `mu`
is the
Jason R. Coombs added the comment:
My sense on the issue is that wintypes was added to the library and was never
intended to raise a ValueError on import. By that logic, the behavior is a bug,
not a new feature. I agree with Ezio that raising a ValueError on import is a
bug. And since the
New submission from Kevin Jing Qiu:
PyConCA 2013 sprint task
--
components: Tests
messages: 194986
nosy: Kevin.Jing.Qiu
priority: normal
severity: normal
status: open
title: Add tests for pdb.find_function
type: enhancement
versions: Python 3.5
___
Changes by Kevin Jing Qiu kevin.jing@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file31251/mywork.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18714
___
New submission from Seydou Dia:
When I run the tests suit with coverage (e.g, ./python COVERAGEDIR run --pylib
Lib/test/regrtest.py test_frame), the following tests fails:
* test_frame
* test_xml_etree
* test_threading_local
* test_super
* test_importlib
The tracebacks are available
Antoine Pitrou added the comment:
Updated patch renaming summarize() to shorten(), and adding docs and a fix for
a nit reported by Vajrasky.
--
Added file: http://bugs.python.org/file31250/shorten.patch
___
Python tracker rep...@bugs.python.org
New submission from Brett Cannon:
Turns out the formatter module isn't really used by anyone. Pydoc uses it, but
it could easily use textwrap. Searching on Github shows a usage by someone who
simply re-exposes it as part of their own public API but has no actual usage
themselves
Éric Araujo added the comment:
There is a README in the Doc directory. Wouldn’t it be enough to point to that
file from the main README?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18707
Larry Hastings added the comment:
Kill what thing? The review link? I love that thing?
Anyway, we did get a review link, hoopla!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
Steven D'Aprano added the comment:
On 12/08/13 19:21, Mark Dickinson wrote:
About the implementation of sum: it's worth noting that the algorithm you're
using for floats depends on correct rounding of addition and subtraction, and
that that's not guaranteed.
[...]
Steven: any thoughts
Changes by Brett Cannon br...@python.org:
--
assignee: - brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18716
___
___
Mark Dickinson added the comment:
Okay, that works. I agree that not documenting add_partial is probably a good
plan.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18606
___
Vinay Sajip added the comment:
If 3rd party handlers are intelligent
It's not an ideal world. Sorry, but I think this change is too invasive to
consider. I can't believe this change is really needed - logging has been
around since 2002 and this has never been raised before.
--
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18716
___
___
Larry Hastings added the comment:
+1
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18716
___
___
Python-bugs-list mailing list
New submission from Muhammad Jehanzeb:
As part of pyconca sprints, this is my first patch for urlcleanup test
--
components: Tests
files: test_urllib.py
messages: 194996
nosy: mjehanzeb
priority: normal
severity: normal
status: open
title: test for request.urlretrieve
type: enhancement
Ezio Melotti added the comment:
Thanks for your contribution. Can you submit this as a diff?
--
nosy: +ezio.melotti
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18717
Serhiy Storchaka added the comment:
Here is a preliminary patch which get rids of _convert_namespace_to_getopt()
and directly uses a Namespace object. Unfortunately it breaks tests because
test_regrtest depends on implementation details of the regrtest module and uses
Serhiy Storchaka added the comment:
We can use type(a).__index__(a). Should we also correct the documentation for
operator.index() and operator.length_hint()?
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
Muhammad Jehanzeb added the comment:
the patch fie
--
keywords: +patch
Added file: http://bugs.python.org/file31255/mywork.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18717
___
Changes by Muhammad Jehanzeb mjehan...@gmail.com:
Removed file: http://bugs.python.org/file31253/test_urllib.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18717
___
Roundup Robot added the comment:
New changeset adbc9789a5e4 by David Wolever in branch '2.7':
Issue #17701: Improving strftime documentation
http://hg.python.org/cpython/rev/adbc9789a5e4
--
nosy: +python-dev
___
Python tracker rep...@bugs.python.org
Ezio Melotti added the comment:
+1
--
type: - enhancement
versions: +Python 2.7, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18707
___
Changes by Muhammad Jehanzeb mjehan...@gmail.com:
Removed file: http://bugs.python.org/file31255/mywork.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18717
___
Muhammad Jehanzeb added the comment:
included issue# in the patch file
--
Added file: http://bugs.python.org/file31256/issue18717.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18717
Changes by Muhammad Jehanzeb mjehan...@gmail.com:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18717
___
___
Oscar Benjamin added the comment:
On 12 August 2013 20:20, Steven D'Aprano rep...@bugs.python.org wrote:
On 12/08/13 19:21, Mark Dickinson wrote:
About the implementation of sum:
add_partial is no longer documented as a public function, so I'm open to
switching algorithms in the future.
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18699
___
___
Antoine Pitrou added the comment:
Updated patch addressing Ezio's comments.
--
Added file: http://bugs.python.org/file31257/shorten2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18585
Mark Dickinson added the comment:
Yes, I think it would make sense to fix the docs as well, at least for Python
3.4. Probably not worth it for the maintenance releases.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18712
Ned Deily added the comment:
Please upload the test results as file attachment(s) to this issue. Files
stored elsewhere may disappear.
--
nosy: +ned.deily
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18715
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18677
___
___
Python-bugs-list mailing
1 - 100 of 150 matches
Mail list logo