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
Changes by Ramchandra Apte maniandra...@gmail.com:
--
components: +Benchmarks
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17316
___
Changes by Mark Shannon m...@hotpy.org:
--
nosy: +Mark.Shannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
___
Python-bugs-list
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!)
-
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
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 ,
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
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
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:
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,
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
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
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
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
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
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
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
É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
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()
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
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
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
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
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
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
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
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.
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
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
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
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'}
--
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
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
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
___
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
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
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
___
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
38 matches
Mail list logo