[issue16930] mention limitations and/or alternatives to hg graft

2013-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: 16.6 is just what I was suggesting. I had not read that far in the revised version. But I am glad I did to find out about auto-commit. There have been issues where I would not want that. (I will check to see if commit is really 'alwats' or if there is an

[issue17316] Add Django 1.5 to benchmarks

2013-02-28 Thread Ramchandra Apte
Changes by Ramchandra Apte maniandra...@gmail.com: -- components: +Benchmarks versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17316 ___

[issue17170] string method lookup is too slow

2013-02-28 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17170 ___ ___ Python-bugs-list

[issue16954] Add docstrings for ElementTree module

2013-02-28 Thread David Lam
David Lam added the comment: here's an updated patch incorporating the feedback from Ezio and Eric: - moved docstrings put in some __special__ method names - made the description of 'tag' consistent: 'tag' means the elements name (as opposed to 'tag' being a synonym for element!) -

[issue16465] dict creation performance regression

2013-02-28 Thread Christian Heimes
Christian Heimes added the comment: The patch gives a measurable speedup (./python is a patched 3.3.0+). IMO we should apply it. It's small and I can see no harm, too. $ for PY in python2.7 python3.2 python3.3 ./python; do cmd=$PY -R -m timeit -n 1000 '{};{};{};{};{};{};{};{};{};{}'; echo

[issue17320] os.path.abspath in window7, return error

2013-02-28 Thread xiaowei
New submission from xiaowei: assert os.path.split( os.path.abspath('\xe7\x8e\xb0' ) )[-1] == '\xe7\x8e\xb0' # it should be true(no error) but py2.7 in window it's false # and when linux it's ok # os.path.split( os.path.abspath('\xe7\x8e\xb0' ) )[-1] == '\xe7\x8e' # i guess it's a real bug ,

[issue12641] Remove -mno-cygwin from distutils

2013-02-28 Thread Dan
Dan added the comment: That's bull, Eric. This is not about a corner case in cygwin. This is about mingw, which is the **main free software that builds executables on Windows**. You know, for when you don't want to require your users to install Visual Studio. Additionally, both you and

[issue16930] mention limitations and/or alternatives to hg graft

2013-02-28 Thread Ezio Melotti
Ezio Melotti added the comment: (I will check to see if commit is really 'alwats' or if there is an option to not commit, as with import and merge.) There isn't AFAIK, but two tricks I use are: 1) hg diff -c tip to check the diff of what I just grafted; 2) hg rollback to rollback the

[issue17063] assert_called_with could be more powerful if it allowed placeholders

2013-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just got bitten by this again. Context: I have a protocol which is sending JSON datagrams over the wire and I'm checking the sent data. I can't exactly check the JSON-encoded content since dict ordering is undefined. So right now I have to write:

[issue17063] assert_called_with could be more powerful if it allowed placeholders

2013-02-28 Thread Michael Foord
Michael Foord added the comment: Note that there is nothing stopping you using the mock.ANY and assert_called_once_with style assert currently. You're making your assert more clumsy than it needs to be. With my proposal you could write: q.tranport.assert_called_once_with(mock.ANY, (PEER,

[issue17063] assert_called_with could be more powerful if it allowed placeholders

2013-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I still have to do some tuple unpacking myself while assert_* already did it first. It can be tedious and error-prone (especially if there are several arguments to get). If the assert methods returning something bothers you, how about introducing a new

[issue17063] assert_called_with could be more powerful if it allowed placeholders

2013-02-28 Thread Michael Foord
Michael Foord added the comment: Or create a JsonMatcher class that does it for you. class JsonMatcher(object): def __init__(self, expected): self.expected = expected def __eq__(self, other): return json.loads(other) == self.expected

[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-02-28 Thread Henrik Heimbuerger
Henrik Heimbuerger added the comment: That sounds good, Eli! I'll check the implementations and then adapt the other ElementTree methods as well. Will take until next week, though. -- ___ Python tracker rep...@bugs.python.org

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
New submission from Joe Borg: If I want to use imp to find some load modules, I have to do it in quite an unpythonic way: name = os file, pathname, description = imp.find_module(name) imp.load_module(name, file, pathname, description) Can there not be a better way to pass the tuple (or

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread R. David Murray
R. David Murray added the comment: Does importlib in Python3 provide what you need? (New features such as this cannot be added to Python2.) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17321

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Ezio Melotti
Ezio Melotti added the comment: imp e imp.find/load_module() are also deprecated (or will be deprecated soon). -- nosy: +brett.cannon, ezio.melotti type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17321

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
Joe Borg added the comment: Thanks for the swift feedback guys, if this is deprecated (i.e. not being carried to Python 3) then close the bug; I'll look at `importlib` and see if it carries the same problem. -- type: behavior - ___ Python tracker

[issue12641] Remove -mno-cygwin from distutils

2013-02-28 Thread Éric Araujo
Éric Araujo added the comment: [Martin] Thanks for the message. My previous message actually quoted Dan, not you, so no apology is necessary. [Dan] That's bull, Eric. Could you rephrase this? English is not my native language. This is not about a corner case in cygwin. Oops I confused

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Brett Cannon
Brett Cannon added the comment: Both imp.find_module() and load_module() have been documented as deprecated since Python 3.3. I have not added the warning as I have to work through the stdlib first to remove all current uses. But for what you are after, Joe, just use importlib.import_module()

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
Joe Borg added the comment: Hi Brett, I missed the fact that it's deprecated as it's not mentioned in the 2.* docs http://docs.python.org/2/library/imp.html. I can see it is in the 3.*. Thanks for the feedback. -- ___ Python tracker

[issue12641] Remove -mno-cygwin from distutils

2013-02-28 Thread Jon
Jon added the comment: [Eric] This is about mingw, which is the **main free software that builds executables on Windows**. You know, for when you don't want to require your users to install Visual Studio. Let me state that I fully sympathize with people who use Windows and still want to use

[issue16930] mention limitations and/or alternatives to hg graft

2013-02-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: The first and/or main place that recommends hg graft should link to the section with more detail for cases where users experience problems with graft. I also agree that the section should mention the case-folding error. I'm using a pretty new version of hg

[issue10967] move regrtest over to using more unittest infrastructure

2013-02-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: Extending regrtest to support unittest test discovery directly is also a worthwhile specific proposal. Updating the tests to support discovery in all cases is discussed in (meta) issue 16748. There are also many individual issues in the tracker (one per

[issue17307] HTTP PUT request Example

2013-02-28 Thread karl
karl added the comment: Sentil: About the PUT/POST, I would say: A POST and PUT methods differs only by the intent of the enclosed representation. In the case of a POST, the target resource (URI) on the server decides what is the meaning of the enclosed representation

[issue17279] Document which named built-in classes can be subclassed

2013-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: From the current python-ideas 'range' thread: Me: Would it be correct to say (now) that all 4 are intentional omissions? and not merely oversights? Nick: Yes, I think so. People will have to be *real* convincing to explain a case where composition isn't a more

[issue14468] Update cloning guidelines in devguide

2013-02-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: Ezio, did you delete the section on null-merging in your commits? I don't see it in the devguide anymore. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14468

[issue12455] urllib2 forces title() on header names, breaking some requests

2013-02-28 Thread karl
karl added the comment: Note that HTTP header fields are case-insensitive. See http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging#section-3.2 Each HTTP header field consists of a case-insensitive field name followed by a colon (:), optional whitespace, and the field value.

[issue17322] urllib.request add_header() currently allows trailing spaces

2013-02-28 Thread karl
New submission from karl: For HTTP header field names parsing, see http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-22#section-3.2.4 No whitespace is allowed between the header field-name and colon. In the past, differences in the handling of such whitespace have led to

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-02-28 Thread karl
Changes by karl karl+pythonb...@la-grange.net: -- title: urllib.request add_header() currently allows trailing spaces - urllib.request add_header() currently allows trailing spaces (and other weird stuff) ___ Python tracker rep...@bugs.python.org

[issue16901] In http.cookiejar.FileCookieJar() the .load() and .revert() methods don't work

2013-02-28 Thread py.user
py.user added the comment: Demian Brecht: My proposal was made to python-ideas. try this http://mail.python.org/mailman/listinfo/python-dev -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16901

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-02-28 Thread karl
karl added the comment: Yet another one leading spaces :( req = urllib.request.Request('http://www.example.com/') req.header_items() [] req.add_header(' Foo3', 'Ooops') req.header_items() [(' foo3', 'Ooops')] req.headers {' foo3': 'Ooops'} --

[issue12455] urllib2 forces title() on header names, breaking some requests

2013-02-28 Thread karl
karl added the comment: So looking at the casing of headers, I discovered other issues. I opened another bug. http://bugs.python.org/issue17322 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455

[issue17299] Test cPickle with real files

2013-02-28 Thread R. David Murray
R. David Murray added the comment: Aman: another nit: PEP8 calls for no unneeded parentheses around logical expressions, so things like: if(self.f): should be written: if self.f: in order to adhere to our coding style. Also, it's not obvious to me that there is any reason to rename

[issue747320] rfc2822 formatdate functionality duplication

2013-02-28 Thread R. David Murray
R. David Murray added the comment: Could you regenerate your patch using hg diff? (or at least diff -u)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue747320 ___

[issue12641] Remove -mno-cygwin from distutils

2013-02-28 Thread Dan
Dan added the comment: There's an additional aspect. Even though I don't use Windows as a development platform, I care about being able to propose Python to clients as a cross-platform technology (instead of, say, Java). Having an essential piece of Python infrastructure fail miserably on

[issue12641] Remove -mno-cygwin from distutils

2013-02-28 Thread Jon
Jon added the comment: Eric, I'm assuming you are the key decision maker for any fix. As I want to see this issue stay razor focused, where specifically do you need community help? Depending upon your needs, I can test on my win7 32bit notebook with official python 2.7.3. It also has arch

[issue747320] rfc2822 formatdate functionality duplication

2013-02-28 Thread karl
karl added the comment: R. David Murray: Sure. Is it better? issue-747320-1.patch It seems there are already tests for gmt date format in Lib/test/test_email/test_utils.py -- Added file: http://bugs.python.org/file29279/issue-747320-1.patch ___

[issue17299] Test cPickle with real files

2013-02-28 Thread Aman Shah
Aman Shah added the comment: I had put in the renaming because ioclass is not defined in the class itself, only in the subclasses. So, instantiating it and using dumps/loads would be meaningless and would raise an error. Which is similar to the behavior of an abstract class. Also, the