[issue22515] Implement partial order on Counter

2014-10-03 Thread Ethan Furman
Ethan Furman added the comment: Testing the patch... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22515 ___ ___ Python-bugs-list mailing list

[issue22515] Implement partial order on Counter

2014-10-03 Thread Ethan Furman
Ethan Furman added the comment: In going through the tests I have found an edge-case that I am unsure of how to handle: Counter(a=1) Counter(a=1, b=1) On the one hand, they both have the same value for 'a'; on the other hand, the second counter has more elements... So should the result

[issue22515] Implement partial order on Counter

2014-10-03 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22515

[issue22515] Implement partial order on Counter

2014-10-03 Thread Ethan Furman
Ethan Furman added the comment: I am not a mathematician -- feel free to include the answer with your hints. ;) If my analogy is correct, this situation is similar to {1} {1, 2} Which is True. Can someone verify that I am correct

[issue22515] Implement partial order on Counter

2014-10-03 Thread Ethan Furman
Ethan Furman added the comment: New patch attached. -- Added file: http://bugs.python.org/file36794/issue22515.stoneleaf.patch.01 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22515

[issue22515] Implement partial order on Counter

2014-10-02 Thread Ethan Furman
Ethan Furman added the comment: I, myself, wrote: - At least, it will until we fix that bug. ;) Happily, reading the whole documentation revealed that non-integer values are allowed, so it's not a bug. :) -- ___ Python tracker

