[issue23440] Extend http.server.SimpleHTTPRequestHandler testing

2015-07-22 Thread Berker Peksag
Berker Peksag added the comment: Thanks Martin and Demian. -- resolution: - fixed stage: commit review - resolved status: open - closed versions: +Python 3.6 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23440

[issue21750] mock_open data is visible only once for the life of the class

2015-07-22 Thread Paul Koning
Paul Koning added the comment: Section 26.7.7 of the library manual describes mock_open with the words: A helper function to create a mock to replace the use of open. It works for open called directly or used as a context manager. which implies that it works just like open. Given that it

Re: Integers with leading zeroes

2015-07-22 Thread Grant Edwards
On 2015-07-22, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Does the same condition hold for strings? If you are not performing string operations on something, it is not a string? If you never need to do any string operations on it then you should not be using a string. -- Grant Edwards

[issue24681] Put most likely test first in set_add_entry()

2015-07-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, my approach is to look at the most important code paths to see if there is any work being done that isn't essential for the result being computed. Next, I look at the generated assembly to estimate speed by counting memory accesses (and whether they

Re: convert output to list(and nested dictionary)

2015-07-22 Thread max scalf
Hi Pablo, While playing around with the function you gave me(get_data)...i was thinking to do something like below. For each line create a dictionary then append that dictionary to a list...but before i even get to that part i get the below error and while researching it i am unable to figure

Re: Integers with leading zeroes

2015-07-22 Thread MRAB
On 2015-07-22 16:50, Grant Edwards wrote: On 2015-07-22, MRAB pyt...@mrabarnett.plus.com wrote: On 2015-07-22 16:27, Antoon Pardon wrote: Does the same condition hold for strings? If you are not performing string operations on something, it is not a string? Tkinter comes to mind. You

Re: Integers with leading zeroes

2015-07-22 Thread Grant Edwards
On 2015-07-22, Steven D'Aprano st...@pearwood.info wrote: On Wed, 22 Jul 2015 11:51 pm, Grant Edwards wrote: On 2015-07-22, Ben Finney ben+pyt...@benfinney.id.au wrote: Laura Creighton l...@openend.se writes: The biggest use I have for decimal numbers that begin with 0 is in credit card

[issue5305] imaplib should support international mailbox names

2015-07-22 Thread Александр Цамутали
Changes by Александр Цамутали asts...@yandex.ru: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5305 ___ ___

[issue9850] obsolete macpath module dangerously broken and should be removed

2015-07-22 Thread Ronald Oussoren
Ronald Oussoren added the comment: I think it is by now safe to remove macpath, AFAIK there is no real use-case anymore for having classic MacOS9 paths on any recentish version of OSX.] I'm setting the version to 3.6 because it is too late to do this for Python 3.5, but it can be done for

[issue23440] Extend http.server.SimpleHTTPRequestHandler testing

2015-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 267ea1731a91 by Berker Peksag in branch '3.5': Issue #23440: Improve http.server.SimpleHTTPRequestHandler tests https://hg.python.org/cpython/rev/267ea1731a91 New changeset 7999671dc991 by Berker Peksag in branch 'default': Issue #23440: Improve

Re: Integers with leading zeroes

2015-07-22 Thread Steven D'Aprano
On Wed, 22 Jul 2015 11:51 pm, Grant Edwards wrote: On 2015-07-22, Ben Finney ben+pyt...@benfinney.id.au wrote: Laura Creighton l...@openend.se writes: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check

Re: Integers with leading zeroes

2015-07-22 Thread Antoon Pardon
On 07/22/2015 11:09 AM, alister wrote: On Wed, 22 Jul 2015 09:12:59 +0200, Laura Creighton wrote: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does this thing have the correct number of

[issue23440] Extend http.server.SimpleHTTPRequestHandler testing

2015-07-22 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- assignee: - berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23440 ___ ___

[issue24503] csv.writer fails when within csv.reader

2015-07-22 Thread Wolfgang E. Sanyer
Wolfgang E. Sanyer added the comment: You can close this - it turns out that I was looping through the input file once first, and did not properly rewind it after doing so. Might it make sense to have the csv module rewind the file after it has been looped through, so that it acts as a

Re: Integers with leading zeroes

