IndexError: list index out of range

2016-12-12 Thread Elnaz
hi i am begginer in python. I have written a code and given this error: IndexError: list index out of range In my program, I have h=32 bits input. i divide this 32 bits to 4*8 block and every 8-block is n. so n=0:7;(h=int(n/4)) I want to rotate 0 to 7 bits for 2 bits:

[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, it was a remnants of backporting to 3.5. Commented-out lines are used in 3.6. The line above these lines was used in 3.5. Test is passed with both variants. I commented out the 3.6 variant, but forgot to remove it (or remove old 3.5 variant and keep 3.6

Nested functions, how do they work (stack related)

2016-12-12 Thread Veek M
I was reading the wiki on 'Call stack' because I wanted to understand what a traceback object was. My C/C++ isn't good enough to deal with raw python source since I have no background in CS. Also, you just can't dive into the python src - it takes a good deal of reading and background.. (the

[issue28948] Facing issue while running Python 3.6.0rc1 windows x86-64 web based installer

2016-12-12 Thread arpit arora
arpit arora added the comment: Hi Steve, I only installed the mentioned version and if there is any update for the same then i may not be aware of that. Thanks & Regards Arpit Arora -- ___ Python tracker

[issue28958] Python should return comperhansive error when SSLContext cannot be created

2016-12-12 Thread Ilya Kulakov
New submission from Ilya Kulakov: When SSLContext cannot be created, python raises an SSLError exception with "failed to allocate SSL context". https://hg.python.org/cpython/file/4def2a2901a5/Modules/_ssl.c#l2260 This is completely useless to debug the error. In fact many errors raised from

[issue26110] Speedup method calls 1.2x

2016-12-12 Thread INADA Naoki
INADA Naoki added the comment: > Technically the patch LGTM. But we should find the cause of the regression in > some benchmarks. The benchmark is on Sandy Bridge (Core i5 2400) and I didn't use PGO build. perf_event reported branch-miss rate increase at cpickle's save function. I'll rerun

Re: Method to know if object support being weakreferenced ?

2016-12-12 Thread Gregory Ewing
Matthias Bussonnier wrote: I search for a method capable of telling me whether an object can be weakreferenced. Objects that can be weakly referenced have a __weakref__ attribute. So you could use hasattr(obj, '__weakref__'). -- Greg -- https://mail.python.org/mailman/listinfo/python-list

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Julien Palard
Julien Palard added the comment: Hi Larry, Do you mean a new converter in clinic.py like Nullable_Py_ssizze_t, or a converter that I copy/paste every time I need it like http://bugs.python.org/review/28754/patch/19417/76440 ? -- ___ Python tracker

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Gregory Ewing
Ned Batchelder wrote: if a C++ constructor raises an exception, will the corresponding destructor be run, or not? (No, because it never finished making an object of type T.) So it just leaks any memory that's been allocated by the partially-run constructor? -- Greg --

[issue26110] Speedup method calls 1.2x

2016-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Technically the patch LGTM. But we should find the cause of the regression in some benchmarks. And would be nice to extend the optimization to C functions. In any case this optimization is worth mentioning in What's New. --

[issue28957] undefined symbol: PyUnicodeUCS2_FromUnicode when executing any command with pip2.7

2016-12-12 Thread Ramakrishna Kommineni
New submission from Ramakrishna Kommineni: Hi, I have installed python from source in the directory /home/rkommine/software/python2.7. During installation there are no errors seen. I have added the below environment variables to my bashrc export

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Chris Angelico
On Tue, Dec 13, 2016 at 4:45 PM, Steven D'Aprano wrote: > I don't understand the point of bringing up Javascript. Ben has already said > that we shouldn't feel the need to mindlessly copy C++ terminology. Is it your > position that we *should* copy Javascript

Re: Method to know if object support being weakreferenced ?

2016-12-12 Thread Steven D'Aprano
On Tuesday 13 December 2016 15:57, Matthias Bussonnier wrote: [...] > I could of course write a function that try/except and return False/True > depending on the result, but that seem suboptimal as how can I know that the > TypeError does come from not being able to take a weak reference ? And

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Steven D'Aprano
On Tuesday 13 December 2016 10:23, Chris Angelico wrote: > On Tue, Dec 13, 2016 at 10:17 AM, Ben Finney > wrote: >> If the differences didn't matter I would agree that “overly pedantic” is >> fair. But those differences trip up newcomers. Thinking of >> ‘Foo.__init__’

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Steven D'Aprano
On Tuesday 13 December 2016 12:12, Ned Batchelder wrote: > On Monday, December 12, 2016 at 6:17:43 PM UTC-5, Ben Finney wrote: >> Ned Batchelder writes: >> >> > Claiming that __init__ isn't a constructor seems overly pedantic to >> > me. >> >> Whereas to me, claiming

Method to know if object support being weakreferenced ?

2016-12-12 Thread Matthias Bussonnier
Hi all, I was recently had to use weakreferences, using the weakref module, and came across the fact that some object cannot be weakreferenced. If you try to do so you get greated by a TypeError, which is a totally expected and documented behavior. As I tend to prefer the "Look before you

[issue25458] ftplib: command response shift - mismatch

2016-12-12 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: I tried to fix `urllib' and ultimately failed. In a nutshell, handling of the aftermath of an `ntransfercmd' is broken. Since `ntransfercmd'/`transfercmd' returns a socket, handling of an end-of-transmission response is done in independently invoked code - upon

[issue28091] Document PEP 525

2016-12-12 Thread Eric Appelt
Eric Appelt added the comment: I believe that I addressed all the comments in the previous review (although its always possible I missed something), and have a new patch with the improvements and fixes. I also noticed that in asyncio, loop.shutdown_asyncgens() is a coroutinemethod and fixed

[issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError

2016-12-12 Thread Srikanth Anantharam
New submission from Srikanth Anantharam: return minimum of modes for a multimodal distribution instead of raising a StatisticsError -- components: Library (Lib) messages: 283071 nosy: Srikanth Anantharam priority: normal pull_requests: 3 severity: normal status: open title: return

[issue28955] Not matched behavior of numeric comparison with the documentation

2016-12-12 Thread woo yoo
woo yoo added the comment: Maybe the description should be changed into "all order comparisons of not-a-number and any number will return False" -- ___ Python tracker

[issue28955] Not matched behavior of numeric comparison with the documentation

2016-12-12 Thread woo yoo
New submission from woo yoo: According to the documentation, which said "Additionally, comparing any number to a not-a-number value will return False. ",the comparison of `float('nan')!= 1`should yield False, while the result is True. Small errors like this in documentation should be

[issue20754] Distribution.parse_config_files uses interpolation since Python 3

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: I forget if there was a reason for choosing RawConfigParser over ConfigParaer with interpolation=None. I'd like to know that before choosing the latter. I'd also like to see if appropriate the implementation patched in Setuptools, providing compatibility for

[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- versions: +Python 2.7 Added file: http://bugs.python.org/file45867/test-command-line-j0-with-test.patch ___ Python tracker

[issue26110] Speedup method calls 1.2x

2016-12-12 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file45866/call_method_5.patch ___ Python tracker ___

[issue28954] Incorrect EBNF rule of keywords_arguments

2016-12-12 Thread woo yoo
New submission from woo yoo: This is the documented rule, which lacks a comma within the last line. keywords_arguments ::= (keyword_item | "**" expression) ("," keyword_item | "**" expression)* The correct form should be: keywords_arguments ::= (keyword_item |

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Ned Batchelder
On Monday, December 12, 2016 at 6:17:43 PM UTC-5, Ben Finney wrote: > Ned Batchelder writes: > > > Claiming that __init__ isn't a constructor seems overly pedantic to > > me. > > Whereas to me, claiming that ‘Foo.__init__’ is a constructor seems > needlessly confusing. >

Re: Python constructors have particular semantics, and ‘Foo.__init__’ doesn't qualify (was: The right way to 'call' a class attribute inside the same class)

2016-12-12 Thread Juan C.
I agree with you, I'll post here the same thing I said in there for another member: On Mon, Dec 12, 2016 at 6:59 PM, Thomas 'PointedEars' Lahn wrote: > > Using the Python official doc

[issue28944] A lack of line 6

2016-12-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: You're reusing the same issue for completely different things. Make a separate issue for separate docs issues. -- nosy: +josh.r ___ Python tracker

[issue26876] Extend MSVCCompiler class to respect environment variables

2016-12-12 Thread Steve Dower
Steve Dower added the comment: I'd rather only take the change to _msvccompiler and not the ones that are there for historical interest (a.k.a. backwards compatibility with people who never expect internal implementation details to change). If any tools break because they're using the wrong

Python constructors have particular semantics, and ‘Foo.__init__’ doesn't qualify (was: The right way to 'call' a class attribute inside the same class)

2016-12-12 Thread Ben Finney
Chris Angelico writes: > On Tue, Dec 13, 2016 at 10:17 AM, Ben Finney > wrote: > > If the differences didn't matter I would agree that “overly > > pedantic” is fair. But those differences trip up newcomers. Thinking > > of ‘Foo.__init__’ leads

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Chris Angelico
On Tue, Dec 13, 2016 at 10:17 AM, Ben Finney wrote: > If the differences didn't matter I would agree that “overly pedantic” is > fair. But those differences trip up newcomers. Thinking of > ‘Foo.__init__’ leads people to wonder where the ‘self’ attribute came > from –

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Ben Finney
Ned Batchelder writes: > Claiming that __init__ isn't a constructor seems overly pedantic to > me. Whereas to me, claiming that ‘Foo.__init__’ is a constructor seems needlessly confusing. * Classes already have a constructor, ‘Foo.__new__’. If we call something else

[issue28923] Nonexisting encoding specified in Tix.py

2016-12-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am a little puzzled as to how a file rename changed the content, but the annotation history seems to show that. Anyway, ... When I load the file in IDLE 2.7, I get a warning. I am a bit surprised as this is not a proper encoding declaration. IDLE's re

[issue28949] Stdlib modules disappear from file system

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've reinstalled Dropbox, downgrading to 15.4.22. I'll see if that helps. -- ___ Python tracker ___

[issue28949] Stdlib modules disappear from file system

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: I don't think hard links are involved. I see symlinks in the .tox/python virutalenv, and virtualenv defaults to creating symlinks (https://github.com/pypa/virtualenv/blob/master/virtualenv.py#L565-L570) and falls back to copying files rather than hard

[issue28949] Stdlib modules disappear from file system

2016-12-12 Thread Ned Deily
Ned Deily added the comment: That's sounding better, thanks. Out of curiosity, are there hard links involved? -- ___ Python tracker ___

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Larry Hastings
Larry Hastings added the comment: I don't want this change committed to CPython, you can do what you need with a converter so do that. -- ___ Python tracker

[issue28091] Document PEP 525

2016-12-12 Thread Eric Appelt
Eric Appelt added the comment: Yes - I'll work on the patch tonight. -- ___ Python tracker ___ ___

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Steve D'Aprano
On Tue, 13 Dec 2016 07:15 am, Ned Batchelder wrote: > Claiming that __init__ isn't a constructor seems overly pedantic to me. > What's true is that Python's constructors (__init__) are different than > C++ constructors. In C++, you don't have an object of type T until the > constructor has

[issue28949] Stdlib modules disappear from file system

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've just encountered what appears to be a different manifestation of the same issue. I unlinked the .tox directory and that rendered importlib broken. $ pwd /Users/jaraco/yg/queso $ rm -R .tox $ python Python 3.6.0rc1 (v3.6.0rc1:29a273eee9a5, Dec 6 2016,

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Juan C.
On Mon, Dec 12, 2016 at 6:59 PM, Thomas 'PointedEars' Lahn wrote: > Using the Python official doc link you provided, it clearly states that `__new__` is the one called to "create a new

[issue28949] Unable to launch Python interpreter

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: Before disabling SIP, I found I could use fs_usage to get some visibility into fs changes: sudo fs_usage -w -f filesys | grep aliases.py To test my understanding of fs_usage, I deleted aliases.py (also confirming that triggers the error). When I did so, I

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Ned Batchelder
On Monday, December 12, 2016 at 4:31:00 PM UTC-5, Gregory Ewing wrote: > Ned Batchelder wrote: > > In C++, you don't have an object of type T until the > > constructor has finished. In Python, you have an object of type T before > > __init__ has been entered. > > That distinction seems a bit

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: First, it looks weird if the default value affects accepted types. Second, how many use cases for your converter besides the bisect module? -- ___ Python tracker

[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-12 Thread Berker Peksag
Berker Peksag added the comment: Hi Serhiy, there are two commented-out lines in https://hg.python.org/cpython/rev/ea1c49ea8136#l3.10 (only in 3.5) +#with self.assertRaises(AssertionError): +#support.check_syntax_error(self, "x=1") -- nosy: +berker.peksag

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Steve D'Aprano
On Tue, 13 Dec 2016 03:17 am, Chris Angelico wrote: > You could check "foo" in self.__dict__, but I don't know of any > real-world situations where you need to. vars(self) is probably the better way to access self's namespace, rather than directly self.__dict__. Unfortunately vars() doesn't

[issue28089] asyncio: Document that TCP_NODELAY is now used by default

2016-12-12 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury, look good to you? Yes; committed the patch with a small addition. Thanks, Mariatta! -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue28089] asyncio: Document that TCP_NODELAY is now used by default

2016-12-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 853e3f4d6cd9 by Yury Selivanov in branch '3.6': Issue #28089: Document TCP_NODELAY in asyncio https://hg.python.org/cpython/rev/853e3f4d6cd9 New changeset 0d209cc7ffdc by Yury Selivanov in branch 'default': Merge 3.6 (issue #28089)

[issue28953] Use `raise from` when raising new IncompleteRead

2016-12-12 Thread Ram Rachum
Changes by Ram Rachum : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue28953] Use `raise from` when raising new IncompleteRead

2016-12-12 Thread Ram Rachum
New submission from Ram Rachum: I had this error come up in my code, and because it doesn't use `raise ... from` I thought that the second error was unexpected, while in fact it wasn't. This patch should fix that. -- components: Library (Lib) files: 1.patch keywords: patch messages:

[issue28919] Simplify `_copy_func_details` in unittest.mock

2016-12-12 Thread Michael Foord
Michael Foord added the comment: Yep, looks good to me to. -- ___ Python tracker ___ ___ Python-bugs-list

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Gregory Ewing
Ned Batchelder wrote: In C++, you don't have an object of type T until the constructor has finished. In Python, you have an object of type T before __init__ has been entered. That distinction seems a bit pedantic as well. Inside a C++ constructor you have access to something having all the

[issue28932] Fail compile Python 3.6.0rc1 on OpenBSD 6.0

2016-12-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +haypo stage: -> patch review versions: +Python 3.7 ___ Python tracker ___

[issue28089] asyncio: Document that TCP_NODELAY is now used by default

2016-12-12 Thread Ned Deily
Ned Deily added the comment: Yury, look good to you? -- stage: patch review -> commit review versions: +Python 3.7 ___ Python tracker ___

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Julien Palard
Julien Palard added the comment: > for just one use case I don't think that using None in a default argument is "one use case", nor a "special case" it's more like a "widly used pattern" that I'd like to make simple to implement (also see http://bugs.python.org/issue28754#msg282891). I'm not

[issue28923] Nonexisting encoding specified in Tix.py

2016-12-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +serhiy.storchaka, terry.reedy stage: -> patch review type: compile error -> behavior ___ Python tracker

[issue28949] Unable to launch Python interpreter

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: Looks like I can [disable SIP](http://internals.exposed/blog/dtrace-vs-sip.html) and dtrace will be viable. -- ___ Python tracker

[issue28949] Unable to launch Python interpreter

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: I thought I was on to something when I found this technique for using dtrace to detect a file deletion: https://blogs.oracle.com/zoneszone/entry/who_keeps_removing_that_file However, I don't seem to have privilege to run it. $ cat trap-aliases-delete #!

[issue28919] Simplify `_copy_func_details` in unittest.mock

2016-12-12 Thread Berker Peksag
New submission from Berker Peksag: Thanks for the patch. I only did a quick review, but it looks good to me. -- nosy: +berker.peksag, michael.foord stage: -> patch review ___ Python tracker

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Thomas 'PointedEars' Lahn
Juan C. wrote: > On Mon, Dec 12, 2016 at 12:34 PM, Thomas 'PointedEars' Lahn > wrote: >> To call something means generally in programming, and in Python, to >> execute it as a function instead: In the code above, the class object >> referred to by “Box” is called twice in

[issue28949] Unable to launch Python interpreter

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: I am using the python.org rc1 installer, confirmed to match the public md5 sum: $ md5 ~/Downloads/python-3.6.0rc1-macosx10.6.pkg MD5 (/Users/jaraco/Downloads/python-3.6.0rc1-macosx10.6.pkg) = 404c390ae27f067aaab34f168cf913eb I downloaded ClamXav and had it

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Ned Batchelder
On Monday, December 12, 2016 at 12:58:30 PM UTC-5, Juan C. wrote: > Since we are talking about Python terminology I believe that calling > `__init__` a constructor is also wrong. I've already seem some > discussions regarding it and the general consensus is that `__init__` > shouldn't be called

[issue28845] Clean up known issues for AIX

2016-12-12 Thread Julien Palard
Julien Palard added the comment: LGTM but no AIX to test it. -- ___ Python tracker ___ ___ Python-bugs-list

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agreed with Larry. "Special cases aren't special enough to break the rules." General converter shouldn't be changed for just one use case. Write your own special converter. Or just use the "O" converter and manually convert Python object to C value. That

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Julien Palard
Julien Palard added the comment: Hi Larry, Did you take more time to review this patch and my last comments? I don't think it that awful as it does _not_ apply until explicitly asked for, but I'm open to discuss it. -- ___ Python tracker

Re: SIP install error on windows

2016-12-12 Thread Phil Thompson
On 12 Dec 2016, at 7:29 pm, Xristos Xristoou wrote: > > > hello i want to install sip on windows bit using python > 32 bit. > i download sip from this link https://www.riverbankcomputing.com > i try to install from cmd line : > > C:\WINDOWS\system32>cd

Re: SIP install error on windows

2016-12-12 Thread Xristos Xristoou
Τη Δευτέρα, 12 Δεκεμβρίου 2016 - 9:29:38 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: > hello i want to install sip on windows bit using python > 32 bit. > i download sip from this link https://www.riverbankcomputing.com > i try to install from cmd line : > > C:\WINDOWS\system32>cd

Re: SIP install error on windows

2016-12-12 Thread Phil Thompson
On 12 Dec 2016, at 7:38 pm, Bob Gailer wrote: > > On Dec 12, 2016 2:30 PM, "Xristos Xristoou" wrote: >> >> >> hello i want to install sip on windows bit using python >> 32 bit. >> i download sip from this link https://www.riverbankcomputing.com >> i try

[issue28952] csv.Sniffer().sniff(0 returns a value without the "strict" attribute

2016-12-12 Thread kevin
New submission from kevin: In https://docs.python.org/3.5/library/csv.html#dialects-and-formatting-parameters the Dialect objects are described as supporting, among others, the Dialect.strict attribute, with a default value of False. However, the sniff() returns an object lacking this

Re: SIP install error on windows

2016-12-12 Thread Bob Gailer
On Dec 12, 2016 2:30 PM, "Xristos Xristoou" wrote: > > > hello i want to install sip on windows bit using python > 32 bit. > i download sip from this link https://www.riverbankcomputing.com > i try to install from cmd line : > > C:\WINDOWS\system32>cd

SIP install error on windows

2016-12-12 Thread Xristos Xristoou
hello i want to install sip on windows bit using python 32 bit. i download sip from this link https://www.riverbankcomputing.com i try to install from cmd line : C:\WINDOWS\system32>cd C:\Users\username\Desktop\sip-4.17 C:\Users\username\Desktop\sip-4.17>python configure.py install and take

[issue28896] Embeddable zip allows Windows registry to override module location

2016-12-12 Thread Steve Dower
Steve Dower added the comment: And that commit removes WindowsRegistryFinder from sys.meta_path on startup (as well as fixing regeneration of importlib when building on Windows). It should *not* be cherry picked for 3.6.0. -- resolution: -> fixed stage: commit review -> resolved

[issue28896] Embeddable zip allows Windows registry to override module location

2016-12-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5bd248c2cc75 by Steve Dower in branch '3.6': Issue #28896: Disable WindowsRegistryFinder by default. https://hg.python.org/cpython/rev/5bd248c2cc75 New changeset 4bd131b028ce by Steve Dower in branch 'default': Issue #28896: Disable

[issue11874] argparse assertion failure with brackets in metavars

2016-12-12 Thread paul j3
Changes by paul j3 : -- priority: normal -> high ___ Python tracker ___ ___

[issue28941] Update the link to Source Code in Python Docs from hg to github

2016-12-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: There's source code of the documentation itself https://github.com/python/cpython/blob/master/Doc/library/abc.rst ) for and source code of abc.py https://github.com/python/cpython/blob/master/Lib/abc.py Maybe I misunderstood, I figured issue #28929 is for

[issue28951] re.flags not documented in Module Contents as promised.

2016-12-12 Thread R. David Murray
R. David Murray added the comment: When I follow the link to module contents, I find a list of the flags with their descriptions. (re.A, re.I, etc, etc). Perhaps you are confusing the letters used in the regular expression to represent the flags with the flags themselves? I'm not sure how

[issue26876] Extend MSVCCompiler class to respect environment variables

2016-12-12 Thread Zachary Ware
Zachary Ware added the comment: Steve, does the latest patch look good to you? -- ___ Python tracker ___ ___

[issue28941] Update the link to Source Code in Python Docs from hg to github

2016-12-12 Thread Brett Cannon
Brett Cannon added the comment: How is this different from issue #28929? -- ___ Python tracker ___ ___

[issue28951] re.flags not documented in Module Contents as promised.

2016-12-12 Thread kevin
New submission from kevin: In the online documentation of module re (https://docs.python.org/3.5/library/re.html) under 6.2.1. Regular Expression Syntax for item (?aiLmsux) we are promised "The flags are described in Module Contents" but no description is found there. In fact a number

PyCA/cryptography 1.7 released

2016-12-12 Thread Paul Kehrer
PyCA cryptography 1.7 has been released to PyPI. cryptography is a package which provides cryptographic recipes and primitives to Python developers. Our goal is for it to be your "cryptographic standard library". We support Python 2.6-2.7, Python 3.3+, and PyPy. Changelog

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread John Gordon
In "Juan C." writes: > The instructor said that the right way to call a class attribute is to use > 'Class.class_attr' notation, but on the web I found examples where people > used 'self.class_attr' to call class

[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- title: regrtest: -j0 fails the check -j are not allowed together with -T/-l -> regrtest: -j0 fails the check -j is not allowed together with -T/-l ___ Python tracker

[issue28950] regrtest: -j0 fails the check -j are not allowed together with -T/-l

2016-12-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo title: -j0 fails the check -j are not allowed together with -T/-l -> regrtest: -j0 fails the check -j are not allowed together with -T/-l ___ Python tracker

[issue28948] Facing issue while running Python 3.6.0rc1 windows x86-64 web based installer

2016-12-12 Thread Steve Dower
Steve Dower added the comment: I don't support you have a file named "ucrtbase.dll" in your downloads directory? That would be a really simple explanation, and I'd know how to fix it. If not, I don't have enough information from the logs to guess what the problem may be. For some reason, we

[issue28950] -j0 fails the check -j are not allowed together with -T/-l

2016-12-12 Thread Xiang Zhang
New submission from Xiang Zhang: For python test command line arguments, -j is not allowed together with -T/-l (don't know why): [cpython]$ ./python -m test -j4 -T usage: python -m test [options] [test_name1 [test_name2 ...]] python path/to/Lib/test/regrtest.py [options] [test_name1

[issue28947] Facing issue while running Python 3.6.0rc1 windows x86-64 web based installer

2016-12-12 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Facing issue while running Python 3.6.0rc1 windows x86-64 web based installer ___ Python tracker

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Juan C.
On Mon, Dec 12, 2016 at 12:34 PM, Thomas 'PointedEars' Lahn wrote: > First of all, the proper term for what you are doing there is _not_ “call”; > you are _accessing_ an attribute instead. Indeed, `accessing` seems better. I was looking for a better word but couldn't find at

Re: Django broken pipe error

2016-12-12 Thread justin walters
On Mon, Dec 12, 2016 at 7:27 AM, roma wrote: > Thanks Justin, > > I believe, the whole database story has no influence on the broken pipe > error. I've commented out the whole block and leave only return line: > return HttpResponse(res, content_type="text/plain;

[issue28937] str.split(): remove empty strings when sep is not None

2016-12-12 Thread Vedran Čačić
Vedran Čačić added the comment: I think Guido's mistake is relevant here. It tripped me too. Too much negatives, and "prune" is not really well-known verb. Besides, we already have str.splitlines' keepends, which works the opposite way. -- ___

[issue28949] Unable to launch Python interpreter

2016-12-12 Thread Ned Deily
Ned Deily added the comment: Jason, assuming you are using the python.org 3.6.0r1 installer, let us know what you find out! -- nosy: +ned.deily ___ Python tracker

[issue28937] str.split(): remove empty strings when sep is not None

2016-12-12 Thread Guido van Rossum
Guido van Rossum added the comment: > except the other way around Whoops. Indeed. So all's well here. > x.split(tuple(string.whitespace)) Yes, that's what I was after. (But it can be a separate PR.) -- ___ Python tracker

[issue28248] Upgrade installers to OpenSSL 1.0.2j

2016-12-12 Thread Ned Deily
Ned Deily added the comment: @S Safihre. See the ReadMe included with the python.org 2.7.x installers. (It is displayed at installation and a copy is installed to /Applications/Python 2.7/ReadMe.rtf) As explained there, for 2.7.13rc1 as in recent previous 2.7.x releases, only the 10.5+

[issue28921] Make str.count one character for latin1 string faster

2016-12-12 Thread Xiang Zhang
Xiang Zhang added the comment: > The code looks too complex. It is if looking at the patch alone. But the skill is used across stringlib and the only thing new is the bitwise operation. str/bytes.count is not critical but not bad if it could be optimized and especially the effect is

[issue28949] Unable to launch Python interpreter

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: Hmm. Looks like I may [have a trojan](http://stackoverflow.com/a/4707258). -- ___ Python tracker ___

[issue28937] str.split(): remove empty strings when sep is not None

2016-12-12 Thread Emanuel Barry
Emanuel Barry added the comment: Barry: Sure, the docs example was just a quick write-up, you can word it however you want! Guido: Pretty much, except the other way around (when prune is False, i.e. "don't remove empty strings"). The attached patch exposes the behaviour (it's identical to

Re: The right way to 'call' a class attribute inside the same class

2016-12-12 Thread Juan C.
On Sun, Dec 11, 2016 at 11:34 PM, Steve D'Aprano wrote: > So... in summary: > > > When *assigning* to an attribute: > > - use `self.attribute = ...` when you want an instance attribute; > > - use `Class.attribute = ...` when you want a class attribute in > the same

[issue28937] str.split(): remove empty strings when sep is not None

2016-12-12 Thread Emanuel Barry
Changes by Emanuel Barry : Removed file: http://bugs.python.org/file45853/split_prune_1.patch ___ Python tracker ___

[issue20754] Distribution.parse_config_files uses interpolation since Python 3

2016-12-12 Thread Berker Peksag
Berker Peksag added the comment: Thanks! We also need a test case for the new behavior. -- stage: resolved -> patch review ___ Python tracker ___

[issue28949] Unable to launch Python interpreter

2016-12-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: Indeed it seems that aliases.py is missing. $ ls /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/a* /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py --

[issue28935] distutils use ConfigParser in Python 3.x and fails to parse setup.cfg with percent sign

2016-12-12 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> resolved superseder: -> Distribution.parse_config_files uses interpolation since Python 3 ___ Python tracker

  1   2   >