[issue22725] improve documentation for enumerate() (built-in function)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: Missing keyword argument support is not the norm, it's the exception that is only due to implementation details in C code. Eventually, we'd like every C function to support keyword arguments. Converting everything is tedious work, though, and still makes things

[issue21274] define PATH_MAX for GNU/Hurd in Python/pythonrun.c

2014-11-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Reopening. What problem does this fix? AFAICT, PATH_MAX isn't used at all (anymore). -- nosy: +loewis resolution: fixed -> status: closed -> open ___ Python tracker

[issue20597] PATH_MAX already defined on some Windows compilers

2014-11-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Reopening. I still don't understand the issue for 3.4, especially in the light of #21274 -- status: closed -> open ___ Python tracker ___

[issue22725] improve documentation for enumerate() (built-in function)

2014-11-04 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: Oh, I see now. The documentation doesn't make it clear. Anyways, what were the advantages of making it a keyword, instead of just a positional argument? -- ___ Python tracker

[issue22619] Possible implementation of negative limit for traceback functions

2014-11-04 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: I'm not sure what would be the best way to support negative limit for stack functions. Actually, I think the current behavior is not intuitive. For example we could make positive limit mean the same thing for traceback and stack functions (load N entries, star

[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2014-11-04 Thread Steve Dower
Steve Dower added the comment: Had a look at where libffi is at, and we're such a long way from them now that I don't think we can easily merge (a.k.a. I don't want to be the one to do it :) ) I want to run this patch through some builds with the right compilers, but then I'll check it in. -

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Tim Graham
Tim Graham added the comment: Django's test suite passes with the proposed patch after some updates: https://github.com/django/django/pull/3455 -- ___ Python tracker ___ ___

[issue22785] range docstring is less useful than in python 2

2014-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> needs patch versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue22668] memoryview.format is corrupted due to dangling shared pointer

2014-11-04 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> patch review versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2014-11-04 Thread R. David Murray
R. David Murray added the comment: (Looking at your new patch...thanks for giving it a try even though I wasn't clear). There are lots of other errors it can raise, too. I was thinking more along the lines of "raises URLError on http protocol errors". The problem is that's not completely ac

[issue20597] PATH_MAX already defined on some Windows compilers

2014-11-04 Thread Jeffrey Armstrong
Changes by Jeffrey Armstrong : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22785] range docstring is less useful than in python 2

2014-11-04 Thread Devin Jeanpierre
Changes by Devin Jeanpierre : -- nosy: +Devin Jeanpierre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-11-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Right, the entire patch might be processed in 30 minutes. I won't have these 30 minutes any time soon. -- ___ Python tracker ___ _

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2014-11-04 Thread Joshua Chin
Changes by Joshua Chin : Added file: http://bugs.python.org/file37131/urlopen_doc.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +PaulMcMillan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, if we want to become stricter, I don't it makes sense to stop at the middle of the road. In any case, here is a patch enabling strict parsing. -- keywords: +patch Added file: http://bugs.python.org/file37130/cookie_strict_parsing.patch __

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: These are unknown attributes after a key=value pair. What this issue is about is accepting attributes *before* any key=value pair. -- ___ Python tracker ___

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that f81846c2b746 adds an explicit test for acceptance of invalid cookie strings ("test_bad_attrs"). -- ___ Python tracker ___ ___

[issue22780] NotImplemented doc section needs update

2014-11-04 Thread Ethan Furman
Ethan Furman added the comment: Whew! If a different wording is better, I'm happy to change both places. :) -- ___ Python tracker ___ __

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This qualification isn't really accurate: > The change for #16611 reintroduces "lax" parsing behavior that the security > fix [1] was supposed to prevent since the #16611 changes were committed *before* the security fix. -- __

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The security issue isn't easy to explain, it involves an elaborated set of services (browser, Web site...) each having a slightly different notion of cookie parsing to mount an attack allowing to bypass CSRF protection on certain Python-powered frameworks. It'

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: > Why are __flags__, __basicsize__, __itemsize__, __dictoffset__, and > __weakrefoffset__ interesting? I haven't said they are, but on the other hand I don't see why consistency is a bad thing. -- ___ Python tracker

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Ethan Furman
Ethan Furman added the comment: Why are __flags__, __basicsize__, __itemsize__, __dictoffset__, and __weakrefoffset__ interesting? I agree with Georg about the others. -- nosy: +ethan.furman ___ Python tracker __

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: > So, dir(C) contains '__mro__', but not 'mro'? That can be discussed. But I would argue that at least __name__, __bases__ and __qualname__ are interesting attributes for the user. Same for methods like __subclasses__(). Otherwise, it's quite ironic to prevent

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: So, dir(C) contains '__mro__', but not 'mro'? I'm -1 on the change. >From https://docs.python.org/3.4/library/functions.html#dir : """ Note Because dir() is supplied primarily as a convenience for use at an interactive prompt, it tries to supply an intere

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: Well, with this change you can again (e.g.) pass "Set-cookie: foo=bar" which isn't a valid cookie. It doesn't reintroduce the same vulnerability, but it will still silently consume invalid cookies (i.e. such with attribute-like tokens upfront) and return a see

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread R. David Murray
R. David Murray added the comment: This test still exists, so the change didn't cause it to trigger. What is the security bug? The commit doesn't say, and doesn't reference an issue number. So if that test still passes, what's the bug? -- ___ Pyt

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-04 Thread R. David Murray
R. David Murray added the comment: Yes, I agree that a doc note would be appropriate. timezone is relatively new, originally there was no way to produce aware datetimes from the datetime module without writing your own tzinfo class. Now that there is, there are may be more than one place in

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2014-11-04 Thread R. David Murray
R. David Murray added the comment: This is a general principle in Python. A module may raise specific errors, but there are always other errors that may be raised. The wording could be clarified, but it should not be removed. -- nosy: +r.david.murray

[issue22780] NotImplemented doc section needs update

2014-11-04 Thread R. David Murray
R. David Murray added the comment: OK, you got me there :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2014-11-04 Thread Joshua Chin
New submission from Joshua Chin: The documentation for urlopen states that it "Raises URLError on errors." However, urlopen can raise a ValueError. In fact, test_urllib. urlopen_FileTests.test_relativelocalfile specifically checks if urlopen raises a ValueError. I suggest removing the guarant

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: __base__ exists also in Jython and PyPy (#22456). I think that all attributes could be listed. -- ___ Python tracker ___ _

[issue22758] Regression in Python 3.2 cookie parsing

2014-11-04 Thread Tim Graham
Tim Graham added the comment: I also created #22796 for the lax parsing issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22796] Support for httponly/secure cookies reintroduced lax parsing behavior

2014-11-04 Thread Tim Graham
New submission from Tim Graham: As noted in the comments of #22758 by Georg Brandle: * Django uses __init__(str()) roundtripping, which is not explicitly supported by the library, and worked by accident with previous versions. That it works again with 3.3+ is another accident, and a bug. (T

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-04 Thread INADA Naoki
INADA Naoki added the comment: This is not a spelling issue. When people writing code converting between unixtime and datetime, they should find `.timestamp()` and `.utcfromtimestamp()`. But they may not awake about `.replace(tzinfo=datetime.timezone.utc)` is very important. Since `fromtimesta

[issue19753] test_gdb failure on SystemZ buildbot

2014-11-04 Thread David Edelsohn
David Edelsohn added the comment: Victor, can this patch be applied to Python 2.7 branch also? -- components: +Tests type: -> behavior versions: +Python 2.7 ___ Python tracker _

[issue22780] NotImplemented doc section needs update

2014-11-04 Thread Ethan Furman
Ethan Furman added the comment: R. David Murray said: > "try the reflected operation" is not our standard terminology. Parenthetical under discussion: --- > (The interpreter will then try the reflected operation, or some other > fallback, > depen

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue22792] string replace() not documented

2014-11-04 Thread R. David Murray
R. David Murray added the comment: To clarify for the OP: in python3 the 'string' module does not contain a replace function, whereas in 2.7 it did. 'replace' is only a method on str in python3, whereas in 2.7 it is both an str method and a function in the string module. -- nosy: +r.

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-04 Thread R. David Murray
R. David Murray added the comment: I don't find the keyword to be superior to the 'replace' spelling, myself. I think the replace spelling makes it clearer what the intent is. -- nosy: +r.david.murray ___ Python tracker

[issue22795] Intermittent test_tarfile failures on zLinux

2014-11-04 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag, serhiy.storchaka versions: +Python 3.4, Python 3.5 -Python 3.6 ___ Python tracker ___

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Brett Cannon
Brett Cannon added the comment: Just FYI, there can easily be added into importlib since it works through marshal's API to unmarshal the module's data. There is also two startup benchmarks in the benchmark suite to help measure possible performance gains/losses which should also ferret out if

[issue22795] Intermittent test_tarfile failures on zLinux

2014-11-04 Thread David Edelsohn
New submission from David Edelsohn: test_list_command_verbose intermittently fails because the date comparison differs by six hours. I suspect a bad interaction between tests, but have not been able to find the culprit. FAIL: test_list_command_verbose (test.test_tarfile.CommandLineTest) -

[issue22795] Intermittent

2014-11-04 Thread David Edelsohn
Changes by David Edelsohn : -- components: Tests nosy: David.Edelsohn, haypo priority: normal severity: normal status: open title: Intermittent type: behavior versions: Python 3.6 ___ Python tracker ___

[issue22680] unittest discovery is fragile

2014-11-04 Thread Robert Collins
Robert Collins added the comment: This was reported as https://code.google.com/p/unittest-ext/issues/detail?id=71 a while back. I think blacklisting FunctionTestCase in TestLoader is entirely reasonable. -- ___ Python tracker

[issue22794] missing test for issue 22457 regression commit

2014-11-04 Thread Robert Collins
New submission from Robert Collins: I did a brownbag fix for my change to issue22457 which exposed a untested corner case - this issue is for me to come back and add a regression test for it. -- messages: 230628 nosy: rbcollins priority: normal severity: normal status: open title: miss

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2aac2d76035e by Robert Collins in branch 'default': Fix regression in issue 22457 fix. https://hg.python.org/cpython/rev/2aac2d76035e -- ___ Python tracker ___

[issue22793] test_uuid failure on OpenIndiana

2014-11-04 Thread Antoine Pitrou
New submission from Antoine Pitrou: http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/8840/steps/test/logs/stdio testIssue8621 (test.test_uuid.TestUUID) ... ok test_UUID (test.test_uuid.TestUUID) ... ok test_exceptions (test.test_uuid.TestUUID) ... ok test_find_mac (test.t

[issue22773] Export Readline version and expect ANSI sequence for version < 0x0600

2014-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce0dd5e4b801 by Robert Collins in branch 'default': Close #22457: Honour load_tests in the start_dir of discovery. https://hg.python.org/cpython/rev/ce0dd5e4b801 -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open ->

[issue19884] Importing readline produces erroneous output

2014-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset eba6e68e818c by Antoine Pitrou in branch '2.7': Issue #22773: fix failing test with old readline versions due to issue #19884. https://hg.python.org/cpython/rev/eba6e68e818c -- ___ Python tracker

[issue22773] Export Readline version and expect ANSI sequence for version < 0x0600

2014-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset eba6e68e818c by Antoine Pitrou in branch '2.7': Issue #22773: fix failing test with old readline versions due to issue #19884. https://hg.python.org/cpython/rev/eba6e68e818c -- ___ Python tracker

[issue19884] Importing readline produces erroneous output

2014-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset c4b5a5d44254 by Antoine Pitrou in branch '3.4': Issue #22773: fix failing test with old readline versions due to issue #19884. https://hg.python.org/cpython/rev/c4b5a5d44254 New changeset be374b8c40c8 by Antoine Pitrou in branch 'default': Issue #22

[issue22773] Export Readline version and expect ANSI sequence for version < 0x0600

2014-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset c4b5a5d44254 by Antoine Pitrou in branch '3.4': Issue #22773: fix failing test with old readline versions due to issue #19884. https://hg.python.org/cpython/rev/c4b5a5d44254 New changeset be374b8c40c8 by Antoine Pitrou in branch 'default': Issue #22

[issue1610654] cgi.py multipart/form-data

2014-11-04 Thread Rishi
Rishi added the comment: Patch updated from review comments. Also added a few corner test cases. -- Added file: http://bugs.python.org/file37128/issue1610654_2.patch ___ Python tracker ___

[issue22758] Regression in Python 3.2 cookie parsing

2014-11-04 Thread Tim Graham
Tim Graham added the comment: The patch from #16611 applies cleanly to 3.2. I added a mention in Misc/NEWS and confirmed that all tests pass. -- Added file: http://bugs.python.org/file37127/secure-httponly-3.2-backport.diff ___ Python tracker

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread eryksun
eryksun added the comment: __doc__ and __module__ are also getsets (to support built-in types), but it's nothing to worry about since the attributes can't be deleted. I think the most value added here is for listing __mro__ and the others that Georg mentioned. Should the following attributes b

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue22780] NotImplemented doc section needs update

2014-11-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue22725] improve documentation for enumerate() (built-in function)

2014-11-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-11-04 Thread Michael Foord
Michael Foord added the comment: With one minor doc change (break up the really long sentence), this looks good to go to me. -- ___ Python tracker ___ __

[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-11-04 Thread Jeffrey Armstrong
Jeffrey Armstrong added the comment: There's not much to look into. If the Python function encounters an argument error, it returns an uninitialized integer as an "error code." This patch fixes incorrect C code, nothing more. -- ___ Python tracker

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Changes by Georg Brandl : -- Removed message: http://bugs.python.org/msg230614 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: Both lz4 and snappy are BSD-licensed, but snappy is written in C++. -- nosy: +georg.brandl ___ Python tracker ___

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: Basically beacuse with the current patch, this is because object_dir also does merge_class_dict, to get class attributes. This means that attributes like __qualname__ would show up in dir(instance), but are not actually available on the instance. Fixing this r

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, I misunderstood the patch, sorry. Nevermind. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I have a question: why would do it for classes and not for regular objects? -- assignee: docs@python -> ___ Python tracker ___

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: lz4 also has a "high compression" mode which improves the compression ratio (-> 17091 bytes compressed), for a similar decompression speed. -- ___ Python tracker _

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, comparison between zlib/snappy/lz4: $ python3.4 -m timeit -s "import zlib; data = zlib.compress(open('Lib/__pycache__/threading.cpython-35.pyc', 'rb').read()); print(len(data))" "zlib.decompress(data)" 1 loops, best of 3: 181 usec per loop $ python3.4

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: Attaching prototype patch without test suite adjustments. -- keywords: +patch Added file: http://bugs.python.org/file37126/type_dir_patch.diff ___ Python tracker

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I definitely think this should be changed. I just don't know how to do it :-) -- stage: -> needs patch versions: +Python 3.5 ___ Python tracker ___

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.11.2014 10:41, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > This is similar to the idea of loading the stdlib from a zip file (but less > intrusive and more debugging-friendly). The time savings will depend on > whether the filesy

[issue22792] string replace() not documented

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: There is already a "see also: string methods" at the top of the page. -- nosy: +georg.brandl resolution: -> works for me status: open -> closed ___ Python tracker __

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: However, it may not be possible to change this for backward compatibility reasons. People shouldn't be using dir() for determining attributes and the like, but they do, as documented by the multiprocessing module in the stdlib. This should at least be noted mor

[issue22792] string replace() not documented

2014-11-04 Thread eryksun
eryksun added the comment: Follow the "String Methods" link at the top of the string module documentation. Or use this link: https://docs.python.org/3.4/library/stdtypes.html#str.replace See also help(str.replace) and help(str) in the interactive shell. -- assignee: -> docs@python co

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: BTW, the same implementation detail means that you can ask an instance for its class' __module__, but not the __name__. -- ___ Python tracker ___

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: "Attributes from the metaclass have always been excluded from the dir() of a class." Be that as it may, I think it is wrong. I can understand excluding methods of the metaclass, but __qualname__ (and friends) are only defined in the metaclass because they are

[issue22792] string replace() not documented

2014-11-04 Thread housetier
New submission from housetier: https://docs.python.org/3.4/library/string.html does not explain the replace() function. I suppose it is very similar, if not identical, to 2.7: https://docs.python.org/2.7/library/string.html#string.replace -- components: Distutils messages: 230601 nosy:

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is similar to the idea of loading the stdlib from a zip file (but less intrusive and more debugging-friendly). The time savings will depend on whether the filesystem cache is cold or hot. In the latter case, my intuition is that decompression will slow th

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread eryksun
eryksun added the comment: See type_dir: https://hg.python.org/cpython/file/ab2c023a9432/Objects/typeobject.c#l2984 -- ___ Python tracker ___ ___

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread eryksun
eryksun added the comment: You won't find the __qualname__ data descriptor in dir(Foo.Bar) because it's defined by the metaclass, `type`. Attributes from the metaclass have always been excluded from the dir() of a class. -- nosy: +eryksun ___ Python

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: Ah yes, and some type_members are also missing. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: The missing attributes are some of those defined in type_getsets, i.e. __name__ __qualname__ __bases__ __abstractmethods__ __text_signature__ The latter two are obscure enough that it probably doesn't matter, but the first three should definitely be there.

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Sam Bishop
Sam Bishop added the comment: I specified 'during class initialisation' because that was the only case I confirmed. -- ___ Python tracker ___ ___

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Georg Brandl
Georg Brandl added the comment: @Amaury: this is not what I read there: "If the object is a type or class object, the list contains the names of its attributes, and recursively of the attributes of its bases." This implies that class attributes are definitely supposed to be in there.

[issue22790] __qualname__ missing from dir(__class__) during class initialisation

2014-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Why did you specify "during class initialization" only? When I print dir(Foo.Bar) at top-level, there is no __qualname__. Then, note that '__name__' is not listed either, so it's not about new attributes. It was chosen that dir(someClass) tries to list

[issue22791] datetime.utcfromtimestamp() shoud have option for create tz aware datetime

2014-11-04 Thread INADA Naoki
New submission from INADA Naoki: In [1]: import datetime In [2]: datetime.datetime.utcfromtimestamp(0) Out[2]: datetime.datetime(1970, 1, 1, 0, 0) In [3]: datetime.datetime.utcfromtimestamp(0).replace(tzinfo=datetime.timezone.utc) Out[3]: datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.tim

[issue22790] __qualname__ missing from dir(__class__) during class initialisation

2014-11-04 Thread Sam Bishop
New submission from Sam Bishop: The output of performing "dir(__class__)" during a class' __init__ method, seems to be lacking the new '__qualname__' attribute in python 3. This rough test can be pasted right into the python 3.4 REPL to see the issue. Tested on 64bit python 3.4 running on OSX 1

[issue22725] improve documentation for enumerate() (built-in function)

2014-11-04 Thread R. David Murray
R. David Murray added the comment: Specifically, this works (in 2.7): >>> enumerate(sequence=myvar) Changing sequence to iterable would break any code that was written like the above. -- ___ Python tracker ___

[issue22780] NotImplemented doc section needs update

2014-11-04 Thread R. David Murray
R. David Murray added the comment: "try the reflected operation" is not our standard terminology. There is a reason I suggested *copying* the parenthetical statement. We essentially have two places where NotImplemented is described (language reference and library reference), and the parenthe