2015-07-22 Thread Grant Edwards
On 2015-07-22, MRAB pyt...@mrabarnett.plus.com wrote: On 2015-07-22 16:27, Antoon Pardon wrote: Does the same condition hold for strings? If you are not performing string operations on something, it is not a string? Tkinter comes to mind. You specify how widgets are laid out strings that

Re: Can I copy/paste Python code?

2015-07-22 Thread Grant Edwards
On 2015-07-22, Laura Creighton l...@openend.se wrote: The entire purpose of PDF is to prevent people from changing the format and appearance of documents. My problem isn't that I don't understand this, my problem is that I think this is, in nearly all cases, morally the wrong thing to do. So

Re: Integers with leading zeroes

2015-07-22 Thread MRAB
On 2015-07-22 16:27, Antoon Pardon wrote: On 07/22/2015 11:09 AM, alister wrote: On Wed, 22 Jul 2015 09:12:59 +0200, Laura Creighton wrote: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is

[issue2091] file accepts 'rU+' as a mode

2015-07-22 Thread Robert Collins
Robert Collins added the comment: Updated patch. I'm not going to apply right now - giving it a little time to let folk chime on whether this should be applied all the way back to 3.4, or not. My inclination is to only apply it to 3.6. -- nosy: +rbcollins Added file:

[issue24503] csv.writer fails when within csv.reader

2015-07-22 Thread R. David Murray
R. David Murray added the comment: No, the object is just a wrapper around an iterator. It doesn't know or care that you've passed in a file iterator...it is the file iterator's behavior that is non standard (this has been discussed elsewhere in the tracker, but it is not something that can

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Laura Creighton
One way to look at this is to see that arithmetic is _behaviour_. Like all behaviours, it is subject to reification: see: https://en.wikipedia.org/wiki/Reification and especially as it is done in the German language, reification has this nasty habit of turning behaviours (i.e. things that are

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Steven D'Aprano
On Thu, 23 Jul 2015 02:58 am, Steven D'Aprano wrote: 1. We have reason to expect that the natural numbers are absolutely fundamental and irreducible That's wrong. If we had such a reason, we could state it: the reason we expect natural numbers are irreducible is ... and fill in the blank.

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Rustom Mody
On Wednesday, July 22, 2015 at 11:22:57 PM UTC+5:30, Oscar Benjamin wrote: On Wed, 22 Jul 2015 at 18:01 Steven D'Aprano st...@pearwood.info wrote: I think that the critical factor there is that it is all in the past tense. Today, I believe, the vast majority of mathematicians fall into

[issue16995] Add Base32 support for RFC4648 Extended Hex alphabet (patch attached)

2015-07-22 Thread Matthäus Wander
Matthäus Wander added the comment: I've created a new patch that works against the current 3.5 sources. Should be fine for 3.6, I guess. Separate functions b32hexencode and b32hexdecode are used now. There is no optional parameter base32hex anymore. -- versions: +Python 3.6 -Python

Re: convert output to list(and nested dictionary)

2015-07-22 Thread Peter Otten
max scalf wrote: I was able to solve the above problem i listed with the following...please let me know if that is the correct way of doing this...or i am way off? for sg in sgs: for rule in sg.rules: st = sg, sg.id, inbound:, rule, source:, rule.grants s =

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset b97b6cc381d7 by Robert Collins in branch 'default': Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond. https://hg.python.org/cpython/rev/b97b6cc381d7 -- nosy: +python-dev ___

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread Robert Collins
Robert Collins added the comment: I've applied this to 3.6. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13938 ___ ___

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread R. David Murray
R. David Murray added the comment: Looking at the audit log its not clear to me which versions Benjamin wanted this applied to, though it looks like 2.7 at least. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

Re: Can I copy/paste Python code?

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 14:53:42 -, Grant Edwards writes: On 2015-07-22, Laura Creighton l...@openend.se wrote: The entire purpose of PDF is to prevent people from changing the format and appearance of documents. My problem isn't that I don't understand this, my problem is that I

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Rustom Mody
Nice Thanks for that Laura! I am reminded of | The toughest job Indians ever had was explaining to the whiteman who their | noun-god is. Repeat. That's because God isn't a noun in Native America. | God is a verb! From http://hilgart.org/enformy/dma-god.htm On Wednesday, July 22, 2015 at