[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-02 Thread Ethan Furman
Ethan Furman added the comment: Ignore that last comment -- I don't know what I did yesterday, but unary minus is working as expected today. :/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22533

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: Curiousity question: What happens if you try to sort a list of partially ordered Counters? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22515

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: If it is so specialized as to only be needed in complex combinatorial calculations, does it belong in the general-purpose part of the language? After all, we have the math and cmath modules for more specialized arithmetic operations

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: -- s1 = set([1]) -- s2 = set([1, 2]) -- s3 = set([1, 2, 3]) -- s4 = set([2]) -- s5 = set([2, 3]) -- s6 = set([3]) -- l = [s1, s2, s3, s4, s5, s6] -- sorted(l) [{1}, {2}, {1, 2}, {3}, {2, 3}, {1, 2, 3}] -- s1 s4 False -- s4 s2 True -- s1 s2 True -- s4 s6

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: I'll go with +0.5. :) If this goes in, I think a missing key in either Counter should default to 0 for purposes of the ordering. -- stage: - test needed ___ Python tracker rep...@bugs.python.org http

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: That does seem odd -- how can you have 'b' of something? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22515

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: I have to disagree. The intent is clearly expressed in the docs [1]. However, if I have a need to deal with partial amounts (say, 2.5 apples because I gave half of one to my horse ;), Counter will still work with that: -- treats = Counter({'carrots':12

[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: [1] https://docs.python.org/3/library/collections.html#collections.Counter -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22515

[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Ethan Furman
New submission from Ethan Furman: According to the docs [1]: Counter objects have a dictionary interface except that they return a zero count for missing items instead of raising a KeyError Which a simple test confirms: -- Counter()['b'] 0 However, if the key is present but set to zero

[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Ethan Furman
Ethan Furman added the comment: Exactly what operation is unary minus supposed to be? It seems to act like absolute value. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22533

[issue22513] grp.struct_group is not hashable

2014-09-29 Thread Ethan Furman
New submission from Ethan Furman: First, the behavior for pwd.struct_passwd: - -- pwd.getpwuid(1000) pwd.struct_passwd(pw_name='ethan', pw_passwd='x', pw_uid=1000, pw_gid=1000, pw_gecos='Ethan Furman,,,', pw_dir='/home/ethan', pw_shell='/bin/bash

[issue22513] grp.struct_group is not hashable

2014-09-29 Thread Ethan Furman
Ethan Furman added the comment: Test added. -- keywords: +patch stage: - needs patch Added file: http://bugs.python.org/file36752/issue22513.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22513

[issue22513] grp.struct_group is not hashable

2014-09-29 Thread Ethan Furman
Ethan Furman added the comment: Thanks, Serhiy. -- resolution: - not a bug stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22513

[issue22515] Implement partial order on Counter

2014-09-29 Thread Ethan Furman
Ethan Furman added the comment: What would be the result of Counter({'a':1, 'b':2}) Counter({'a':2, 'b':1}) ? -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22515

[issue22515] Implement partial order on Counter

2014-09-29 Thread Ethan Furman
Ethan Furman added the comment: set's don't have values, and you are wanting to implement the partial ordering based on the values. (side-note: how does partial-ordering work for sets?) That is, one counter will be considered smaller-or-equal to another if for any item in the first counter

[issue22515] Implement partial order on Counter

2014-09-29 Thread Ethan Furman
Ethan Furman added the comment: That is certainly a better definition. If you carefully reread your original post you will see that you wrote something different ('any' instead of 'every'). Also, your OP uses '__lt__' but talks about 'less-than-or-equal -- somewhat confusing

[issue22515] Implement partial order on Counter

2014-09-29 Thread Ethan Furman
Ethan Furman added the comment: I think the final call is Raymond's (whether to accept the patch), but go ahead. Worst case scenario is you'll have your own thoroughly tested PartiallyOrderedCounter you can use in your own code. :) -- nosy: +rhettinger type: - enhancement

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22504 ___ ___ Python-bugs-list

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-09-27 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22506 ___ ___ Python-bugs-list

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ethan Furman
Ethan Furman added the comment: Enums have a definition order to aid in the use-case of auto-numbering, and to make displays consistent. However, the basic Enum type is unordered. If you need/want your particular enum type to be ordered, mix-in the ordered magic methods. -- assignee

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ethan Furman
Ethan Furman added the comment: Yes, we're sure. ;) Enums have a definition order to aid in the use-case of auto-numbering, and to make displays consistent. However, the basic Enum type is unordered. I do not see a serial number as being an intrinsic property of an enum -- outside of auto

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-09-27 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22506 ___ ___ Python-bugs-list

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-09-27 Thread Ethan Furman
Ethan Furman added the comment: More just a note to myself to research this further, to see exactly what does and does not get inherited. Any tests added will likely be more comprehensive than your example. -- ___ Python tracker rep

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-16 Thread Ethan Furman
Ethan Furman added the comment: http://hg.python.org/cpython/rev/4135f3929b35 http://hg.python.org/cpython/rev/cdd412347827 -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue21738] Enum docs claim replacing __new__ is not possible

2014-09-16 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: ethan.furman - docs@python nosy: +docs@python resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21738

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-06 Thread Ethan Furman
Ethan Furman added the comment: You could do the same kind of check in __new__, but consider this: class StrValues(MultiValueEnum): one = ('One' 'one', '1') two = ('two', 'Two', '2') In this scenario the 'Oneone' mistake would still

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-05 Thread Ethan Furman
Ethan Furman added the comment: My apologies for the confusion, and thanks for tracking it down. I'll get the patch in, but I'm curious how you actually use these Enums? Is this a way to easily handle multiple aliases? -- ___ Python tracker rep

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-05 Thread Ethan Furman
Ethan Furman added the comment: Right. We can still use the alias machinery to accomplish this task for us, and avoid the metaclass hacking: -- python2 sample code # -*- coding: utf-8 -*- from enum import Enum class MultiValueEnum(Enum): def __new__

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-04 Thread Ethan Furman
Ethan Furman added the comment: Can you give an example of the code you were having problems with? -- assignee: - ethan.furman nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22339

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-04 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +barry, eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22339 ___ ___ Python-bugs

[issue22297] 2.7 json encoding broken for enums

2014-08-30 Thread Ethan Furman
Ethan Furman added the comment: This is not a regression. json only deals with standard types (int, str, etc.), and Enum is not a standard type. Enum was introduced in 3.4, so corresponding changes were made to json to support int and float subclasses, of which IntEnum is one. In other

[issue22297] 2.7 json encoding broken for enums

2014-08-30 Thread Ethan Furman
Ethan Furman added the comment: One argument against fixing: If we do fix in 2.7.9 then any program targeting it will be unable to target 3.0-3.3, as those versions do not have the fix from 3.4. -- ___ Python tracker rep...@bugs.python.org http

[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22121 ___ ___ Python-bugs-list

[issue22122] turtle module examples should all begin from turtle import *

2014-08-02 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22122 ___ ___ Python-bugs-list

[issue22123] Make object() behave exactly like types.SimpleNamespace() if given kwargs

2014-08-02 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22123 ___ ___ Python-bugs-list

[issue22121] IDLE should start with HOME as the initial working directory

2014-08-02 Thread Ethan Furman
Ethan Furman added the comment: We should be able to add enough smarts to handle both cases. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22121

[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2014-06-24 Thread Ethan Furman
Ethan Furman added the comment: Thank you for your efforts, Amitava. Please also sign a Contributor's License Agreement so we can actually use your code. :) http://www.python.org/psf/contrib/ -- ___ Python tracker rep...@bugs.python.org http

[issue18780] SystemError when formatting int subclass

2014-06-24 Thread Ethan Furman
Ethan Furman added the comment: Should this patch also go into the 3.3 branch? It only went into 3.4. If yes, how should I go about doing that? -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18780

[issue18780] SystemError when formatting int subclass

2014-06-24 Thread Ethan Furman
Ethan Furman added the comment: Cool, leaving it closed. -- versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18780

[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2014-06-22 Thread Ethan Furman
Ethan Furman added the comment: Yes, that test should pass when this issue is resolved. I can't tell from your comment what you are trying to do to resolve it, but the course of action I had in mind was to have the `type` meta-class make a final examination of the type it was creating

[issue21738] Enum docs claim replacing __new__ is not possible

2014-06-19 Thread Ethan Furman
Ethan Furman added the comment: Common, no. And if the docs were silent on the matter that would be okay, but unfortunately the docs declare that it is not possible, which is just plain wrong. Patch also mentions _value_ as that is the supported interface when customizing __new__ methods

[issue21793] httplib client/server status refactor

2014-06-17 Thread Ethan Furman
Ethan Furman added the comment: Left comments in reitvald about modifying the Enum used -- let me know if you have any questions about that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21793

[issue21773] Fix a NameError in test_enum

2014-06-16 Thread Ethan Furman
Ethan Furman added the comment: Right, I had copied that code from test_pydoc which is where 'print_diffs' is defined. A comment there says to use the now-included functionality in unittest, and some digging in the docs revealed that assertEqual uses diffs by default. -- assignee

[issue21738] Enum docs claim replacing __new__ is not possible

2014-06-12 Thread Ethan Furman
New submission from Ethan Furman: Replacing __new__ in an Enum subclass is not possible /in the subclass definition/, but is easily replaced via monkey-patching after the class has been defined. Docs need to be updated to reflect this. -- assignee: ethan.furman messages: 220372 nosy

[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Ethan Furman
Ethan Furman added the comment: That is certainly nicer than the current idiom: Animal = Enum('Animal', zip('ant bee cat dog'.split(), range(4))) -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Ethan Furman
Ethan Furman added the comment: Playing devil's advocate: The issue is not so much the keystrokes saved as the improvement in reading and understanding what was intended. If you are happy with starting at 1 the idiom is easy to both write, read, and understand; but if you want some other

[issue21561] help() on enum34 enumeration class creates only a dummy documentation

2014-06-02 Thread Ethan Furman
Ethan Furman added the comment: I think something like the following, taken from http://bugs.python.org/issue19030#msg199920, shoud do the trick for something to test against: class Meta(type): def __getattr__(self, name): if name == 'ham': return 'spam

[issue21561] help() on enum34 enumeration class creates only a dummy documentation

2014-05-23 Thread Ethan Furman
Ethan Furman added the comment: Good work. This bug was fixed in 3.4 with the inclusion of enum. It would definitely be good to fix in 2.7 as well. -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21561

[issue21561] help() on enum34 enumeration class creates only a dummy documentation

2014-05-23 Thread Ethan Furman
Ethan Furman added the comment: The problem will affect anything that uses the same mechanism as enum. It also affects (not verified) all versions of python up to 3.4 where it was fixed because enum exposed it. Besides which, I did not think a bug had to affect stdlib code in order

[issue2506] Add mechanism to disable optimizations

2014-05-22 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2506 ___ ___ Python-bugs-list

[issue19979] Missing nested scope vars in class scope (bis)

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19979 ___ ___ Python-bugs-list

[issue17352] Be clear that __prepare__ must be declared as a class method

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17352 ___ ___ Python-bugs-list

[issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18334 ___ ___ Python-bugs-list

[issue17421] Drop restriction that meta.__prepare__() must return a dict (subclass)

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17421 ___ ___ Python-bugs-list

[issue17422] language reference should specify restrictions on class namespace

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17422 ___ ___ Python-bugs-list

[issue17044] Implement PEP 422: Simple class initialisation hook

2014-05-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17044 ___ ___ Python-bugs-list

[issue19979] Missing nested scope vars in class scope (bis)

2014-05-18 Thread Ethan Furman
Ethan Furman added the comment: Terry remarked: --- I am puzzled by the opening statement there that from enum import Enum # I added this as necessary class Season(Enum): SPRING = Season() works beautifully at top level as it indeed raises NameError: name 'Season

[issue21469] False positive hazards in robotparser

2014-05-12 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21469 ___ ___ Python-bugs-list

[issue6839] zipfile can't extract file

2014-05-05 Thread Ethan Furman
Ethan Furman added the comment: Ah, so when you (Adam) said extraction works fine, what you meant was extraction works fine *in other programs*. Okay. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6839

[issue6839] zipfile can't extract file

2014-05-02 Thread Ethan Furman
Ethan Furman added the comment: Adam Polkasnik said: Extraction works fine, the issue was that raise() was creating an exception, and stopping the whole extraction process. That doesn't make sense. If an exception was stopping the whole extraction process

[issue20094] intermitent failures with test_dbm

2014-04-30 Thread Ethan Furman
Ethan Furman added the comment: Actually, I haven't had this issue in quite a while now, so closing. Thanks for taking a look at it, Jesús. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20094

[issue6839] zipfile can't extract file

2014-04-30 Thread Ethan Furman
Ethan Furman added the comment: Adam, please stop deleting the files. It makes for a lot of noise to those on the nosy list, and is unnecessary. Just make sure you increment the version number on the files you upload and it will be fine. Thanks

[issue6839] zipfile can't extract file

2014-04-29 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6839 ___ ___ Python-bugs-list

[issue8297] AttributeError message text should include module name

2014-04-24 Thread Ethan Furman
Ethan Furman added the comment: Yay, 'resolved' ! -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297

[issue21068] Make ssl.PROTOCOL_* an enum

2014-04-16 Thread Ethan Furman
Ethan Furman added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21068 ___ ___ Python-bugs-list mailing list

[issue20421] expose SSL socket protocol version

2014-04-16 Thread Ethan Furman
Ethan Furman added the comment: Sounds good to me. -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20421 ___ ___ Python-bugs

[issue10769] ast: provide more useful range information

2014-04-05 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10769 ___ ___ Python-bugs-list

[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-28 Thread Ethan Furman
Ethan Furman added the comment: Downside to this patch (stoneleaf.01) is that custom AttributeErrors raised in __getattr__ are overridden, which is a pretty severe regression. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-28 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: Removed file: http://bugs.python.org/file34648/issue1615.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615

[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-28 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- Removed message: http://bugs.python.org/msg215091 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615

[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-28 Thread Ethan Furman
Ethan Furman added the comment: Downside to this patch (stoneleaf.02) is that custom AttributeErrors raised in __getattr__ are overridden, which is a pretty severe regression. (Removed, renamed, and reloaded patch.) -- Added file: http://bugs.python.org/file34657/issue1615.stoneleaf

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076 ___ ___ Python-bugs-list

[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-27 Thread Ethan Furman
Ethan Furman added the comment: Results from the first two tests in my test script: -- 'WithOut' object has no attribute 'not_here' looking up not_here looking up huh 'With' object has no attribute 'not_here' -- stage: test needed - patch

[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-27 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: Removed file: http://bugs.python.org/file34647/issue1615.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615

[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-27 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: Added file: http://bugs.python.org/file34648/issue1615.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2014-03-27 Thread Ethan Furman
Ethan Furman added the comment: PEP 461 has been accepted. I'll look over the code soon. -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20284

[issue8297] AttributeError message text should include module name

2014-03-26 Thread Ethan Furman
Ethan Furman added the comment: Mostly new patch against 3.5 -- Added file: http://bugs.python.org/file34634/issue8297.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297

[issue21068] Make ssl.PROTOCOL_* an enum

2014-03-25 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21068 ___ ___ Python-bugs-list

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-03-21 Thread Ethan Furman
Ethan Furman added the comment: Final status: 3.4 - DeprecationWarning 3.5 - TypeError -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue8297] AttributeError message text should include module name

2014-03-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297 ___ ___ Python

[issue8297] AttributeError message text should include module name

2014-03-21 Thread Ethan Furman
Ethan Furman added the comment: ysj.ray: Your patch looks good. I had to make some changes since we're now at 3.5. Before I can use your code, though, you need to sign the CLA [1]. Thanks. [1] https://www.python.org/psf/contrib/contrib-form

[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: needs patch - test needed versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-03-19 Thread Ethan Furman
Ethan Furman added the comment: No, apparently I am incapable of spelling pseudo correctly. I'll fix that along with the better error message: %x format: an integer is required, not float (variable, obviously ;) -- ___ Python tracker rep

[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-03-19 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20145 ___ ___ Python-bugs-list

[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose

2014-03-15 Thread Ethan Furman
Ethan Furman added the comment: Python 2.7.3 (default, Sep 26 2012, 21:51:14) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information. -- bytes(5) '5' -- bytearray(5) bytearray(b'\x00\x00\x00\x00\x00

[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose

2014-03-14 Thread Ethan Furman
Ethan Furman added the comment: I'm inclined to leave it open while I do the suggested research. Thanks for the tips, Terry, and the numbers, Josh. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20895

[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose

2014-03-12 Thread Ethan Furman
New submission from Ethan Furman: `bytes` is a list of integers. Passing a single integer to `bytes()`, as in: -- bytes(7) b'\x00\x00\x00\x00\x00\x00\x00' results in a bytes object containing that many zeroes. I propose that this behavior be deprecated for eventual removal, and a class

[issue13936] RFE: change bool(datetime.time(0, 0, 0)) to evaluate as True

2014-03-07 Thread Ethan Furman
Ethan Furman added the comment: If no one else has gotten to this in the next six months or so, I will. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13936

[issue20848] 3.4 cherry-pick: b637064cc696 Improve enum subclass behavior

2014-03-03 Thread Ethan Furman
New submission from Ethan Furman: Two minor code changes addressing the more pythonic comments. Major doc enhancement addressing the functional API. Not sure about the markup as I can no longer create the docs on my system. -- assignee: larry messages: 212670 nosy: ethan.furman

[issue20848] 3.4 cherry-pick: b637064cc696 Improve enum subclass behavior

2014-03-03 Thread Ethan Furman
Ethan Furman added the comment: For the past couple weeks everytime I try I get: sphinx-build -b html -d build/doctrees -D latex_paper_size= . build/html make: sphinx-build: Command not found make: *** [build] Error 127 -- ___ Python tracker rep

[issue20848] 3.4 cherry-pick: b637064cc696 Improve enum subclass behavior

2014-03-03 Thread Ethan Furman
Ethan Furman added the comment: Ah, thanks! Docs are built, fixed, and built again. Larry, the two cherries to pick for this are: b637064cc696: bulk of doc changes 54ab95407288: fixes for ReST markup Thanks. -- ___ Python tracker rep

[issue20679] 3.4 cherry-pick: 587fd4b91120 improve Enum subclass behavior

2014-02-22 Thread Ethan Furman
Ethan Furman added the comment: Thanks, Larry. I'll have one more patch which will be much better comments in the code, and a small doc enhancement. When it's ready should I reopen this issue or create a new one? -- ___ Python tracker rep

[issue20653] Pickle enums by name

2014-02-22 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: Added file: http://bugs.python.org/file34185/issue20653.stoneleaf.03.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20653

[issue20653] Pickle enums by name

2014-02-22 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: Added file: http://bugs.python.org/file34191/issue20653.stoneleaf.04.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20653

<    9   10   11   12   13   14   15   16   17   18   >