[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-03 Thread Georg Brandl
Georg Brandl added the comment: Addressing review comments. -- Added file: http://bugs.python.org/file36789/pyobject_issubclass_isinstance_speedup_v2.patch ___ Python tracker __

[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue22544] Inconsistent cmath.log behaviour

2014-10-03 Thread Antoine Pitrou
New submission from Antoine Pitrou: >>> inf = float('inf') >>> z = complex(-0.0, -inf) >>> cmath.log(z) (inf-1.5707963267948966j) >>> cmath.log10(z) (inf-0.6821881769209206j) >>> cmath.log(z, 10) (inf+nan*j) -- components: Library (Lib) messages: 228307 nosy: eric.smith, lemburg, mark.di

[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f33a4a2b425 by Georg Brandl in branch 'default': Closes #22540: speed up PyObject_IsInstance and PyObject_IsSubclass in the common case that the second argument has metaclass "type". https://hg.python.org/cpython/rev/4f33a4a2b425 -- nosy:

[issue22544] Inconsistent cmath.log behaviour

2014-10-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-03 Thread anon
anon added the comment: Since I'm not familiar with the process I'd request someone creates the PEP. But if really necessary I can try. I just really want to see this in Python 3.5 - it's really essential to a number of scientific methods. I know several open source projects that would benefi

[issue11975] Fix referencing of built-in types (list, int, ...)

2014-10-03 Thread Florent Rougon
Changes by Florent Rougon : -- nosy: +frougon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Antoine Pitrou
New submission from Antoine Pitrou: >>> complex(-0.0) 0j >>> complex(-0.0).real -0.0 -- components: Interpreter Core messages: 228310 nosy: eric.smith, lemburg, mark.dickinson, pitrou, stutzbach priority: normal severity: normal status: open title: incomplete complex repr() with negative

[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-03 Thread STINNER Victor
STINNER Victor added the comment: A buildbot is failing since your change. http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/1261/steps/test/logs/stdio == ERROR: test_decimal_fraction_comparison (test.t

[issue22515] Implement partial order on Counter

2014-10-03 Thread Ram Rachum
Ram Rachum added the comment: Attached patch of implementation with tests. I haven't actually run this (because I don't know how to run Python's test suite) so there are likely to be bugs. if there's general agreement about this direction I'll figure out how to run the test so I could ensure i

[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: The test_decimal failure can be reproduced using: ./python -m test -W test_datetime test_decimal -- ___ Python tracker ___ _

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: Where are you seeing this? On an Ubuntu 13.10 x86 box, I see: >>> complex(-0.0) (-0+0j) This is with 2.7.5+, 3.3.2+ (from Ubuntu distro), and with 3.5.0a0 and 3.4.2rc1+ built locally. -- ___ Python tracker

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, my bad. This is with an Anaconda build of Python. -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: No problem! For completeness, I also see the correct behavior on cygwin 32-bit 2.7.3 and 3.2.3. I don't have access to a straight Windows version. -- ___ Python tracker __

[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6cfe929d1de5 by Antoine Pitrou in branch 'default': Make test_datetime a better citizen (issue #22540) https://hg.python.org/cpython/rev/6cfe929d1de5 -- ___ Python tracker

[issue22546] Wrong default precision in documentation for format

2014-10-03 Thread Tommy Andersen
New submission from Tommy Andersen: The format documentation for the Format Specification Mini-Language for python 3.3 (perhaps newer and older as well) at: https://docs.python.org/3.3/library/string.html States for type '' (for floating point numbers): Similar to 'g', except with at lea

[issue22544] Inconsistent cmath.log behaviour

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: I think this is mostly unavoidable: cmath.log(z, 10) is a compound operation that does the equivalent of cmath.log(z) / cmath.log(10), while cmath.log10 is doing everything at once. If anything, this is a problem in how complex division is done: it's arguable

[issue22544] Inconsistent cmath.log behaviour

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: One other option that doesn't involve changing the behaviour of complex division would be to special-case `cmath.log` in the case when the second argument is a float or an int. -- ___ Python tracker

[issue21965] Add support for Memory BIO to _ssl

2014-10-03 Thread Geert Jansen
Geert Jansen added the comment: New patch attached. This patch makes SSLSocket use SSLObject. The big benefit here is obviously test coverage. I decided against using SSLObject as a mixin, because all methods need to be reimplemented anyway because for SSLSocket they need to handle the non-SSL

[issue21965] Add support for Memory BIO to _ssl

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well... I would have expected this approach to yield a bigger reduction in code size. If it doesn't shrink the code, then I'm not sure it's worthwhile. What do you think? (also, why do you have to add an "owner" attribute?) -- ___

[issue22546] Wrong default precision in documentation for format

2014-10-03 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith, mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22546] Wrong default precision in documentation for format

2014-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a result of changing the precision of str() to match repr(). 2.7 prints: '3.14159265359' -- ___ Python tracker ___ _

[issue22544] Inconsistent cmath.log behaviour

2014-10-03 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue21965] Add support for Memory BIO to _ssl

2014-10-03 Thread Geert Jansen
Geert Jansen added the comment: > Well... I would have expected this approach to yield a bigger reduction in > code size. If it doesn't shrink the code, then I'm not sure it's worthwhile. > What do you think? I think the improved test coverage might still make it worthwhile. All tests are now

[issue19468] Relax the type restriction on reloaded modules

2014-10-03 Thread Brett Cannon
Brett Cannon added the comment: I think the check can be removed as long as an AttributeError is caught when trying to access module.__name__ and a message mentioning that the user probably meant to pass in a module is used, e.g.: try: name = module.__spec__.name except AttributeError:

[issue22543] -W option cannot use non-standard categories

2014-10-03 Thread Brett Cannon
Brett Cannon added the comment: Doing the initialization later is not really an option as there can be warnings in the parser so it has to be resolved very early on. I guess some form could be a possibility, but that's also tricky as subclass matching also still needs to work. I think we would

[issue17848] can't compile with clang and build a shared lib due to libffi

2014-10-03 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue17848] can't compile with clang and build a shared lib due to libffi

2014-10-03 Thread Brett Cannon
Changes by Brett Cannon : -- title: issue about compile with clang and build a shared lib -> can't compile with clang and build a shared lib due to libffi ___ Python tracker ___

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2014-10-03 Thread Brett Cannon
Brett Cannon added the comment: Is there any cleanup to worry about as the comment suggests? If not then the patch LGTM if it does lead to any memory leak. -- ___ Python tracker

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Ram Rachum
Changes by Ram Rachum : -- components: Library (Lib) nosy: cool-RR priority: normal severity: normal status: open title: Implement an informative `BoundArguments.__repr__` versions: Python 3.5 ___ Python tracker __

[issue12780] Clean up tests for pyc/pyo in __file__

2014-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1745fd612d73 by R David Murray in branch '3.4': #12780: update inspect test skipIf for PEP 3147. https://hg.python.org/cpython/rev/1745fd612d73 New changeset 8120de25932f by R David Murray in branch 'default': Merge: #12780: update inspect test skip

[issue12780] Clean up tests for pyc/pyo in __file__

2014-10-03 Thread R. David Murray
R. David Murray added the comment: It is not true that __file__ will always end with '.py'. If *only* the .pyc or .pyo file exists (not the PEP 3147 version, but just modname.pyc on the pythonpath), then __file__ will end with .pyc. It is also the case that __file__ may end with something *e

[issue17848] can't compile with clang and build a shared lib due to libffi

2014-10-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Leon, Are you trying to run compiled python binary before it was installed? If so, this is expected and not specific to clang or libffi. If your issue is something else - please explain how to reproduce it and post the error messages that you see. ---

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-10-03 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Yury Selivanov
New submission from Yury Selivanov: Can you propose a format for it? I'm not sure that including all arguments and their reprs is a good idea, as it will make BA's repr too long. -- nosy: +yselivanov ___ Python tracker

[issue22508] Remove __version__ string from email

2014-10-03 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: Looks like a safe change. There is only one user in all Debian sources, and it's on Python 2: http://codesearch.debian.net/search?q=email.__version__ -- nosy: +tshepang ___ Python tracker

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Ram Rachum
Ram Rachum added the comment: Something like I have no problem with truncation when it gets too long. -- ___ Python tracker ___ ___

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: How about we just list bound arguments names, without values? -- ___ Python tracker ___ ___ Python-b

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Ram Rachum
Ram Rachum added the comment: Em, that kind of defeats the purpose of describing the object, doesn't it? -- ___ Python tracker ___ ___

[issue22508] Remove __version__ string from email

2014-10-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 03, 2014, at 04:19 PM, Tshepang Lekhonkhobe wrote: >Looks like a safe change. There is only one user in all Debian sources, and >it's on Python 2: > >http://codesearch.debian.net/search?q=email.__version__ Hahahahahahahaha --

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: Yes and no ;) You can have partially bound args, you can bind just one argument and use defaults for the rest, etc. I agree that it's not an ideal solution, but it is a sane compromise. -- ___ Python tracker

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Ram Rachum
Ram Rachum added the comment: I think the point of `__init__` is to know what the object is, and if you're hiding the values then someone has to access the attributes to find out the values and that sucks. -- ___ Python tracker

[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-03 Thread Georg Brandl
Georg Brandl added the comment: Thanks for fixing! I did run "make test" locally, but that did not produce the failure. -- ___ Python tracker ___ ___

[issue22508] Remove __version__ string from email

2014-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 67f9e757f21b by R David Murray in branch 'default': #22508: Drop email __version__ string. It no longer means anything. https://hg.python.org/cpython/rev/67f9e757f21b -- nosy: +python-dev ___ Python trac

[issue22508] Remove __version__ string from email

2014-10-03 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bug

[issue21831] integer overflow in 'buffer' type allows reading memory

2014-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5ef28c22dc24 by doko in branch '2.7': - Add CVE number for Issue #21831 https://hg.python.org/cpython/rev/5ef28c22dc24 -- ___ Python tracker __

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: Out of interest, what caused Anaconda to behave differently? Is there some fragility that needs fixing in the Python core code? -- ___ Python tracker

[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2014-10-03 Thread lkraav
Changes by lkraav : -- nosy: +lkraav ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Antoine Pitrou
New submission from Antoine Pitrou: This may be a parser limitation... >>> z = -0.-0.j >>> z (-0+0j) >>> z.imag 0.0 >>> z = 0.-0.j >>> z.imag 0.0 -- components: Interpreter Core messages: 228343 nosy: benjamin.peterson, mark.dickinson, pitrou priority: low severity: normal status: open

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: This is not a bug, but a known and difficult-to-avoid issue with signed zeros and creating complex numbers from real and imaginary parts. The safe way to do it is to use the `complex(real_part, imag_part)` construction. In the first example, you're subtractin

[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2014-10-03 Thread lkraav
lkraav added the comment: I may be seeing this running tracd-1.1.2b1 on python 2.7.7 http://trac.edgewall.org/ticket/11772 -- versions: +Python 2.7 ___ Python tracker ___ __

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry; that should be: complex(-0.0, 0.0) - complex(0.0, 0.0) The imaginary part is then worked out as (0.0 - 0.0), which (in all rounding modes but round-towards-negative) is 0.0. -- ___ Python tracker

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: P.S. The C standardisation folks tried to introduce the Imaginary type (optional for a conforming implementation) to get around exactly this type of problem, but it doesn't seem to have caught on in most mainstream compilers. -- _

[issue22549] bug in accessing bytes, inconsistent with normal strings and python 2.7

2014-10-03 Thread Kevin Hendricks
New submission from Kevin Hendricks: Hi, I am working on porting my ebook code from Python 2.7 to work with both Python 2.7 and Python 3.4 and have found the following inconsistency I think is a bug ... KevinsiMac:~ kbhend$ python3 Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21) [G

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, I realize it's not even Anaconda. I was just using a 2.6 interpreter, which apparently had a differently complex repr(). -- ___ Python tracker __

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: FTR, a similar issue with regular floats: >>> -0.0-0.0 -0.0 >>> (-0.0)-0.0 -0.0 >>> z = -0.0 >>> z - z 0.0 -- ___ Python tracker ___ __

[issue22545] incomplete complex repr() with negative zeroes

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: Ah yes, that would make sense. I vaguely remember fixing this between Python 2.6 and Python 2.7. -- ___ Python tracker ___ ___

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: Nope, no float issue here. :-) Which part of the output do you think is wrong? Your last (z - z) is doing ((-0.0) - (-0.0)), not (-0.0 - 0.0). This is all following the IEEE 754 rules. -- ___ Python tracker

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, the last part is ok. It's the preceding parts that are a bit surprising. -- ___ Python tracker ___

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oops, I get it now. Sorry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2014-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How did you detect a leak Mark? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: > Oops, I get it now. Okay. :-) Just for the record, for anyone encountering this issue in the future, here's the relevant extract from section 6.3 of IEEE 754-2008: """ When the sum of two operands with opposite signs (or the difference of two operands with

[issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: What is tracd doing? This issue should only appear when calling one of the debugging functions in the gc module, AFAICT. -- ___ Python tracker

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: Whoops; make that two years ago, not four. The rest stands, though. -- ___ Python tracker ___ ___ Py

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: > How did you detect a leak Mark? Um. It was four years ago. I have no idea. :-) I suspect I was just looking at the C code and being my usual nasty suspicious self. -- ___ Python tracker

[issue22548] Bogus parsing of negative zeros in complex literals

2014-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: > It doesn't cover the "sum with like signs" Ah, sorry, yes it does; it's in the previous paragraph. """ [...] the sign of a sum, or of a difference x−y regarded as a sum x+(−y), differs from at most one of the addends’ signs """ --

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-10-03 Thread Stefan Krah
Stefan Krah added the comment: Okay, the whole thing isn't that urgent either. Sorry for the confusion w.r.t slicing: I misremembered what the latest numpy version did: a) >>> x = np.array([[1,2,3,]]) >>> x.strides (9223372036854775807, 8) b) >>> x = np.array([[1,2,3], [4,5,6]

[issue22550] issubclass can fail after module reloading

2014-10-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Inspired by test failure in issue22540. This is still looks as a bug to me: >>> import sys, decimal, numbers >>> issubclass(decimal.Decimal, numbers.Number) True >>> del sys.modules['numbers'] >>> import numbers >>> issubclass(decimal.Decimal, numbers.Number

[issue22550] issubclass can fail after module reloading

2014-10-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue22549] bug in accessing bytes, inconsistent with normal strings and python 2.7

2014-10-03 Thread R. David Murray
R. David Murray added the comment: Agreed, but that is a design decision that was taken long ago (regretted by more than a few but defended by others). You can find a number of discussions of this by searching the python-dev archives, including some more recent discussions on possibilities fo

[issue22550] issubclass can fail after module reloading

2014-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: How would Decimal know that someone has swapped the decimal module in sys.modules? -- ___ Python tracker ___ __

[issue16066] Truncated POST data in CGI script on Windows 7

2014-10-03 Thread Eyal Gruss
Eyal Gruss added the comment: i can confirm on win 7 and python 3.4.1 -- nosy: +Eyal.Gruss ___ Python tracker ___ ___ Python-bugs-list

[issue22526] file iteration SystemError for huge lines (2GiB+)

2014-10-03 Thread Matthias Klose
Matthias Klose added the comment: no, it doesn't. at least when testing the installed python installation, it just fails: https://jenkins.qa.ubuntu.com/job/utopic-adt-python2.7/39/? -- nosy: +doko resolution: fixed -> status: closed -> open ___ Pyt

[issue22546] Wrong default precision in documentation for format

2014-10-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: "The precision is a decimal number indicating how many digits should be displayed ... before and after the decimal point for a floating point value formatted with 'g' or 'G'. It seems that str, repr, and '' are using precision 16, and the doc should be changed

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2014-10-03 Thread Mark Lawrence
Mark Lawrence added the comment: How do we take this forward, also considering #12939, #21859 and #14243 and possibly others? -- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue22526] file iteration SystemError for huge lines (2GiB+)

2014-10-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: For insufficient memory not an incorrect fix, though? -- nosy: +benjamin.peterson ___ Python tracker ___

[issue16700] Document that bytes OS API can returns unusable results on Windows

2014-10-03 Thread Mark Lawrence
Mark Lawrence added the comment: As #13247 has been closed "not a bug" and #16656 "won't fix" shouldn't this be done sooner rather than later? -- nosy: +BreamoreBoy ___ Python tracker _

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2014-10-03 Thread Mark Lawrence
Mark Lawrence added the comment: This is one of several Windows file related issues, see also #12939, #21859, #15244 and possibly others. How can we take this forward? If it's of any use I can help with testing as I've a new Windows 8.1 HP laptop with 8G of memory. -- nosy: +BreamoreB

[issue19119] duplicate test name in Lib/test/test_heapq.py

2014-10-03 Thread Ben Roberts
Ben Roberts added the comment: Any thoughts/reviews on the patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue22551] Anything results in a SyntaxError after -i -u -c on 2.7.8 on Windows 7

2014-10-03 Thread Taylor Marks
New submission from Taylor Marks: On Python 2.7.8, on Windows 7, if I start up the Python interactive console using the flags -i -u -c, nothing else will be considered valid syntax from that point forward. My understanding is: -i tells Python to enter interactive mode after it's done running

[issue22515] Implement partial order on Counter

2014-10-03 Thread Ram Rachum
Ram Rachum added the comment: Fixed patch attached. Still needs someone to run it and see whether there are any bugs. -- Added file: http://bugs.python.org/file36792/patch2.patch ___ Python tracker ___

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2014-10-03 Thread Alex Gaynor
Alex Gaynor added the comment: Attached patch also adds a test -- I'm not convinced this is the best way to test this, but I don't see any other way either. -- Added file: http://bugs.python.org/file36793/issue22449.diff ___ Python tracker

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Context: inspect.signature returns an inspect.Signature instance. Its .bind and .bind_partial methods return ab inspect.BoundArguments instance with a standard <...@ 0x...> representation. >>> import inspect >>> def foo(a, b=10): pass >>> ba = inspect.signatu

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Ram Rachum
Ram Rachum added the comment: Another thing I proposed in python-ideas is to have `__getitem__` delegate to `.arguments`, so this proposal is similar in spirit, because I want to have `__repr__` show information from `.arguments`. To be honest I don't see the point in having to access `.argume

[issue18903] IDLE file-completion is case-sensitive in Windows

2014-10-03 Thread Mark Lawrence
Mark Lawrence added the comment: @Terry can you comment on Westley's patch please. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 ___ Python tracker ___

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: > Another thing I proposed in python-ideas is to have `__getitem__` delegate to > `.arguments`, so this proposal is similar in spirit, because I want to have > `__repr__` show information from `.arguments`. Big -1 on __getitem__ > To be honest I don't see the

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2014-10-03 Thread Steve Dower
Steve Dower added the comment: As much as I like the idea of using OS handles everywhere, the compatibility issues are probably too significant, and you can't mix CRT methods with OS methods because the CRT does its own buffering. Of course, you can open a file with the Win32 API and immediate

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: .arguments returns a mutable (ordered) dict that can be modified. See the example in the doc https://docs.python.org/3.4/library/inspect.html#inspect.BoundArguments -- ___ Python tracker

[issue19472] inspect.getsource() raises a wrong exception type

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: > @Yury do you agree with this? I think it's a perfectly normal behaviour. OSError is raised for valid kind of objects, and TypeError is raised when you're passing something weird. That's a pretty common practice is Python. -- ___

[issue19472] inspect.getsource() raises a wrong exception type

2014-10-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue22526] file iteration SystemError for huge lines (2GiB+)

2014-10-03 Thread Matthias Klose
Matthias Klose added the comment: maybe, but then you should skip the test, or expect at least a MemoryError. -- ___ Python tracker ___ __

[issue22526] file iteration SystemError for huge lines (2GiB+)

2014-10-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: How much memory does that whatever is running that test have? On Fri, Oct 3, 2014, at 17:17, Matthias Klose wrote: > > Matthias Klose added the comment: > > maybe, but then you should skip the test, or expect at least a > MemoryError. > > -- > > _

[issue22549] bug in accessing bytes, inconsistent with normal strings and python 2.7

2014-10-03 Thread Kevin Hendricks
Kevin Hendricks added the comment: Thanks for letting me know this was expected behaviour. I see the same "issue" holds true while using: for c in b'0123456789': print(ord(c)) I ended up using slices nearly everyplace. Still ran into iterator issues. Horrible hack really. I think I

[issue22550] issubclass can fail after module reloading

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: I don't think it a bug or that it's possible to do something about it. Reloading modules in Python should usually be just avoided by all means. -- nosy: +brett.cannon, yselivanov ___ Python tracker

[issue22551] Anything results in a SyntaxError after -u on 2.7.8 on Windows 7

2014-10-03 Thread Taylor Marks
Taylor Marks added the comment: I checked a few other combinations of flags: -i -c works fine. -u has the same issue as described in my opening message. This occurs in both cmd and PowerShell, running as admin. -- title: Anything results in a SyntaxError after -i -u -c on 2.7.8 on Wind

[issue22551] Anything results in a SyntaxError after -u on 2.7.8 on Windows 7

2014-10-03 Thread Taylor Marks
Taylor Marks added the comment: Sorry for multiple consecutive posts... I don't see a way to edit prior posts. The stack trace I posted in my first message has the arrow in the wrong spot. It should actually be pointing to the first space after the closing brace. Here's a simpler (and correct)

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2014-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset d9c52836aec8 by Benjamin Peterson in branch '2.7': also use openssl envvars to find certs on windows (closes #22449) https://hg.python.org/cpython/rev/d9c52836aec8 New changeset e1f453e13f8d by Benjamin Peterson in branch '3.4': also use openssl env

[issue22551] Anything results in a SyntaxError after -u on 2.7.8 on Windows 7

2014-10-03 Thread Taylor Marks
Taylor Marks added the comment: I found someone else describing the same behavior in 2.4 here, I guess the conclusion is it isn't a bug: http://bytes.com/topic/python/answers/162599-windows-python-2-4-unbuffered-flag-causes-syntaxerror-interactive-sessions -- resolution: -> not a bug

[issue22515] Implement partial order on Counter

2014-10-03 Thread Ethan Furman
Ethan Furman added the comment: Testing the patch... -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue19453] pydoc.py doesn't detect IronPython, help(foo) can hang

2014-10-03 Thread Mark Lawrence
Mark Lawrence added the comment: There's a two line patch inline in msg201750. If it's acceptable I'll do a formal patch myself unless someone else wants to pick this up. -- nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware ___ Python tracker

  1   2   >