[issue24651] Mock.assert* API is in user namespace

2015-07-22 Thread Carl Meyer
Carl Meyer added the comment: FWIW, my assumption was that the typical usage pattern would be `import mock` rather than separate imports of all the assertions, so I don't think there'd really be an increase in what users need to know about or import. (They already need to know about the

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 10:49:13 -0700, Rustom Mody writes: Nice Thanks for that Laura! I am reminded of | The toughest job Indians ever had was explaining to the whiteman who their | noun-god is. Repeat. That's because God isn't a noun in Native America. | God is a verb! From

Re: convert output to list(and nested dictionary)

2015-07-22 Thread max scalf
I was able to solve the above problem i listed with the following...please let me know if that is the correct way of doing this...or i am way off? for sg in sgs: for rule in sg.rules: st = sg, sg.id, inbound:, rule, source:, rule.grants s = str(st).replace(,, )

[issue24686] zipfile is intolerant of extra bytes

2015-07-22 Thread Devin Fisher
New submission from Devin Fisher: Not sure if this is a bug. The attached jar file is malformed. Unzip (6.00) says the following about the malformedness of the jar file: unzip -tqq bad.jar com/pixelmed/apps/DoseUtility$OurSourceDatabaseTreeBrowser$1.class bad extra-field entry: EF

[issue24685] collections.OrderedDict collaborative subclassing

2015-07-22 Thread Eric Frederich
New submission from Eric Frederich: After watching the PyCon talk Super considered super[1] and reading the corresponding blog post[2] I tried playing with dependency injection. I was surprised to notice that the example he gave did not work if I swap the order of the classes around. I think

[issue24681] Put most likely test first in set_add_entry()

2015-07-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: you have to provide a benchmark Actually, I don't. When making a small series of changes, benchmarking every step is waste of time and tends to trap you in local minimums and causes you to overfit to a particular processor, compiler, or benchmark. The

OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Steven D'Aprano
On Wed, 22 Jul 2015 11:34 pm, Rustom Mody wrote: On Tuesday, July 21, 2015 at 4:09:56 PM UTC+5:30, Steven D'Aprano wrote: We have no reason to expect that the natural numbers are anything less than absolutely fundamental and irreducible (as the Wikipedia article above puts it). It's

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Paul Rubin
Steven D'Aprano st...@pearwood.info writes: That's wrong. If we had such a reason, we could state it: the reason we expect natural numbers are irreducible is ... and fill in the blank. But I don't believe that such a reason exists (or at least, as far as we know). However, neither do we have

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Oscar Benjamin
On Wed, 22 Jul 2015 at 18:01 Steven D'Aprano st...@pearwood.info wrote: I think that the critical factor there is that it is all in the past tense. Today, I believe, the vast majority of mathematicians fall into two camps: (1) Those who just use numbers without worrying about defining them

[issue22153] Documentation of TestCase.runTest is incorrect and confusing

2015-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset eefc157b3096 by Robert Collins in branch '3.4': Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero. https://hg.python.org/cpython/rev/eefc157b3096 New changeset 10f5a7fa26d5 by Robert Collins in branch '3.5': Issue #22153:

[issue24681] Put most likely test first in set_add_entry()

2015-07-22 Thread Eric Snow
Eric Snow added the comment: Thanks for the clear explanation, Raymond. The approach you've described is useful in a number of circumstances. Would you mind publishing (somewhere outside the tracker; devguide?) the specific steps you take and the tools you use? -- nosy: +eric.snow

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce34c78ebf65 by Robert Collins in branch '2.7': Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond. https://hg.python.org/cpython/rev/ce34c78ebf65 -- ___ Python tracker

Re: Can I copy/paste Python code?

2015-07-22 Thread Grant Edwards
On 2015-07-22, Emile van Sebille em...@fenx.com wrote: On 7/21/2015 5:10 PM, Grant Edwards wrote: On 2015-07-21, Emile van Sebille em...@fenx.com wrote: On 7/21/2015 2:47 PM, Grant Edwards wrote: 1) You can't copy/paste text from evince _at_all_. Hmm, i just copied Acorsa Artichoke Heart

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread Robert Collins
Robert Collins added the comment: So, I don't think I've ever done 2.x stuff with hg here, I'll leave this open till I've looked up the docs and applied it safely. ... unless you'd like to do the 2.7 application ? :) -- ___ Python tracker

