Chris Rebert added the comment:
So, when might I expect to see this patch merged, since it's now been approved?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21514
Chris Bruner added the comment:
Just had a chance to try this, and this does exactly what I wanted from
type=. Thank you!
On Fri, Jul 25, 2014 at 4:17 PM, paul j3 rep...@bugs.python.org wrote:
paul j3 added the comment:
What you want is a custom Action rather than a custom Type.
from
Chris Rebert added the comment:
1) JSON just support floats
If you read the JSON standards documents, you'll see that this isn't accurate.
Regardless, a general solution for non-built-in numeric types does seem
preferable.
--
___
Python tracker
Chris Bruner added the comment:
Yes, I know. My function just sees '1', but I think it should see '1 2 3' so
that it can figure out what to do. That's impossible (well, impossible without
saving state between calls) when it sees the arguments piecemeal.
Sent from my iPhone
On Jul 24, 2014
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18355
___
___
Python-bugs-list
New submission from Chris Bruner:
From the documentation, I think that argparse should pass the entire
nargs-long string to the type= callable. Instead, it only passes the first
argument (of nargs), making it impossible within argparse's framework to check
for a tuple of mixed types, e.g., 2
New submission from Chris Bruner:
When reading options from a file, argparse should read all nargs values from
each line. Instead, it complains of there not being enough options.
python file:
#!/usr/bin/env python
import argparse
p = argparse.ArgumentParser(description='Reproduce argparse
Chris Bruner added the comment:
Tried the format you gave. Still doesn't work. Same error message:
bernoulli:myclu cwbrune$ argparse_nargs_file_bug.py
usage: argparse_nargs_file_bug.py [-h] [-t N N N]
argparse_nargs_file_bug.py: error: argument -t/--triple: expected 3 argument(s
Chris Bruner added the comment:
Oops, my mistake: had multiple '-t' in file, but not an action=append. Your
version works just fine.
Sorry for the confusion, and thank you for the correction!
--
___
Python tracker rep...@bugs.python.org
http
Chris Rebert added the comment:
Thanks for the speedy review!
Those NaN-related arguments are already mentioned in the docs (see last 2
sentences of
https://docs.python.org/3/library/json.html#infinite-and-nan-number-values ),
and this patch doesn't touch that subsection
Chris Rebert added the comment:
Here's a draft patch against the default branch that updates the json module's
docs accordingly.
Note that under Implementation Limitations, the statement This module does
not impose any such limits beyond those of the relevant Python datatypes
themselves
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10289
___
___
Python-bugs-list
Chris Withers added the comment:
No, it would not be enough.
Please see the report above, the repr of non-strings may be large, but
it's often intended that way and all of the string should be displayed.
It really is a shame that no API was provided to control this behaviour.
I actually
Chris Withers added the comment:
If I worked up a patch that:
- made sure this truncation wasn't used for non-strings
- added a class-attribute control for the truncation
Would it be well received?
--
___
Python tracker rep...@bugs.python.org
http
New submission from Chris Withers:
This code, prior to 3.4:
from testfixtures import Comparison as C
class AClass:
def __init__(self,x,y=None):
self.x = x
if y:
self.y = y
def __repr__(self):
return ''+self.__class__.__name__
Chris Withers added the comment:
Okay, opened [issue21820].
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18996
___
___
Python-bugs-list
Chris Withers added the comment:
Agreed, but even for strings, there really should be an API to control this...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21820
Chris Withers added the comment:
So, this appears to be the source of some degraded behaviour for me with Python
3.4 versus Python 3.3.
This code, prior to 3.4:
from testfixtures import Comparison as C
class AClass:
def __init__(self,x,y=None):
self.x = x
if y
Changes by Chris Angelico ros...@gmail.com:
--
nosy: +Rosuav
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21667
___
___
Python-bugs-list mailing
New submission from Chris Lambacher:
http://www.openssl.org/news/secadv_20140605.txt
All client versions of OpenSSL are vulnerable so all Windows builds of Python
are vulnerable to MITM attacks when connecting to vulnerable servers.
--
components: Build, Windows
messages: 219828
nosy
Chris Rose added the comment:
As suggested: SYN
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20752
___
___
Python-bugs-list mailing list
Chris Rebert added the comment:
Okay, so can this issue be closed in light of the existing docs and issue 21514
then?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13212
New submission from Chris Rebert:
Since these functions run shell commands, which is a common vector for
security-related bugs (see
* http://cwe.mitre.org/data/definitions/78.html
* http://cwe.mitre.org/data/definitions/88.html
), I suggest that they should have security warning boxes analogous
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21545
___
___
Python-bugs-list
Chris Rebert added the comment:
You'll need to also update the Character Encodings subsection of the json
docs.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17909
Chris Rebert added the comment:
I agree that the state of encoding detection in the new RFC seems unclear,
given that the old RFC prefaced the part about the encoding detection with:
Since the first two characters of a JSON text will always be ASCII
characters
But in the new RFC:
Appendix
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18820
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
___
___
Python-bugs-list
Chris Rebert added the comment:
Note that, per the new JSON RFC 7159 (https://tools.ietf.org/html/rfc7159 ),
top-level non-collection values are now de-jure permissible in JSON:
Appendix A. Changes from RFC 4627
o Changed the definition of JSON text so that it can be any JSON
Chris Rebert added the comment:
The new JSON RFC now at least mentions BOM handling:
https://tools.ietf.org/html/rfc7159#section-8.1 :
Implementations MUST NOT add a byte order mark to the beginning of a
JSON text. In the interests of interoperability, implementations
that parse JSON texts
New submission from Chris Rebert:
json module docs: https://docs.python.org/3/library/json.html
New superseding JSON RFC: https://tools.ietf.org/html/rfc7159
Errata to the new RFC: http://www.rfc-editor.org/errata_search.php?rfc=7159
ECMA-404: http://www.ecma-international.org/publications
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21401
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1043134
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1521950
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13826
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13197
___
___
Python-bugs-list
Chris Rose added the comment:
Ping? I'd like to know if the proposed solution passes muster, so that I can
get this into ... well, whatever the right revision would be.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20752
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21414
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21413
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21347
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19475
___
___
Python-bugs-list
Chris Monsanto added the comment:
This issue has been open for 4 years, last update was 2 months ago.
Lack of transactional DDL is a big deal for Python programs that use SQLite
heavily.
We have a patch for Python 3 that applies cleanly and as far as I can tell
works fine. I've been using
Chris Monsanto added the comment:
Unfortunately, I don't have backwards-compatible proposal to fix this. Trying
to account for a bit more syntax will help in the short term but not fix the
underlying issue.
aaugustin -- the patch by torsen made 3 years ago is backwards compatible. It
adds
Changes by Chris Rose off...@offby1.net:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20752
___
___
Python-bugs-list
Chris Rose added the comment:
Updated according to review.
--
Added file: http://bugs.python.org/file34868/difflib-sm.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20752
Chris Rose added the comment:
Addressed comments regarding documentation and assertion formats in the test.
--
Added file: http://bugs.python.org/file34869/difflib-sm.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20752
Chris Rose added the comment:
Patch against tip
--
Added file: http://bugs.python.org/file34871/difflib-sm.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20752
Chris Rose added the comment:
As a historical record, it should be noted that this is driven by an actual use
case: I was experimenting with using Bazaar's patience diff implementation, and
I saw that in order for them to use a custom sequence matcher, they had to
essentially copy-paste
Chris Angelico added the comment:
I agree that current behaviour is a bit confusing; also, the implication is
that deleting from the dictionary while you have an iterator may leave some
hanging references around the place, which raises a red flag in my mind (maybe
something else might find
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19837
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17909
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10976
___
___
Python-bugs-list
New submission from Chris Rebert:
Python 3.3.4 (default, Feb 21 2014, 18:00:34)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type help, copyright, credits or license for more information.
from json import dumps
dumps({True: True, False: False, None: None, 42: 42})
'{false
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19871
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16535
___
___
Python-bugs-list
Changes by Chris Farrow farro...@gmail.com:
--
nosy: +Chris.Farrow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21009
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13697
___
___
Python-bugs-list
Chris Rebert added the comment:
So, nobody seems to have cared enough about the policy change to weigh in
during the intervening year and ~3mos...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16329
Chris Rebert added the comment:
FWIW, I’m +1 for a doc section about how to achieve strict mode with special
arguments and callbacks (if the recent doc patch does not already have that)
The docs added by that patch do indeed cover this:
http://docs.python.org/2/library/json.html#standard
New submission from chris-buccella:
http://docs.python.org/3.4/library/unittest.mock-examples.html
Section 26.5.3.9. Mocking a dictionary with MagicMock
In the Note area:
mock.__setitem__ = Mock(side_effect=getitem)
mock.__getitem__ = Mock(side_effect=setitem)
I think these are swapped
New submission from Chris Clark:
The documentation for smtplib.SMTP says If the connect() call returns anything
other than a success code, an SMTPConnectError is raised. It doesn't
explicitly specify what happens when connect() raises instead of returns, but I
think either the documentation
Chris Clark added the comment:
I am concerned about the policy of not documenting all exceptions that are
raised. It sounds like there is no straightforward way to write a comprehensive
except statement without using a bare except or catching some base exception. I
consider it dangerous
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5207
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13936
___
___
Python-bugs-list
Chris Angelico added the comment:
Python doesn't currently have any sort of function for fetching all a
computer's IPs, as far as I know, but if there is one (either now or in the
future), it would be good to link to that from there. Here's how to get your
host name. And if you're interested
Chris Angelico added the comment:
Patch doesn't apply to current Python trunk (18 months later). Do you know what
version you wrote this against? The current wording is different.
--
nosy: +Rosuav
___
Python tracker rep...@bugs.python.org
http
Chris Angelico added the comment:
Presumably this is not an issue in 3.x. Is this considered a bug fix (in which
case the patch should almost certainly be applied - it looks perfectly safe),
or a feature enhancement (in which case this should get closed wontfix)? Looks
like low-hanging fruit
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20727
___
___
Python-bugs-list
Changes by Chris Angelico ros...@gmail.com:
--
components: +Tests
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20796
New submission from Chris Angelico:
$ find . -name \*.pyc -delete
$ PYTHONDONTWRITEBYTECODE=1 make test
Three test failures, which all seem to be duplicates of:
==
FAIL: test_timestamp_overflow
Chris Angelico added the comment:
One test failing, due to Tools/parser/unparse.py not knowing how to unparse an
except expression. Otherwise, test suite passes (with most of the stdlib
unchanged). I'm about to try writing an actual conversion script which will
rewrite the stdlib
Chris Angelico added the comment:
Thanks for the fast turn-around, guys! Not that it matters hugely - I happened
to have bytecode writing disabled to test something unrelated and noticed the
test failure.
--
___
Python tracker rep
Chris Angelico added the comment:
I've applied all the changes my script can find, including ones that are
actually quite inappropriate, like:
try:
some_function_call()
except some_exception:
some_other_function_call()
All tests pass except for one, which I don't fully
Changes by Chris Angelico ros...@gmail.com:
Added file: http://bugs.python.org/file34250/churn1.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20739
Changes by Chris Angelico ros...@gmail.com:
Added file: http://bugs.python.org/file34251/churn2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20739
Changes by Chris Angelico ros...@gmail.com:
Added file: http://bugs.python.org/file34252/broken.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20739
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20246
___
___
Python-bugs-list
Chris Rose added the comment:
Is there an ETA for a 2.7.7 release with this fix?
--
nosy: +offby1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20246
New submission from Chris Adams:
Currently the stdlib json module requires a custom serializer to avoid throwing
a TypeError on collections.deque instances:
Python 3.3.4 (default, Feb 12 2014, 09:35:54)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type help, copyright
New submission from Chris Rose:
It should be possible to provide subclasses or implementations of the
SequenceMatcher interface to difflib's various methods that do formatting (for
example, unified_diff/context_diff et al).
I've included a patch for it that satisfies my personal itch
Chris Rose added the comment:
I've regenerated the patch with doc additions and Misc/ACKS changed as well.
--
Added file: http://bugs.python.org/file34204/difflib-sm.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20752
New submission from Chris Angelico:
Only noticed because I was searching the stdlib for hasattr calls, but in
mailbox.Mailbox.update(), a check is done thus:
if hasattr(arg, 'iteritems'):
source = arg.items()
elif hasattr(arg, 'items'):
source
Changes by Chris Angelico ros...@gmail.com:
--
nosy: +Rosuav
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20739
___
___
Python-bugs-list mailing
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20630
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20632
___
___
Python-bugs-list
Chris Angelico added the comment:
Patch doesn't apply to 3.4. Apart from the obvious filename change
(Lib/urllib2.py - Lib/urllib/request.py), retry_http_basic_auth is distinctly
different in the current version. I think this will need a completely separate
patch, separately done and tested
Chris Angelico added the comment:
Oops, I was reading off the wrong piece of code. It's not distinctly
different, actually; it's just different enough that the patch fails. The only
difference is that in 3.4 the headers are Unicode strings (so the content gets
encoded and decoded). My bad
Changes by Chris Angelico ros...@gmail.com:
Added file:
http://bugs.python.org/file34041/0001-Add-an-authorization-header-to-the-initial-request.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19494
Changes by Chris Angelico ros...@gmail.com:
Added file:
http://bugs.python.org/file34042/0001-Add-an-authorization-header-to-the-initial-request.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19494
Chris Angelico added the comment:
Yeah. I first thought Hey, I could just change the file names in the patch and
apply it, but then when it failed, I went looking, found the wrong piece of
code, and thought it was completely different. Turned out to be not so
different after all :) So now you
Changes by Chris Angelico ros...@gmail.com:
--
nosy: +Rosuav
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
___
___
Python-bugs-list mailing
Chris Angelico added the comment:
Small quibble: The last sentence capitalizes a Python built-in, which is
confusing (Len(seq_dict) must match...). Tweak of grammar to have it not at
the beginning of the sentence: Either way, len(seq_dict) must match
--
nosy: +Rosuav
Chris Morgan added the comment:
Testing passed on OSX Mavericks.
--
nosy: +drpotato
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19974
New submission from Chris Angelico:
When tests are run from an Upstart job in a minimal environment,
test_posix.test_initgroups fails as it attempts to find the max() of an empty
list of supplementary groups.
Problem sighted with 2.7, 3.3, and 3.x branches. Patch derived from 3.x
(default
New submission from Chris Adams:
This is a more general version of #10496: os.path.expanduser is documented as
returning the unmodified string if it cannot be expanded
(http://docs.python.org/3/library/os.path.html#os.path.expanduser) but there's
one edge case where this can fail: when
Chris Adams added the comment:
Other than hoisting the warnings import to the top (PEP-8) that seems entirely
reasonable to me. The user report which we got was confusing because it was
non-obvious where it came from - a warning or other pointer would have helped
the original reporter get
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20138
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20059
___
___
Python-bugs-list
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20050
___
___
Python-bugs-list
801 - 900 of 2739 matches
Mail list logo