Re: Sort list of dictionaries

2015-03-03 Thread Steven D'Aprano
Charles Heizer wrote: Hello, I'm new to python and I'm trying to find the right way to solve this issue I have. I'm trying to sort this list by name and then by version numbers. The problem I'm having is that I can not get the version numbers sorted with the highest at the top or sorted

[issue11097] MSI: Remove win32com dependency from installer generator

2015-03-03 Thread Mark Lawrence
Mark Lawrence added the comment: This can now be closed as out of date. -- components: +Windows nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11097

[issue23569] unittest.mock.MagicMock.__div__ works but __truediv__ doesn't (3.3 only)

2015-03-03 Thread Zygmunt Krynicki
New submission from Zygmunt Krynicki: Hey. I'm the upstream developer of padme https://github.com/zyga/padme -- the mostly transparent proxy class for Python. While working on unit tests for proxying numeric methods I realized that there are a few bugs in the mock library. The bug I'd like

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

2015-03-03 Thread Nick Coghlan
Nick Coghlan added the comment: __new__ is a little weird - it's actually special cased as a staticmethod. Your questions is still valid, though. For existing versions, documenting the requirement is the only option. For future versions, we could conceivably implement a decorate it if it

[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the patch has a significant overhead: _Py_CheckFunctionResult() may be marked to be inlined, and PyCFunction_Call() and PyObject_Call() checks may be marked as unlikely using GCC __builtin_expect(), something like: Could you please open separate issue

[issue13697] python RLock implementation unsafe with signals

2015-03-03 Thread Nikita Kovaliov
Changes by Nikita Kovaliov nik...@maizy.ru: -- nosy: +maizy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13697 ___ ___ Python-bugs-list mailing

[issue13697] python RLock implementation unsafe with signals

2015-03-03 Thread Roumen Petrov
Roumen Petrov added the comment: STINNER Victor wrote: [SNIP]I attach hang2.py which doesn't force the Python implementation of RLock.[SNIP] Ok. Fine with me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13697

[issue23574] datetime: support leap seconds

2015-03-03 Thread STINNER Victor
STINNER Victor added the comment: support_leap_seconds.patch: different approach, accept second=60. Problem: fromtimestamp() returns the wrong day. haypo@smithers$ ./python Python 3.5.0a1+ (default:760f222103c7+, Mar 3 2015, 15:36:36) import datetime datetime.datetime(2012, 6, 30, 23, 59,

[issue23574] datetime: support leap seconds

2015-03-03 Thread Doug Hellmann
Changes by Doug Hellmann doug.hellm...@gmail.com: -- nosy: +doughellmann ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23574 ___ ___

Re: Logging custom level not print module properly??

2015-03-03 Thread Didymus
On Tuesday, March 3, 2015 at 10:02:02 AM UTC-5, Peter Otten wrote: Didymus wrote: Hi, I have setup custom levels (with the help of the Python community) for logging. I set this up as a class in a module log.py below. The problem I'm seeing is that no matter the file the the logging

[issue11097] MSI: Remove win32com dependency from installer generator

2015-03-03 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11097 ___

Re: Logging custom level not print module properly??

2015-03-03 Thread Ian Kelly
On Mar 3, 2015 8:16 AM, Didymus lynt...@gmail.com wrote: I did find that if I changed the self.log to self._log it works correctly but gives me a pylint warning about acccess to a protected member _log.. def pwarning(self, message, *args, **kws): Performance Warning Message Level #

[issue23574] datetime: support leap seconds

2015-03-03 Thread STINNER Victor
STINNER Victor added the comment: Oh, mktime() returns the same timestamp with and without the leap second: time.mktime((2012, 6, 30, 23, 59, 59, -1, -1, -1)) 1341093599.0 time.mktime((2012, 6, 30, 23, 59, 60, -1, -1, -1)) 1341093600.0 time.mktime((2012, 7, 1, 0, 0, 0, -1, -1, -1))

Re: Logging custom level not print module properly??

2015-03-03 Thread Peter Otten
Didymus wrote: Hi, I have setup custom levels (with the help of the Python community) for logging. I set this up as a class in a module log.py below. The problem I'm seeing is that no matter the file the the logging is happening in it always prints the module as log, I've rcreated the

[issue23574] datetime: support leap seconds

2015-03-03 Thread STINNER Victor
STINNER Victor added the comment: Ignoring leap seconds introduces unexpected result. datetime.timestamp - datetime.fromtimestamp drops one second: $ ./python Python 3.5.0a1+ (default:760f222103c7+, Mar 3 2015, 15:36:36) t=datetime.datetime(2012, 6, 30, 23, 59, 60).timestamp()

[issue21619] Cleaning up a subprocess with a broken pipe

2015-03-03 Thread Martin Panter
Martin Panter added the comment: Aha! So perhaps Windows can accept a small amount of data into its pipe buffer even if we know the pipe has been broken. That kind of makes sense. Test case could be modified to: proc = subprocess.Popen([...], bufsize=support.PIPE_MAX_SIZE,

Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-03 Thread Rustom Mody
On Tuesday, March 3, 2015 at 10:02:30 AM UTC+5:30, Mario Figueiredo wrote: On Mon, 2 Mar 2015 19:51:31 -0800 (PST), Rustom Mody wrote: I dont know what you are saying Mario or even whom you are addressing I was replying directly to Marko. I don't think it is possible to establish a

Re: Python Worst Practices

2015-03-03 Thread Chris Angelico
On Tue, Mar 3, 2015 at 7:51 PM, Christian Gollwitzer aurio...@gmx.de wrote: Am 28.02.15 um 02:44 schrieb Chris Angelico: On Sat, Feb 28, 2015 at 12:32 PM, sohcahto...@gmail.com wrote: For example, I've seen someone create a Socket class, then created an operator overload that allowed you to

[issue23505] Urlparse insufficient validation leads to open redirect

2015-03-03 Thread Yassine ABOUKIR
Yassine ABOUKIR added the comment: I am not quiet sure about the first proposal but I strongly believe the appropriate method to fix this is by checking if the path starts with double slashes and then URL encoding the two leading slashes. -- ___

Re: Sort list of dictionaries

2015-03-03 Thread Chris Angelico
On Wed, Mar 4, 2015 at 2:56 AM, Charles Heizer ceh...@gmail.com wrote: Personally, I prefer to not use a lambda: def name_version(elem): return elem['name'], LooseVersion(elem['version']) result = sorted(mylist, key=name_version, reverse=True) Peter, thank you. Me being new to Python

[issue23575] MIPS64 needs ffi's n32.S

2015-03-03 Thread Simon Hoinkis
New submission from Simon Hoinkis: MIPS64 needs ffi's n32.S linking in for _ctypes to work otherwise build errors will occur (e.g. python-setuptools). -- components: ctypes files: mips64.patch keywords: patch messages: 237150 nosy: Simon Hoinkis priority: normal severity: normal

Re: Sort list of dictionaries

2015-03-03 Thread Charles Heizer
On Monday, March 2, 2015 at 11:23:37 AM UTC-8, Peter Otten wrote: Charles Heizer wrote: Never mind, the light bulb finally went off. :-\ sortedlist = sorted(mylist , key=lambda elem: %s %s % ( elem['name'], (..join([i.zfill(5) for i in elem['version'].split(.)])) ), reverse=True)

Re: Sort list of dictionaries

2015-03-03 Thread Paul Moore
On Tuesday, 3 March 2015 16:09:31 UTC, Chris Angelico wrote: On Wed, Mar 4, 2015 at 2:56 AM, Charles Heizer wrote: Personally, I prefer to not use a lambda: def name_version(elem): return elem['name'], LooseVersion(elem['version']) result = sorted(mylist, key=name_version,

Reading all buffered bytes without blocking

2015-03-03 Thread Paul Moore
Is it possible to say to a BufferedReader stream give me all the bytes you have available in the buffer, or do one OS call and give me everything you get back? The problem is that the number of bytes argument to read1() isn't optional, so I can't do available_bytes = fd.read1(). I need this

[issue23570] Change with subprocess.Popen(): (context manager) to ignore broken pipe error

2015-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't see a difference between buffered file and Popen object. Both are useless after closing, both can raise an exception when flush a buffer on closing. Why suppress an exception in one case but not in other? I think this question needs wider

[issue23570] Change with subprocess.Popen(): (context manager) to ignore broken pipe error

2015-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New patch to fix the bug seen by Serhiy. I thought about different solution: try: if input: self.stdin.write(input) finally: self.stdin.close() But your approach looks working too, --

[issue23570] Change with subprocess.Popen(): (context manager) to ignore broken pipe error

2015-03-03 Thread STINNER Victor
STINNER Victor added the comment: I thought about different solution: Your solution is different: I would prefer to also ignore broken pipe errors on close(). I'm not sure that close() can raise a BrokenPipeError in practice. -- ___ Python tracker

[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-03 Thread STINNER Victor
STINNER Victor added the comment: 2015-03-03 13:49 GMT+01:00 Serhiy Storchaka rep...@bugs.python.org: If the patch has a significant overhead: _Py_CheckFunctionResult() may be marked to be inlined, and PyCFunction_Call() and PyObject_Call() checks may be marked as unlikely using GCC

[issue23570] Change with subprocess.Popen(): (context manager) to ignore broken pipe error

2015-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your solution is different: I would prefer to also ignore broken pipe errors on close(). I'm not sure that close() can raise a BrokenPipeError in practice. Of course all this code should be inside try/except block that ignores a BrokenPipeError.

[issue13697] python RLock implementation unsafe with signals

2015-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: This bug has existed for ages. People who want sane behaviour should just switch to Python 3. Closing. -- resolution: - rejected stage: needs patch - resolved status: open - closed ___ Python tracker

EuroPython 2015: We've opened the flood gates :-)

2015-03-03 Thread M.-A. Lemburg
As announced earlier today, we have opened the early-bird ticket sales for EuroPython 2015. You can save up to 25% on the early-bird tickets, so book your tickets while they last: *** https://ep2015.europython.eu/en/registration/ *** We only have 350 early-bird tickets available and

[issue13697] python RLock implementation unsafe with signals

2015-03-03 Thread STINNER Victor
STINNER Victor added the comment: The attached test script demonstrates the issue on Python 2.6 and 3.2, and code inspection suggests this is still valid for 2.7 and 3.4. I disagree that Python 3.4 is affected: RLock has been reimplemented in C in Python 3.2. Only the Python implementation

[issue10112] Use -Wl, --dynamic-list=x.list, not -Xlinker -export-dynamic

2015-03-03 Thread Jan Kratochvil
Jan Kratochvil added the comment: It even crashes applications due to pollution of dynamic symbols namespace by application symbols as seen in: https://bugzilla.redhat.com/show_bug.cgi?id=1198158 -- ___ Python tracker rep...@bugs.python.org

[issue23512] The list of built-in functions is not alphabetical on https://docs.python.org/2/library/functions.html

2015-03-03 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: docs@python - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23512 ___

[issue23577] Add tests for wsgiref.validate

2015-03-03 Thread Alex Shkop
New submission from Alex Shkop: These tests increase coverage of wsgiref.validate module. They test InputWrapper and ErrorWrapper used to validate env['wsgi.input'] and env['wsgi.errors']. -- components: Tests files: wsgiref_test_wrappers.patch keywords: patch messages: 237152 nosy:

[issue19884] Importing readline produces erroneous output

2015-03-03 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: From the OP: This was reported at [1] and originally at [2]. The readline maintainer suggests [3] using: rl_variable_bind (enable-meta-key, off); which was introduced in readline 6.1. Do you think it'd be safe to add the above line? From

[issue23576] HTTPS reads can block when content length not available and timeout set.

2015-03-03 Thread Cory Benfield
New submission from Cory Benfield: Initially reported on the requests bug list at https://github.com/kennethreitz/requests/issues/2467 In cases when a remote web server sends a non-chunked response that does not have a content length, it is possible to get http.client to hang on a read. To

[issue23578] struct.pack error messages do not indicate which argument was invalid

2015-03-03 Thread Alistair Lynn
New submission from Alistair Lynn: In this example: struct.pack('!', 0x5FFF, 0x6FFF, 0x7FFF, 0x8FFF) Python errors that the 'h' format requires -32768 = number = 32767, but it does not indicate which of the arguments is at fault. In this contrived example it's clearly the fourth one,

[issue19884] Importing readline produces erroneous output

2015-03-03 Thread Isaac Schwabacher
Isaac Schwabacher added the comment: Whoops, that's 0x0601. Though Maxime gives evidence that the version should in fact be 0x0603. (Note that while OS X ships with libedit over libreadline, anyone who wants to can install the real thing instead of that pale imitation; the test would have

[issue23563] Faster urllib.urlparse utility functions

2015-03-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23563 ___

Re: Newbie question about text encoding

2015-03-03 Thread Chris Angelico
On Wed, Mar 4, 2015 at 5:03 AM, Rustom Mody rustompm...@gmail.com wrote: What I was trying to say expanded here http://blog.languager.org/2015/03/whimsical-unicode.html [Hope the word 'whimsical' is less jarring and more accurate than 'gibberish'] Re footnote #4: ½ is a single character for

[issue23563] Faster urllib.urlparse utility functions

2015-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 461afc24fabc by Serhiy Storchaka in branch 'default': Issue #23563: Optimized utility functions in urllib.parse. https://hg.python.org/cpython/rev/461afc24fabc -- nosy: +python-dev ___ Python tracker

[issue23576] HTTPS reads can block when content length not available and timeout set.

2015-03-03 Thread Zachary Salzbank
Changes by Zachary Salzbank z...@key.me: -- nosy: +Zachary Salzbank ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23576 ___ ___ Python-bugs-list

[issue23367] integer overflow in unicodedata.normalize

2015-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The test doesn't hurt. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23367 ___ ___ Python-bugs-list mailing

[issue23576] HTTPS reads can block when content length not available and timeout set.

2015-03-03 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23576 ___ ___

Re: Newbie question about text encoding

2015-03-03 Thread Rustom Mody
On Thursday, February 26, 2015 at 10:33:44 PM UTC+5:30, Terry Reedy wrote: On 2/26/2015 8:24 AM, Chris Angelico wrote: On Thu, Feb 26, 2015 at 11:40 PM, Rustom Mody wrote: Wrote something up on why we should stop using ASCII: http://blog.languager.org/2015/02/universal-unicode.html I

[issue20271] urllib.parse.urlparse() accepts wrong URLs

2015-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: With optimizations in issue23563 and weaken IPv6 check the implementation of urlsplit() can be faster. $ ./python -m timeit -s from urllib.parse import urlparse, clear_cache -- urlparse('http://python.org:80'); clear_cache() 1 loops, best of 3: 86.3

Re: Reading all buffered bytes without blocking

2015-03-03 Thread Serhiy Storchaka
On 03.03.15 18:07, Paul Moore wrote: Is it possible to say to a BufferedReader stream give me all the bytes you have available in the buffer, or do one OS call and give me everything you get back? The problem is that the number of bytes argument to read1() isn't optional, so I can't do

[issue23579] Amazon.com links

2015-03-03 Thread Edrie Ddrie
New submission from Edrie Ddrie: Keywords:easy Priority: normal -- assignee: docs@python components: Documentation messages: 237160 nosy: Edrie Ddrie, docs@python priority: normal severity: normal status: open title: Amazon.com links type: enhancement versions: Python 3.4

[issue23550] Add to unicodedata a function to query the Quick_Check property for a character

2015-03-03 Thread Hammerite
Hammerite added the comment: Here is a better patch that includes the changes to unicodedata.h The problem before was that the diff tool can't cope with line ending differences. I just fixed the line endings manually. -- Added file: http://bugs.python.org/file38323/quick_check_2.patch

Re: rst and pypandoc

2015-03-03 Thread alb
Hi Gregory, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: [] From a cursory reading of the pypandoc docs, it looks like enabling the raw_tex extension in pypandoc will give you what you want. Search for raw_tex on this page: http://johnmacfarlane.net/pandoc/README.html As far as I

[issue23575] MIPS64 needs ffi's n32.S

2015-03-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +amaury.forgeotdarc, belopolsky, doko, meador.inge stage: - patch review versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23575

[issue23579] Amazon.com links

2015-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: If the mentioned books have official Web sites we could use a link to them. Feel free to submit a patch. -- nosy: +pitrou versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue23285] PEP 475 - EINTR handling

2015-03-03 Thread Charles-François Natali
Charles-François Natali added the comment: @Victor: please commit. Would be nice to have a test for it; -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23285 ___

Re: rst and pypandoc

2015-03-03 Thread alb
Hi Mark, Mark Lawrence breamore...@yahoo.co.uk wrote: [] The two inps are *not* the same. My bad. I did not notice the difference, thanks for pointing that out. Al -- https://mail.python.org/mailman/listinfo/python-list

Re: rst and pypandoc

2015-03-03 Thread alb
Hi Steven, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: [] The two results are clearly *not* the same, even though the two inp /claim/ to be the same... The two inp are not the same. Correct. My statement was wrong. [] I'm sure that you know how to do such simple things to

[issue23505] Urlparse insufficient validation leads to open redirect

2015-03-03 Thread Paul McMillan
Paul McMillan added the comment: While some websites may use urlunparse(urlparse(url)) to validate a url, this is far from standard practice. Django, for instance, does not use this method. While I agree we should clean this behavior up, this is not a vulnerability in core python, and we need

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-03-03 Thread Robert Collins
Robert Collins added the comment: Ok, all changes applied, lets see how this looks to folk. -- Added file: http://bugs.python.org/file38324/issue17911-5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911

Re: rst and pypandoc

2015-03-03 Thread alb
Hi Steven, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: [] In [43]: print pypandoc.convert(s, 'latex', format='rst') this is \textbackslash{}some restructured text. since a literal backslash gets converted to a literal latex backslash. Why is this a problem? Isn't the

Re: Reading all buffered bytes without blocking

2015-03-03 Thread Paul Moore
On Tuesday, 3 March 2015 19:29:19 UTC, Serhiy Storchaka wrote: On 03.03.15 18:07, Paul Moore wrote: Is it possible to say to a BufferedReader stream give me all the bytes you have available in the buffer, or do one OS call and give me everything you get back? The problem is that the

[issue23576] HTTPS reads can block when content length not available and timeout set.

2015-03-03 Thread Piotr Dobrogost
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23576 ___ ___

[issue23579] Amazon.com links

2015-03-03 Thread Edrie Ddrie
Edrie Ddrie added the comment: There a links to Amazon in the official documentation. (In Python 3.4 in the tkinter.html and othergui.html) It's not right to advertise for a certain business. When will the official documentation guide people to eat at MacDonalds ? I is a sign of a low moral. A

[issue23580] Amazon.com links

2015-03-03 Thread Edrie Ddrie
New submission from Edrie Ddrie: Keywords: easy Priority: normal -- assignee: docs@python components: Documentation messages: 237161 nosy: Edrie Ddrie, docs@python priority: normal severity: normal status: open title: Amazon.com links type: enhancement versions: Python 3.4

Re: [Python 3.4.3, pip 6.0.8 ] Error installing Sphinx (on markupsafe install)

2015-03-03 Thread Mario Figueiredo
On Tue, 03 Mar 2015 07:15:19 +, Mark Lawrence breamore...@yahoo.co.uk wrote: Further the output above tells me that you've not got Visual Studio 2010 installed. I do. It's my principal development suite. But you put me in the right track. I took a closer look at the error messages and also

http: connection reset by peer

2015-03-03 Thread Ethan Furman
This may seem off-topic, but it's an issue for my roundup server which is written in Python, so hopefully that will buy me some slack. ;) And, yes, I did post a message to the Roundup Users mailing list first, but haven't received any replies. So, the basic problem is: I login to the roundup

Fun Approaches To Lose Weight

2015-03-03 Thread felecislewis
How do you eat lentils? Garcinia Cambogia Gummy Silly question you could say but I would like to know tell you, don't eat lentils natural. Phytic acid and tannins are anti-nutrients that are inside the lentil seeds; your actually don't wish to ingest that. The preparation of lentil seeds is

[issue23504] Add __all__ into types

2015-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb5fe8cc60eb by Serhiy Storchaka in branch '2.7': Issue #23504: Added an __all__ to the types module. https://hg.python.org/cpython/rev/cb5fe8cc60eb New changeset 4888f9498db6 by Serhiy Storchaka in branch '3.4': Issue #23504: Added an __all__ to

[issue23578] struct.pack error messages do not indicate which argument was invalid

2015-03-03 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +mark.dickinson, meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23578 ___ ___

[issue23576] HTTPS reads can block when content length not available and timeout set.

2015-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reproducing seems a bit irregular. Note that the last bytestring (the empty bytestring) is what takes time to read. Also note that HTTPResponse is a buffered I/O object, so normally you don't need to read up to the empty string. You can stop when you got less

[issue23504] Add __all__ into types

2015-03-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23504 ___

Re: rst and pypandoc

2015-03-03 Thread Gregory Ewing
alb wrote: RuntimeError: Invalid input format! Expected one of these: native, json, markdown, markdown+lhs, rst, rst+lhs, docbook, textile, html, latex, latex+lhs It looks like it's expecting the base format to be spelled markdown, not abbreviated to md. (The python wrapper expands md to

Re: Python Worst Practices

2015-03-03 Thread Christian Gollwitzer
Am 03.03.15 um 12:12 schrieb Chris Angelico: On Tue, Mar 3, 2015 at 7:51 PM, Christian Gollwitzer aurio...@gmx.de wrote: Are you trying to pick on C++ streams? I could never understand why anybody has problems with an arrow that means put into the left thing instead of shift the bits to the

[issue23576] HTTPS reads can block when content length not available and timeout set.

2015-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Varying reproduceability may have to do with sleepy-reaches-6892.herokuapp.com resolving to different endpoints (that domain name has a stupidly small TTL, by the way). Anyway, for an unknown reason the following patch seems to fix the issue. --

[issue23580] Amazon.com links

2015-03-03 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman resolution: - duplicate status: open - closed superseder: - Amazon.com links ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23580

Re: Python Worst Practices

2015-03-03 Thread Chris Angelico
On Wed, Mar 4, 2015 at 9:46 AM, Christian Gollwitzer aurio...@gmx.de wrote: I can agree with the argument that operator precedence can make problems; e.g. this couta==b; does not output the truth value of a==b, but instead outputs a and compares the stream to b (which will usually

Re: Newbie question about text encoding

2015-03-03 Thread Terry Reedy
On 3/3/2015 1:03 PM, Rustom Mody wrote: On Thursday, February 26, 2015 at 10:33:44 PM UTC+5:30, Terry Reedy wrote: You should add emoticons, but not call them or the above 'gibberish'. I think that this part of your post is more 'unprofessional' than the character blocks. It is very jarring

[issue23579] Amazon.com links

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

[issue23568] unittest.mock.MagicMock doesn't support __rdivmod__

2015-03-03 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +michael.foord, rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23568 ___ ___ Python-bugs-list

[issue23569] unittest.mock.MagicMock.__div__ works but __truediv__ doesn't (3.3 only)

2015-03-03 Thread Ned Deily
Ned Deily added the comment: Thanks for the report, however, per our support policy, Python 3.3 is now open only for security fixes for the remainder of its support window. -- nosy: +ned.deily resolution: - wont fix stage: - resolved status: open - closed

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-03-03 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: Added file: http://bugs.python.org/file38325/issue17911-6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911 ___

Re: tarfile vs zipfile

2015-03-03 Thread Marcos Almeida Azevedo
On Tue, Mar 3, 2015 at 6:39 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Mark Lawrence wrote: On 03/03/2015 02:29, Terry Reedy wrote: Plus tartfiles come from unix world, whereas zip was used instead in Windows world. Is the tart bit the thing that you can eat, a loose woman or

[issue23310] MagicMock constructor configuration fails for magic methods

2015-03-03 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +michael.foord, rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23310 ___ ___ Python-bugs-list

[issue23504] Add __all__ into types

2015-03-03 Thread Berker Peksag
Berker Peksag added the comment: LGTM. -- nosy: +berker.peksag stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23504 ___

[issue22933] Misleading sentence in doc for shutil.move

2015-03-03 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22933 ___ ___

[issue23572] functools.singledispatch fails when not BaseClass is True

2015-03-03 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23572 ___ ___

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
On Tuesday, March 3, 2015 at 10:37:54 PM UTC-5, liuerfire Wang wrote: Is there a file named __init__.py in the modulename dir? Best regards On Wed, Mar 4, 2015 at 11:25 AM, fa...@vt.edu wrote: I have the following directory /home/me/projects/modulename. I

Re: Newbie question about text encoding

2015-03-03 Thread Rustom Mody
On Wednesday, March 4, 2015 at 10:25:24 AM UTC+5:30, Chris Angelico wrote: On Wed, Mar 4, 2015 at 3:45 PM, Rustom Mody wrote: It lists some examples of software that somehow break/goof going from BMP-only unicode to 7.0 unicode. IOW the suggestion is that the the two-way

Re: Newbie question about text encoding

2015-03-03 Thread Rustom Mody
On Wednesday, March 4, 2015 at 12:14:11 AM UTC+5:30, Chris Angelico wrote: On Wed, Mar 4, 2015 at 5:03 AM, Rustom Mody wrote: What I was trying to say expanded here http://blog.languager.org/2015/03/whimsical-unicode.html [Hope the word 'whimsical' is less jarring and more accurate than

Re: Newbie question about text encoding

2015-03-03 Thread Steven D'Aprano
Rustom Mody wrote: On Thursday, February 26, 2015 at 10:33:44 PM UTC+5:30, Terry Reedy wrote: On 2/26/2015 8:24 AM, Chris Angelico wrote: On Thu, Feb 26, 2015 at 11:40 PM, Rustom Mody wrote: Wrote something up on why we should stop using ASCII:

[issue23568] unittest.mock.MagicMock doesn't support __rdivmod__

2015-03-03 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23568 ___ ___

Re: Newbie question about text encoding

2015-03-03 Thread Rustom Mody
On Wednesday, March 4, 2015 at 9:35:28 AM UTC+5:30, Rustom Mody wrote: On Wednesday, March 4, 2015 at 8:24:40 AM UTC+5:30, Steven D'Aprano wrote: Rustom Mody wrote: On Thursday, February 26, 2015 at 10:33:44 PM UTC+5:30, Terry Reedy wrote: On 2/26/2015 8:24 AM, Chris Angelico wrote:

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread liuerfire Wang
Is there a file named __init__.py in the modulename dir? Best regards On Wed, Mar 4, 2015 at 11:25 AM, fa...@vt.edu wrote: I have the following directory /home/me/projects/modulename. I update PYTHONPATH using the following command: export

Re: Newbie question about text encoding

2015-03-03 Thread Rustom Mody
On Wednesday, March 4, 2015 at 12:07:06 AM UTC+5:30, jmf wrote: Le mardi 3 mars 2015 19:04:06 UTC+1, Rustom Mody a écrit : On Thursday, February 26, 2015 at 10:33:44 PM UTC+5:30, Terry Reedy wrote: On 2/26/2015 8:24 AM, Chris Angelico wrote: On Thu, Feb 26, 2015 at 11:40 PM, Rustom Mody

[issue15795] Zipfile.extractall does not preserve file permissions

2015-03-03 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: commit review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15795 ___

Re: Newbie question about text encoding

2015-03-03 Thread Rustom Mody
On Wednesday, March 4, 2015 at 8:24:40 AM UTC+5:30, Steven D'Aprano wrote: Rustom Mody wrote: On Thursday, February 26, 2015 at 10:33:44 PM UTC+5:30, Terry Reedy wrote: On 2/26/2015 8:24 AM, Chris Angelico wrote: On Thu, Feb 26, 2015 at 11:40 PM, Rustom Mody wrote: Wrote something up

[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2015-03-03 Thread Berker Peksag
Berker Peksag added the comment: I think it is worth to be applied to maintained releases. I'd commit this only to the default branch. Changing the return value from None to an exception after three 3.4 bugfix releases(3.4.1, 3.4.2 and 3.4.3 -- also since 3.4.3 was released in Feb 2015,

[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-03-03 Thread Berker Peksag
Berker Peksag added the comment: LGTM -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23400 ___ ___

Re: Newbie question about text encoding

2015-03-03 Thread Chris Angelico
On Wed, Mar 4, 2015 at 1:54 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: It is easy to mock what is not important to you. I daresay kids adding emoji to their 10 character tweets would mock all the useless maths symbols in Unicode too. Definitely! Who ever sings do you wanna

[issue23577] Add tests for wsgiref.validate

2015-03-03 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag, pje stage: - patch review type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23577

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
On Tuesday, March 3, 2015 at 10:37:54 PM UTC-5, liuerfire Wang wrote: Is there a file named __init__.py in the modulename dir? Best regards On Wed, Mar 4, 2015 at 11:25 AM, fa...@vt.edu wrote: I have the following directory /home/me/projects/modulename. I

  1   2   >