[issue22153] Documentation of TestCase.runTest is incorrect and confusing

2015-07-22 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - fixed stage: commit review - resolved status: open - closed versions: +Python 3.6 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22153

[issue13938] 2to3 fails to convert types.StringTypes appropriately

2015-07-22 Thread R. David Murray
R. David Murray added the comment: Well, it's a patch to 2to3, which I'm assuming is sometimes (often?) run using 2.7 to convert code to run under python3. I personally don't use transplant in cases like this, I just apply the patch independently to the 2.7 branch. That may just be because

[issue9232] Allow trailing comma in any function argument list.

2015-07-22 Thread Robert Collins
Robert Collins added the comment: FWIW I would like to see this, but I think it does need a PEP given the contention so far. For that, we need a BDFL delegate AIUI. -- nosy: +rbcollins versions: +Python 3.6 -Python 3.5 ___ Python tracker

Re: Encoding of Python 2 string literals

2015-07-22 Thread Mark Lawrence
On 22/07/2015 11:17, anatoly techtonik wrote: Hi, Is there a way to know encoding of string (bytes) literal defined in source file? For example, given that source: # -*- coding: utf-8 -*- from library import Entry Entry(текст) Is there any way for Entry() constructor to know

Re: Can I copy/paste Python code?

2015-07-22 Thread Emile van Sebille
On 7/21/2015 5:10 PM, Grant Edwards wrote: On 2015-07-21, Emile van Sebille em...@fenx.com wrote: On 7/21/2015 2:47 PM, Grant Edwards wrote: 1) You can't copy/paste text from evince _at_all_. Hmm, i just copied Acorsa Artichoke Heart - Quarter, Water, Can from a catalog pdf, so _at_all_

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Rustom Mody
On Wednesday, July 22, 2015 at 11:18:23 PM UTC+5:30, Paul Rubin wrote: Remember also that in ultrafinitism, Peano Arithmetic goes from 1 to 88 (due to Shachaf on irc #haskell). ;-) No No No Its 42; Dont you know? -- https://mail.python.org/mailman/listinfo/python-list

[issue20337] bdist_rpm should support %config(noreplace)

2015-07-22 Thread Alexandr Normuradov
Changes by Alexandr Normuradov anormura...@isilon.com: -- nosy: +anormuradov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20337 ___ ___

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-22 Thread Eric Snow
Eric Snow added the comment: That worked. I'll take a close look at what's going on as soon as I can. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24667 ___

Re: Can I copy/paste Python code?

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 10:45:29 +1000, Steven D'Aprano writes: On Wed, 22 Jul 2015 03:25 am, Laura Creighton wrote: Lots of the problems are with the free reader, adobe acrobat. It is designed so that the user is kept very much in a straight-jacket which is a problem when your Mum

[issue24684] Type confusion in socket module

2015-07-22 Thread paul
New submission from paul: eck(idna)); # (gdb) # # Program received signal SIGABRT, Aborted. # 0xb77a6d4c in __kernel_vsyscall () # # host argument can be set to a subclass of unicode with a custom encode # method. encode returns unexpected type. assert is not compiled in release # mode, so

Re: Is there a way to install ALL Python packages?

2015-07-22 Thread Laura Creighton
In a message of Tue, 21 Jul 2015 19:58:31 -0700, ryguy7272 writes: Thanks for the tip. I just downloaded and installed Anaconda. I just successfully ran my first Python script. So, so happy now. Thanks again!! Congratulations! Keep on going! :) Laura --

[issue24683] Type confusion in json encoding

2015-07-22 Thread STINNER Victor
STINNER Victor added the comment: I don't understand the issue. Can you elaborate? What is your code? What is the current result? What is the expected result? What is your platform? What is your Python version? etc. -- nosy: +haypo ___ Python

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
I wonder if bitcoin miners and other cryptological users need the leading 0s. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Can I copy/paste Python code?

