Eric V. Smith e...@trueblade.com added the comment:
To your last point, I think it's important to specify the default value
placeholder (basically a sentinel) in the documentation. For example, if a
function takes -1 to mean all occurrences, then the caller needs to know how
what value to
Éric Araujo mer...@netwok.org added the comment:
Hi Karl,
I’m not clear about what problem or need this report describes. Is it a
proposition to add a new method for SimpleHTTPRequestHandler to handle HEAD
requests?
--
nosy: +eric.araujo
versions: +Python 3.3 -Python 3.1, Python 3.2
Éric Araujo mer...@netwok.org added the comment:
I made comments on Rietveld but there was a glitch, I’m not sure the email was
sent.
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13297
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13298
___
___
Python-bugs-list
Éric Araujo mer...@netwok.org added the comment:
collections.namedtuple provides a much nicer interface than sqlite3.Row
Definitely!
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13299
Éric Araujo mer...@netwok.org added the comment:
The contents are valid UTF-8; the problem does not seem related to
PYTHONIOENCODING (run “python3.2 Test.py | cat” so that stdout is not a tty;
this used to be buggy in 2.x, hence PYTHONIOENCODING, but in 3.x the encoding
of stdout is UTF-8
Éric Araujo mer...@netwok.org added the comment:
Thanks for the report. Have you found the bug with a real setup.cfg or hook,
or were you just reading the code?
I’m not sure how hard to fix this will be. The copy_file method delegates to
shutil.copyfile, but this does not have the arguments
Éric Araujo mer...@netwok.org added the comment:
Thanks for the report. I do not know if this something that we can fix in the
CPython repository by editing some template or config file or if it requires a
patch to Sphinx first. Georg?
--
nosy: +eric.araujo, georg.brandl
Éric Araujo mer...@netwok.org added the comment:
First, I’d like to remind that the robots spec is not an official Internet spec
backed up by an official body. It’s also not as important as (say) HTTP
parsing.
For this bug, IMO the guiding principle should be Postel’s Law. What harm is
karl karl+pythonb...@la-grange.net added the comment:
Eric,
Two possible solutions to explore:
Either the HEAD reports exactly the same thing than a GET without the body,
because it is the role of the GET, but that means indeed adding support for the
HEAD.
or creating a catch-all answer
New submission from Florent Xicluna florent.xicl...@gmail.com:
Sometimes we want to check the exact type of an object.
The method assertIsInstance could be misleading in such case.
The current workaround is:
assertIs(type(obj), some_class)
However we can add an argument to the method to keep
Éric Araujo mer...@netwok.org added the comment:
Thanks, I’ve made some comments on Rietveld.
Added a recommendation to only use keywords, which seems sane given
the number of arguments.
I looked for that but couldn’t find it.
--
nosy: +eric.araujo
Ezio Melotti ezio.melo...@gmail.com added the comment:
I'm not sure this is common enough to justify a new arg. The status quo has
the advantage that is quite close with what we would use in an 'if' statement
(i.e. either if isinstance(obj, some_class): or if type(obj) is
some_class:).
Changes by Éric Araujo mer...@netwok.org:
--
keywords: +easy
nosy: +eric.araujo
title: Documentation of open() does not claim 'e' support in mode string -
Document how to use open with os.O_CLOEXEC
versions: +Python 3.3 -Python 2.7
___
Python
Éric Araujo mer...@netwok.org added the comment:
It seems to me this is not a bug. Closing?
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13264
___
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13286
___
___
Python-bugs-list
Ezio Melotti ezio.melo...@gmail.com added the comment:
The problem is when the default placeholder is some unique object() or some
_internal value (we had something similar with a socket timeout once).
Also for something like str.strip(), would you document chars=None or chars=
\n\r\t\v\f?
Nadeem Vawda nadeem.va...@gmail.com added the comment:
I'm no longer getting the failures on either Ubuntu or Windows (and the
Windows buildbots are now green), so tentatively marking this as fixed.
Feel free to reopen if something is still broken.
--
resolution: - fixed
stage: needs
Éric Araujo mer...@netwok.org added the comment:
I’ve spent some time on this.
First, I decided that the former name (reinitialize_command) of the method was
better. The get_* name could create the impression that the returned object
was independent from the internal caches (command_obj,
Changes by Éric Araujo mer...@netwok.org:
Added file: http://bugs.python.org/file23659/fix-reinitialize-command.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
___
Éric Araujo mer...@netwok.org added the comment:
BTW, here’s the changeset to rename get_reinit_etc.
--
Added file: http://bugs.python.org/file23660/rename-grc.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12344
Éric Araujo mer...@netwok.org added the comment:
A 1999 comment in build_py from Greg Ward agrees with me:
# XXX hey! we can't control whether we optimize or not; that's up
# to the invocation of the current Python interpreter (at least
# according to the py_compile docs). That
Éric Araujo mer...@netwok.org added the comment:
This problem was not trivial to find, because it appears that test execution
order may not be
entirely deterministic: I couldn't see any other reason why the flag would
have different values
on different machines.
On my machine, it looks
Éric Araujo mer...@netwok.org added the comment:
You are right. Even if it’s an undocumented internal type, there is no reason
not to fix it. There are plenty of similar crash fixes committed in the repo.
--
___
Python tracker
Changes by Florent Xicluna florent.xicl...@gmail.com:
Added file: http://bugs.python.org/file23661/grep_test_is_instance.log
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13387
___
Éric Araujo mer...@netwok.org added the comment:
Right now the HEAD returns something :)
Ah, so this is a bug.
I still need to propose a patch.
A patch to add a test (for 2.7 or 3.2, see devguide) would be a great first
step.
--
title: http.server - HEAD request when no resource is
Antoine Pitrou pit...@free.fr added the comment:
Antoine, I appreciate that you took time to fix this bug while I was
without Internet and without Windows, but unfortunately I will have to
backout your commit. Postel’s Law doesn’t win here: It is documented
that the MANIFEST template only
Changes by Florent Xicluna florent.xicl...@gmail.com:
Added file: http://bugs.python.org/file23662/grep_test_exact_type.log
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13387
___
Éric Araujo mer...@netwok.org added the comment:
I want to explore ideas about a schema/type system, so I’m removing the easy
keyword.
--
keywords: -easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13180
Florent Xicluna florent.xicl...@gmail.com added the comment:
At least in the standard library test suite, it should be useful.
When the test is stricter, it catches errors earlier.
I remember when assertIsInstance was made available (issue #7031), we started
to rewrite some expressions
Éric Araujo mer...@netwok.org added the comment:
I find that assertIs(type(x), someclass) is very clear, whereas an
assertIsInstance that would not behave like isinstance depending on one
argument would be non-obvious to me.
--
nosy: +eric.araujo
Éric Araujo mer...@netwok.org added the comment:
I’ve found a distutils commit that shows that this option was removed on
purpose, because people might except that using “install -b foo” would affect
the build command, but it does not. I don’t think it’s a problem. For people
who run build
Éric Araujo mer...@netwok.org added the comment:
That's should, not must.
I read that “should” as a polite “must”.
Also, I thought people did undocumented things with distutils, and we
had to support these undocumented uses?
People rely on undocumented features and sometimes on bugs. Thus,
Éric Araujo mer...@netwok.org added the comment:
I now think the change I did was wrong. See #12119.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9831
___
Antoine Pitrou pit...@free.fr added the comment:
A commit adding problem should be fixed or reverted
The point is that fixing it may take tome. Reverting is fine by me.
But we have no way of knowing you will be taking tome to do it.
Ideally, you should have reverted it yourself (or applied
Éric Araujo mer...@netwok.org added the comment:
Paul Moore reported that a Python built in its checkout on Windows has no
problem installing, so I’d like to revisit this. The patch was also
incomplete: The install module was changed, but people could still call
“pysetup run install_dist”,
Florent Xicluna florent.xicl...@gmail.com added the comment:
I would say that this one is clear too:
aelf.assertTrue(isinstance(obj, cls))
except that the failure message is not very friendly:
AssertionError: False is not true
If we keep assertIsInstance, more people will continue to
Éric Araujo mer...@netwok.org added the comment:
All three issues fixed, thanks! I can’t push today but I will as soon as
possible, probably Monday.
I will open another report for the change I reverted in config; it was done on
purpose by another developer to fix a bug with distutils2’s own
Éric Araujo mer...@netwok.org added the comment:
I ported the patch to distutils2, but it fails because of some unittest
internal problem. Help welcome.
--
Added file: http://bugs.python.org/file23664/test_support.py
___
Python tracker
Éric Araujo mer...@netwok.org added the comment:
I would say that this one is clear too:
aelf.assertTrue(isinstance(obj, cls))
except that the failure message is not very friendly:
AssertionError: False is not true
Yeah, you have to give something as third argument to ease debugging.
If
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1677872
___
___
Python-bugs-list
Éric Araujo mer...@netwok.org added the comment:
I had too the need to find out the value to pass when there are no flags, so a
mention of 0 in the doc would have been enough for me. -0 on a new constant.
--
___
Python tracker
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
Éric Araujo mer...@netwok.org added the comment:
Thanks for the report. Have you found the bug with a real setup.cfg or hook,
or
were you just reading the code?
I found the bug with a real setup.cfg (executable permission
Florent Xicluna florent.xicl...@gmail.com added the comment:
Thank you for your comments.
Uploaded a new version.
--
Added file: http://bugs.python.org/file23665/issue13297_xmlrpc_bytes_v4.diff
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
Here’s the patch produced by Mike and I so far.
--
keywords: +patch
Added file:
http://bugs.python.org/file23666/remove-duplicate-write_record_file.diff
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
+1 for a comment too. I’d even make it shorter:
# don't look at , it's not a real operator (see PEP 401)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13239
Éric Araujo mer...@netwok.org added the comment:
since the issue only applies when sdist --format gztar, I mention that here.
bztar will probably have the same issue.
Also, issue8396 suggests encoding using sys.getfilesystemencoding().
Good one!
--
title: python setup.py sdist
Roy Smith r...@panix.com added the comment:
New patch uploaded.
The added recommendation is around line 161 (look for 'Recommended usage is to
only use keyword arguments')
--
Added file: http://bugs.python.org/file23667/Issue13249-2.patch
___
Michael Foord mich...@voidspace.org.uk added the comment:
I think your proposed workaround is good enough and no extra effort to type
than the suggested change to assertIsInstance.
-1 on a new method
I think the behaviour of isinstance is clear enough that people who
misunderstand what
Antoine Pitrou pit...@free.fr added the comment:
I don't think there's a point in adding such an extra argument.
Why don't you just write
self.assertIs(type(myobj), sometype)
? How is the error message not good enough?
--
nosy: +pitrou
___
Eric Snow ericsnowcurren...@gmail.com added the comment:
@msg147513
Why don't you just write
self.assertIs(type(myobj), sometype)
+1
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13387
Eli Bendersky eli...@gmail.com added the comment:
I think we have enough 0 to reject the issue. Closing.
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13385
Changes by Petri Lehtinen pe...@digip.org:
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13329
___
___
Python-bugs-list
Eli Bendersky eli...@gmail.com added the comment:
I have converted the Doc/library/re.rst doc of 2.7 to follow the new convention
of 3.x, patch attached.
--
keywords: +patch
Added file: http://bugs.python.org/file23668/issue12875.1.patch
___
Python
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 63a24bff6f36 by Eli Bendersky in branch '3.2':
Issue #12767: documenting threading.Condition.notify
http://hg.python.org/cpython/rev/63a24bff6f36
New changeset ac12dcea69e1 by Eli Bendersky in branch 'default':
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 63a00d019bb2 by Eli Bendersky in branch '2.7':
Closes issue 12767: document the argument of threading.Condition.notify
http://hg.python.org/cpython/rev/63a00d019bb2
--
resolution: - fixed
stage: patch
Eli Bendersky eli...@gmail.com added the comment:
Éric, do you feel strongly about the wording, or can I just go ahead and commit
my version if I like it more :) ?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13239
New submission from Eli Bendersky eli...@gmail.com:
Our Hg repo has some useful hooks on commit messages that allow to
specify which issue to notify for commits, and which issue to close.
AFAIU, it's currently documented only in the code of the hook
Eli Bendersky eli...@gmail.com added the comment:
You should also explicitly specify what happens in several optional but not
keyword args are needed. AFAIU the convention is:
func(arg1, arg2[, opt1, opt2])
--
___
Python tracker
Eli Bendersky eli...@gmail.com added the comment:
Attaching a patch with the suggested change. Based on the doc-string in the
implementation of the hook.
--
keywords: +patch
Added file: http://bugs.python.org/file23669/issue13388.1.patch
___
Python
Florent Xicluna florent.xicl...@gmail.com added the comment:
+1 on a doc addition (I can even volunteer a patch)
I agree we can highlight the difference between assertIs(type(obj), cls) and
assertIsInstance(obj, cls) in the documentation.
Let's forget this patch and keep it simple.
Petri Lehtinen pe...@digip.org added the comment:
I'm not sure if it matters, but Sphinx documentation suggests using ^ as the
underlining character for subsubsections.
Otherwise, looks good.
--
nosy: +petri.lehtinen
___
Python tracker
Eli Bendersky eli...@gmail.com added the comment:
Petri, I have actually tried to stay consistent within the same document, and
it uses ' for this level of heading. Perhaps it's just not following the Sphinx
guide?
IIRC the restructured text parser will also shout at you if these are
Petri Lehtinen pe...@digip.org added the comment:
Ah, sorry. I didn't check other files in the devguide. The ReST parser is OK
with any underline character, as long as it's consistent within a single file.
--
___
Python tracker
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset d2b0751174f6 by Petri Lehtinen in branch '2.7':
Update mailbox.Maildir tests
http://hg.python.org/cpython/rev/d2b0751174f6
New changeset b3c5e1c62839 by Petri Lehtinen in branch '3.2':
Update mailbox.Maildir tests
Daniel Urban urban.dani...@gmail.com added the comment:
It seems to me this is not a bug.
+1
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13264
___
sbt shibt...@gmail.com added the comment:
I notice that the patch changes rename() and link() to use
win32_decode_filename() to coerce the filename to unicode before using
the wide win32 api. (Previously, rename() first tried the wide api,
falling back to narrow if that failed; link() used wide
New submission from Antoine Pitrou pit...@free.fr:
Complete gc collections currently clear all freelists, except for the freelist
of list objects. Attached patch fixes the omission.
--
components: Interpreter Core
files: listfreelist.patch
keywords: patch
messages: 147530
nosy: pitrou
New submission from Antoine Pitrou pit...@free.fr:
This patch adds a counting of the number of allocated memory blocks (through
the PyObject_Malloc API). Together with -R, it can help chase those memory
leaks which aren't reference leaks (see c6dafa2e2594).
The sys.getallocedblocks() function
Antoine Pitrou pit...@free.fr added the comment:
Victor, can you fix the test failures on Windows and 2.7?
Otherwise the commit should be reverted.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7732
Antoine Pitrou pit...@free.fr added the comment:
Dicts also have a freelist which isn't freed either. New patch attached.
--
Added file: http://bugs.python.org/file23672/listdictfreelist.patch
___
Python tracker rep...@bugs.python.org
Changes by Andreas Stührk andy-pyt...@hammerhartes.de:
--
nosy: +Trundle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13390
___
___
Antoine Pitrou pit...@free.fr added the comment:
Two things:
- you duplicated the part with CFUNCTYPE(c_int)(lambda: None) without
removing the original chunk of code
- some platforms can't compile ctypes, you must handle that case in regrtest
Otherwise, good idea.
--
nosy: +pitrou
Antoine Pitrou pit...@free.fr added the comment:
Fix the return values and add documentation.
--
Added file: http://bugs.python.org/file23673/listdictfreelist.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13389
Changes by Antoine Pitrou pit...@free.fr:
--
title: Clear lists freelist in gc.collect() - Clear lists and dicts freelist
in gc.collect()
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13389
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file23672/listdictfreelist.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13389
___
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
Thank you for closing this. I think it would only add clutter to a module that
is already puts readers into information overload.
--
nosy: +rhettinger
___
Python tracker
Martin v. Löwis mar...@v.loewis.de added the comment:
Is this approach of coercing to unicode and only using the wide api
blessed?
It's not. If people use byte strings, they specifically ask for what
they get; Python shouldn't second-guess the data types.
I certainly think it should be. If
New submission from Dave Mankoff man...@gmail.com:
Title pretty much says it all. Simple test case:
len(u' \t\r\n\u200B'.strip())
1
Should be zero.
Same problem in Python3:
len(' \t\r\n\u200B'.strip())
1
--
components: Unicode
messages: 147538
nosy: ezio.melotti, mankyd
priority:
Nick Coghlan ncogh...@gmail.com added the comment:
I added some review comments to the patch, but I'm not sure how usable this is
going to be in practice. References generally stay fairly stable while using
the interactive interpreter, but the new block accounting jumps around all over
the
New submission from Antoine Pitrou pit...@free.fr:
#13146 solved the issue of writing pyc files under POSIX. Under Windows, the
problem still exists, as the following buildbot failure shows:
[317/360] test_multiprocessing
Traceback (most recent call last):
File string, line 1, in module
Changes by Antoine Pitrou pit...@free.fr:
--
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13391
___
___
Python-bugs-list
Terry J. Reedy tjre...@udel.edu added the comment:
My suggested doc change is how to change the doc along with the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13281
___
Terry J. Reedy tjre...@udel.edu added the comment:
The two methods are defined differently, and act as defined, so this is a
feature request, not a bug report.
str.split([sep[, maxsplit]])
... If maxsplit is given, at most maxsplit splits are done (thus, the list will
have at most maxsplit+1
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
This patch looks fine.
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12875
___
Ezio Melotti ezio.melo...@gmail.com added the comment:
LGTM
--
stage: - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12875
___
___
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
Terry, thanks for closing this. The API for str.split() has been set in stone
for a very long time.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13346
Terry J. Reedy tjre...@udel.edu added the comment:
Improving error messages has been a long, slow process as people are irritated
enough to make a change. Please go ahead.
Guido has explicitly excluded exception detail from the language spec multiple
times. Test that depend on details are
Ezio Melotti ezio.melo...@gmail.com added the comment:
str.strip uses Py_UNICODE_ISSPACE that in turn uses _PyUnicode_IsWhitespace
(see Objects/unicodetype_db.h#l3347), and according to the comment there it
Returns 1 for Unicode characters having the bidirectional type 'WS', 'B' or
'S' or the
Terry J. Reedy tjre...@udel.edu added the comment:
3.2 doc entry:
random.triangular(low, high, mode)
Return a random floating point number N such that low = N = high and with the
specified mode between those bounds. The low and high bounds default to zero
and one. The mode argument defaults
New submission from Antoine Pitrou pit...@free.fr:
The main current user of BufferedReader.read1() is TextIOWrapper. In this
context, read1() is used to signal that we want to bypass binary buffering as
much as possible, since TextIOWrapper does its own buffering. The current
read1()
Changes by Antoine Pitrou pit...@free.fr:
Added file: http://bugs.python.org/file23676/textioread.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13393
___
New submission from Oleg Plakhotnyuk oleg...@gmail.com:
I've increased coverage of aifc.py by test_aifc.py:
before:
[1/1] test_aifc
lines cov% module (path)
56063% aifc (/Users/family/Documents/code/python/repo/Lib/aifc.py)
...
after:
[1/1] test_aifc
lines cov% module
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +r.david.murray
stage: - patch review
versions: +Python 3.2, Python 3.3 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13394
94 matches
Mail list logo