2015-07-22 Thread Mark Lawrence
On 21/07/2015 18:25, Laura Creighton wrote: In a message of Wed, 22 Jul 2015 00:48:06 +1000, Chris Angelico writes: Actually, maybe don't use PDF at all. I keep having to help my Mum deal with stupid problems with PDF documents she gets, and I'm never sure whether the fault is with the PDF

Re: Can I copy/paste Python code?

2015-07-22 Thread Jussi Piitulainen
Chris Angelico writes: I use Evince on Debian, where it came prepackaged with my Xfce desktop. It identifies itself as GNOME Document Viewer 3.14.1, leaving me wondering if the next version would be 3.14.12 in Knuth-style numbering, but that's beside the point. Copying and The next digit of

[issue24683] Type confusion in json encoding

2015-07-22 Thread paul
paul added the comment: Sorry, I uploaded a test case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24683 ___ ___ Python-bugs-list mailing

[issue24684] socket.getaddrinfo(host) doesn't ensure that host.encode() returns a byte string

2015-07-22 Thread paul
paul added the comment: @haypo: I'd be happy to implement all my fuzzer ideas if my bugs were patched in a timely manner. At this moment I have multiple bugs submitted over 2 months ago, which still aren't patched. Without patches, hackerone won't accept these issues, so my incentive to work

[issue24684] socket.getaddrinfo(host) doesn't ensure that host.encode() returns a byte string

2015-07-22 Thread STINNER Victor
STINNER Victor added the comment: 5513idna = _PyObject_CallMethodId(hobj, PyId_encode, s, idna); 5514if (!idna) 5515return NULL; 5516assert(PyBytes_Check(idna)); The assertion fails because the custom string type in poc_getaddr.py returns an

Re: Integers with leading zeroes

2015-07-22 Thread alister
On Wed, 22 Jul 2015 09:12:59 +0200, Laura Creighton wrote: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does this thing have the correct number of digits'. So far, all the examples I've

[issue24682] Add Quick Start: Communications section to devguide

2015-07-22 Thread Ezio Melotti
Ezio Melotti added the comment: I would also like to see a short section (perhaps in the form of a FAQ) that could be linked whenever someone asks for Python help on python-dev/python-ideas, or proposes an idea on python-dev, or misuses the lists in a similar fashion. These could then be

[issue24684] socket.getaddrinfo(host) doesn't ensure that host.encode() returns a byte string

2015-07-22 Thread STINNER Victor
STINNER Victor added the comment: @paul: are you fuzzing Python? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24684 ___ ___ Python-bugs-list

[issue24681] Put most likely test first in set_add_entry()

2015-07-22 Thread STINNER Victor
STINNER Victor added the comment: Since it looks like an optimization, can you please provide a benchmark? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24681 ___

Re: Integers with leading zeroes

2015-07-22 Thread Ben Finney
Laura Creighton l...@openend.se writes: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does this thing have the correct number of digits'. The following are examples of types from the real

Re: Should non-security 2.7 bugs be fixed?

2015-07-22 Thread Terry Reedy
On 7/21/2015 10:07 PM, Rick Johnson wrote: two possibilities exist: (a) Mark is a core dev who has committed patches and is a bully. (b) Mark is not a core dev, and therefor can not commit anything, therefor he's a bully *AND* a hypocrite! Which is it? Mark is not a core dev,

[issue24683] Type confusion in json encoding

2015-07-22 Thread paul
New submission from paul: on-35dm-i386-linux-gnu.so`encoder_listencode_list(s=0xb6f90394, acc=0xbfc42c28, seq=0xb6f2361c, indent_level=1) + 655 at _json.c:1800 # frame #2: 0xb6e4366d _json.cpython-35dm-i386-linux-gnu.so`encoder_listencode_obj(s=0xb6f90394, acc=0xbfc42c28, obj=0xb6f2361c,

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does this thing have the correct number of digits'. So far, all the examples I've been able to find in my code -- which does this sort of stuff a

[issue23883] __all__ lists are incomplete

2015-07-22 Thread Berker Peksag
Berker Peksag added the comment: Thank you all for your work and apologies for my lack of response. I'm +1 on adding a check__all__ helper to test.support. But passing self to it feels a bit weird. Perhaps the assertCountEqual part could be moved outside of the helper. If Serhiy(and/or other

[issue24651] Mock.assert* API is in user namespace

2015-07-22 Thread Michael Foord
Michael Foord added the comment: I'm not wild about this idea. The problem with the assert methods has *essentially* been solved now, so I'm not convinced of the need for this change (unless users really *need* to have their own mocked attributes like assert_called_with which I think is

Re: Integers with leading zeroes

2015-07-22 Thread Marko Rauhamaa
Laura Creighton l...@openend.se: What I want to know is why is 'huoneen numero' 2 words? rummets nummer Marko -- https://mail.python.org/mailman/listinfo/python-list

[issue24681] Put most likely test first in set_add_entry()

2015-07-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: You can benchmark if you want. I'm looking for a second pair of eyes to validate the correctness. My goal is to put the tests and assignments in the most logical order. -- ___ Python tracker

Re: Integers with leading zeroes

2015-07-22 Thread Marko Rauhamaa
Ben Finney ben+pyt...@benfinney.id.au: Despite that they are represented in text with digits, and the authority that generates them may even use some sequence of integers, the types should not be treated as numbers. Let's just say that the word number has multiple meanings. Words with many

Re: Integers with leading zeroes

2015-07-22 Thread Laura Creighton
In a message of Wed, 22 Jul 2015 12:10:55 +0300, Marko Rauhamaa writes: My native Finnish luckily has distinct words for the two things: luku (a quantity) and numero (a digit, numeral or label): luonnollinen luku (natural number) kokonaisluku (integer) rationaaliluku(rational

[issue24619] async/await parser issues

2015-07-22 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24619 ___ ___

[issue24619] async/await parser issues

2015-07-22 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24619 ___ ___

[issue24683] Type confusion in json encoding

2015-07-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka components: +Extension Modules nosy: +serhiy.storchaka stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24683

Re: Integers with leading zeroes

2015-07-22 Thread INADA Naoki
Permitting leading 0s may make it harder to port Python 2 projects to Python 3. 010 == 8 (Python 2) 010 == 10 (Python 3.x) SyntaxError is very important for porting code. So I'm -1 on permitting leading 0s for decimal numbers. I think original question is for leading 0s for only 0. Not for

[issue24619] async/await parser issues

2015-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9da080ecadb2 by Yury Selivanov in branch '3.5': Issue #24619: New approach for tokenizing async/await. https://hg.python.org/cpython/rev/9da080ecadb2 New changeset 987b72921a0c by Yury Selivanov in branch 'default': Merge 3.5 (Issue #24619)

[issue23883] __all__ lists are incomplete

2015-07-22 Thread Jacek Kołodziej
Changes by Jacek Kołodziej kolodzi...@gmail.com: Added file: http://bugs.python.org/file39976/Issue23883_support_check__all__.v5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23883 ___

[issue23883] __all__ lists are incomplete

2015-07-22 Thread Jacek Kołodziej
Jacek Kołodziej added the comment: raiseExecptions typo: Might be best to get the typo fixed first (maybe open a separate issue, since it should probably be fixed starting from the 3.4 branch). Done in #24678 and commited in 83b45ea19d00 . Regarding OpcodeInfo, it is probably up to your

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-22 Thread Fabian
Fabian added the comment: Oh sorry, I basically never need to install pywikibot anew so it's easy to forget but there is a submodule in scripts/i18n which needs to be cloned as well. With the following commands I could reproduce the error (and you don't even need to install requests and six):

[issue24619] async/await parser issues

2015-07-22 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks Nick! I've committed the patch with a few more unittests and a couple of additional comments in tokenizer.(c|h). -- resolution: - fixed ___ Python tracker rep...@bugs.python.org

[issue22140] python-config --includes returns a wrong path (double prefix)

2015-07-22 Thread Romain Dossin
Romain Dossin added the comment: I stumbled across the exact same problem and I have made a fix that is working, at least for the usage I have... -- nosy: +rdossin Added file: http://bugs.python.org/file39978/patch_python_sym_links.txt ___ Python

[ANN] metamodule v1.0 released

2015-07-22 Thread Nathaniel Smith
Hi all, I'm pleased to announce the first release of 'metamodule', a new package that allows you to safely and easily hook attribute access on your package's module object (among other things). So for example, you can easily set it up so that a submodule in your package is lazily loaded the first

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-22 Thread Ronald Oussoren
Ronald Oussoren added the comment: The attached program (which is pure C except for a call to NSLog) calls SecTrustCopyAnchorCertificates in a child process (and with a minor change the other function as well). This doesn't crash for me. However, that doesn't really mean anything: We know

[issue24682] Add Quick Start: Communications section to devguide

2015-07-22 Thread Carol Willing
Carol Willing added the comment: Ezio, thanks for the suggestions :D To clarify, the new Quick Start will be: - brief; - contain links to additional communication/community interaction info in the devguide; - guide a new contributor (or remind others) to information about ways to

[issue24681] Put most likely test first in set_add_entry()

2015-07-22 Thread R. David Murray
R. David Murray added the comment: Victor, I'm hearing Raymond say that it isn't really about optimization, but about the logical organization of the code. I think making things more *complicated* requires a benchmark justification, but it doesn't look to me like this change makes things

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-07-22 Thread Cyd Haselton
Cyd Haselton added the comment: UPDATE: Build environment is up and running; cloning repo now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___

Re: Integers with leading zeroes

2015-07-22 Thread Grant Edwards
On 2015-07-22, Ben Finney ben+pyt...@benfinney.id.au wrote: Laura Creighton l...@openend.se writes: The biggest use I have for decimal numbers that begin with 0 is in credit card numbers, account numbers and the like where the first check you do is 'does this thing have the correct number of

[issue24681] Put most likely test first in set_add_entry()

2015-07-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch changes behavior. With the patch it would be possible that after successful set.add(), the item will be not contained in the set. And this behavior is not consistent with dict behavior. -- ___ Python

Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-07-22 Thread Rustom Mody
On Tuesday, July 21, 2015 at 4:09:56 PM UTC+5:30, Steven D'Aprano wrote: We have no reason to expect that the natural numbers are anything less than absolutely fundamental and irreducible (as the Wikipedia article above puts it). It's remarkable that we can reduce all of mathematics to

Re: Can I copy/paste Python code?

2015-07-22 Thread Grant Edwards
On 2015-07-22, Laura Creighton l...@openend.se wrote: She's absolutely stuck with the font choices somebody else made for everybody, Once again, that is the whole _point_ of PDF. and they aren't right for her. And this is way it is with the bulk of problems I end up having to deal with

Re: Can I copy/paste Python code?

2015-07-22 Thread Chris Angelico
On Wed, Jul 22, 2015 at 5:55 PM, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: Chris Angelico writes: I use Evince on Debian, where it came prepackaged with my Xfce desktop. It identifies itself as GNOME Document Viewer 3.14.1, leaving me wondering if the next version would be 3.14.12 in

[issue24683] Type confusion in json encoding

2015-07-22 Thread paul
Changes by paul paw...@gmail.com: Added file: http://bugs.python.org/file39975/json_markers.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24683 ___ ___

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-07-22 Thread Fabian
Fabian added the comment: Just as a note to the tests: You may not get the issues with OrderedDict as a failure/error at the end of the test suite. And you may (depending on the version) get a few errors because NoUsername was raised. That is unrelated to this issue and can be fixed by using

Encoding of Python 2 string literals

2015-07-22 Thread anatoly techtonik
Hi, Is there a way to know encoding of string (bytes) literal defined in source file? For example, given that source: # -*- coding: utf-8 -*- from library import Entry Entry(текст) Is there any way for Entry() constructor to know that string текст passed into it is the utf-8 string?

[issue24683] Type confusion in json encoding

2015-07-22 Thread Ronald Oussoren
Ronald Oussoren added the comment: In encoder_init (the __init__ for _json.Encoder) s-marker is set to an argument of __init__, without any kind of type check, it can therefore be an arbitrary object. encoder_listencode_obj (and other functions) then use s-markers with the concrete API for

Re: Encoding of Python 2 string literals

2015-07-22 Thread Chris Angelico
On Wed, Jul 22, 2015 at 8:17 PM, anatoly techtonik techto...@gmail.com wrote: Is there a way to know encoding of string (bytes) literal defined in source file? For example, given that source: # -*- coding: utf-8 -*- from library import Entry Entry(текст) Is there any way for

  1   2   >