[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2754 ___ Python tracker ___ ___

[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 541bd28941af407f2329e6a540d6367e5625b115 by Serhiy Storchaka (Segev Finer) in branch 'master': bpo-30911: Fix a crash in json on platforms with unsigned char (#2684)

[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: 16 methods so far, + 17 var_changed_x is 35, leaving another 29. If you are going to give the whole widget structure, then an '*' before bound names would be sufficient and avoid the duplication. -- ___ Python

[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: PR2666 adds 4% test coverage. 40% left to go. I expect some tests will cover more lines with less code. I am working on a test for set_font_sample. -- ___ Python tracker

[issue30907] speed up comparisons to self for built-in containers

2017-07-12 Thread Tim Peters
Tim Peters added the comment: Just noting that every special code path "at the start" doesn't just speed the case it's aiming at, it also _slows_ every case that doesn't pass the new tests. It takes time to fail the new tests. So it usually makes things slower overall, unless the new thing

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-07-12 Thread Stefan Behnel
Stefan Behnel added the comment: For future reference, this change is supported by Cython 0.26 (which is currently close to release). -- ___ Python tracker

[issue30907] speed up comparisons to self for built-in containers

2017-07-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems like it optimizes an irrelevant use case, comparing a container to itself. I don't think this is likely to benefit any existing code, so it would be better not to add more code clutter/complexity with another special case code path unless

[issue30907] speed up comparisons to self for built-in containers

2017-07-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

No pip3.5 bin after install python3.5.1 from source code

2017-07-12 Thread Dahui Jiang
Hi all: I installed python3.5.1 from source code, but found strange events. on RHEL6, before "make install", if I run "yum -y install openssl openssl-devel" even though the two lib is installed, then the pip bin would installed, else not installed; on SLES11 SP3, even though I run "rpm -i

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2017-07-12 Thread Nick Coghlan
Nick Coghlan added the comment: I've added a second answer to the referenced Stack Overflow issue that attempts to more clearly explain what is going on: https://stackoverflow.com/questions/43393764/python-3-6-project-structure-leads-to-runtimewarning/45070583#45070583 (The problem there is

[issue30466] Tutorial doesn't explain the use of classes

2017-07-12 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: patch review -> backport needed ___ Python tracker ___

[issue30466] Tutorial doesn't explain the use of classes

2017-07-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 3fbd70018f835edd33250de2f79b7a7ef45f8359 by Mariatta (Trey Hunner) in branch 'master': bpo-30466: Add brief explanation of classes to tutorial (GH-1804) https://github.com/python/cpython/commit/3fbd70018f835edd33250de2f79b7a7ef45f8359

pythonpath in ipython console

2017-07-12 Thread christoph
hello, I am a bit confused, i use spyder, when i execute in ipython console program start fails with message 'Attribute error' when I start same program via python console everything works fine, even start from terminal workes fine. It seems that i python does not load Pythonpath, although

[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: I did a first draft of the four create_page_* methods. I did one additional section called 'Widget Structure' which has the names of the widgets indented under the parent widget they are attached to. I don't know if that would be helpful. The order of the

[issue27099] IDLE: turn builting extensions into regular modules

2017-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I will look at the patch after doing more with config and configdialog. -- ___ Python tracker ___

Re: Better Regex and exception handling for this small code

2017-07-12 Thread MRAB
On 2017-07-12 23:49, Nick Mellor wrote: On Wednesday, 12 July 2017 02:32:29 UTC+10, Ganesh Pal wrote: Dear Python friends I am trying to open a file and check if there is a pattern has changed after the task got completed? file data:

[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy: question about tkinter.wantobjects. ConfigDialog sets the font options of label font_sample and text text_highlight_sample with a font tuple such as font=('courier', 12, ''). In the test, I expected retrieval of the font option with

[issue30914] test_alpn_protocols (test.test_ssl.ThreadedTests) fails on Fedora 26

2017-07-12 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. This problem has already been reported in bpo-30714. -- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_ssl fails with openssl 1.1.0f ___

[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: You put one non-tk name in the font page 'Configuration attributes'. I removed it as not belonging with the tk Vars, but it got me thinking that more would be useful. In the ConfigChanges docstring we included a list of methods, which I believe is

Re: Better Regex and exception handling for this small code

2017-07-12 Thread Nick Mellor
On Wednesday, 12 July 2017 02:32:29 UTC+10, Ganesh Pal wrote: > Dear Python friends > > I am trying to open a file and check if there is a pattern has changed > after the task got completed? > > file data: > > > #tail -f /file.txt >

[issue30916] Pre-build OpenSSL and Tcl/Tk for Windows

2017-07-12 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +2753 ___ Python tracker ___ ___

[issue30916] Pre-build OpenSSL and Tcl/Tk for Windows

2017-07-12 Thread Steve Dower
New submission from Steve Dower: To save time and improve reliability while building CPython, we should pre-build and sign OpenSSL and Tcl/Tk binaries and make it a binary dependency. Our slightly-patched sources will still be available, and it will be relatively easy for people to download

[issue30915] distutils sometimes assumes wrong C compiler

2017-07-12 Thread moxian
New submission from moxian: https://github.com/python/cpython/blob/2.7/Lib/distutils/unixccompiler.py#L229 In unixcompiler.py runtime_library_dir_option() function, we get the name of active C compiler the following way: `compiler = os.path.basename(sysconfig.get_config_var("CC"))` This works

[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: I had actually started doing this a little in the original docstrings and then was worried that it was too redundant with the code. Thanks for mentioning the multiple PRs. I'll take a look at it and make one change at a time for easier review. --

[issue29571] test_re is failing when local is set for `en_IN`

2017-07-12 Thread Naman Bhalla
Changes by Naman Bhalla : -- nosy: +Naman-Bhalla ___ Python tracker ___ ___

[issue30912] python 3 git master fails to find libffi and build _ctypes on Mageia v6 x86-64

2017-07-12 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +2752 ___ Python tracker ___

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2017-07-12 Thread Luke
Luke added the comment: I recently started getting this warning message (see bottom) that seems to be due to the changes from this issue. I'm running a submodule as main using the `-m` flag, but I'm not doing any modification to `sys.modules`, or even `sys.path`... I've taken a look at [The

Re: Test 0 and false since false is 0

2017-07-12 Thread Terry Reedy
On 7/12/2017 7:35 AM, Rhodri James wrote: On 12/07/17 03:29, Stefan Ram wrote: Grant Edwards writes: False is required to be a singleton. »singleton« usually means »the sole object of its class«. »Ensure a class only has one instance, and provide a

[issue30914] test_alpn_protocols (test.test_ssl.ThreadedTests) fails on Fedora 26

2017-07-12 Thread Nir Soffer
New submission from Nir Soffer: To reproduce: checkout https://github.com/nirs/cpython/commit/9648088e6ccd6d0cc04f450f55628fd8eda3784c mkdir debug cd debug ../configure --with-pydebug make make test ... == FAIL:

[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.6, Python 3.7 ___ Python tracker ___ ___

[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-12 Thread Terry J. Reedy
New submission from Terry J. Reedy: Among other things, #30777 added docstrings to configdialog. Those for create_page_x methods included a list of 'Configuration attributes' (Tk Variables) with an annotation as to what the Var represents. The list for the font tab already helped when

[issue29571] test_re is failing when local is set for `en_IN`

2017-07-12 Thread Naman Bhalla
Changes by Naman Bhalla : -- pull_requests: +2751 ___ Python tracker ___ ___

[issue30912] python 3 git master fails to find libffi and build _ctypes on Mageia v6 x86-64

2017-07-12 Thread Shlomi Fish
New submission from Shlomi Fish: Running "make" in cpython git master on mageia linux v6 x86-64 gives me this problem with ffi: running build running build_ext Header file /usr/include/ffi.h does not define LIBFFI_H or ffi_wrapper_h INFO: Could not locate ffi libs and/or headers The

[issue30899] IDLE: Add idle config parser unittest

2017-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset a9bf62cadf6ccd55b84a8d4f353529b02a537830 by terryjreedy in branch '3.6': [3.6] bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses. (GH-2662) (#2685)

[issue30906] os.path.join misjoins paths

2017-07-12 Thread mesheb82
mesheb82 added the comment: Testing on Python 2.7.12 on through Windows 10 bash (so Linux), I find an inconsistency with the documented statement "If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component" >>>

[issue30899] IDLE: Add idle config parser unittest

2017-07-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue30899] IDLE: Add idle config parser unittest

2017-07-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2750 ___ Python tracker ___ ___

[issue30899] IDLE: Add idle config parser unittest

2017-07-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 50c9435c9b73b39fcf79cc3e58edc58bb943d0ed by terryjreedy (Louie Lu) in branch 'master': bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses. (#2662)

[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker ___

[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-12 Thread Segev Finer
Changes by Segev Finer : -- pull_requests: +2749 ___ Python tracker ___ ___

[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-12 Thread Segev Finer
New submission from Segev Finer: Shows in buildbots: /home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Modules/_json.c: In function ‘scanner_new’: /home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Modules/_json.c:1212:5: warning: comparison is always false due to limited range of data

[issue30906] os.path.join misjoins paths

2017-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: We absolutely cannot change this to give an error if the second or subsequent parameters is absolute. I have code that reads user-named config files. If the path is relative, it's relative to a config directory, but it's allowed to be absolute:

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2017-07-12 Thread R. David Murray
R. David Murray added the comment: The biggest problem, as paul.j3 says, is to get someone from core to review the argparse issues. I am currently planning to make argparse one of my foci in a sprint we are doing at the beginning of September, so there is some hope Any reviews/testing

[issue30797] ./pyconfig.h:1438:0: warning: "_GNU_SOURCE" redefined [enabled by default]

2017-07-12 Thread Segev Finer
Segev Finer added the comment: The fix is now in 3.5-3.7 and 2.7, unless you intend to also back port to 3.4 and 3.3, this can be closed. -- ___ Python tracker

[issue10438] list an example for calling static methods from WITHIN classes

2017-07-12 Thread R. David Murray
R. David Murray added the comment: It is documented how to call a static method when you don't have an instance. So when you don't (for example, inside a static method on the same class) you use that form (call the method on the class name). I realize you don't find this clear, but as

[issue23835] configparser does not convert defaults to strings

2017-07-12 Thread R. David Murray
R. David Murray added the comment: Thanks. OK, so you agree a fix is appropriate. What about the question of backport/backward compatibility? -- ___ Python tracker

[issue30909] ServerProxy should not make requests with malformed XML

2017-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks like a duplicate of issue7727. -- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> xmlrpc library returns string which contain null ( \x00 ) ___ Python tracker

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-07-12 Thread Tim Graham
Tim Graham added the comment: Thanks, I'm not sure what that means exactly but I added the note to https://github.com/numpy/numpy/issues/9391. Perhaps a note in the Python release notes is warranted? -- ___ Python tracker

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread WoFy The 95s
On Wednesday, 12 July 2017 18:01:35 UTC+5:30, WoFy The 95s wrote: > class Person: > def __init__(self, name, job=None, pay=0): > self.name = name > self.job = job > self.pay = pay > def lastName(self): > return self.name.split()[-1] > def

[issue30910] Add -fexception to ppc64le build

2017-07-12 Thread Bruno Rosa
Changes by Bruno Rosa : -- pull_requests: +2748 ___ Python tracker ___ ___

[issue30910] Add -fexception to ppc64le build

2017-07-12 Thread Bruno Rosa
New submission from Bruno Rosa: To correctly throw and catch exceptions in code that is written in both C and C++, the -fexception is needed. This issue was also reported downstream on Debian and Ubuntu: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862925 -- messages: 298231

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think you need to update Cython to a version that supports new FASTCALL call convention in 3.7. If the support of FASTCALL in Cython is optional try to disable it. -- ___ Python tracker

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread Peter Otten
WoFy The 95s wrote: > On Wednesday, 12 July 2017 18:57:11 UTC+5:30, Peter Otten wrote: >> WoFy The 95s wrote: >> >> > i tried from idle interpreter >> > >> > from person import Manager >> > >> > >> > >> from person import Manager >> > Traceback (most recent call last): >> > File

[issue25516] threading.Condition._is_owned() is wrong when using threading.Lock

2017-07-12 Thread Nir Soffer
Nir Soffer added the comment: I rebased the patch on master (it was created against the legacy git tree in github), and sent a pull request. -- nosy: +Nir Soffer ___ Python tracker

[issue10438] list an example for calling static methods from WITHIN classes

2017-07-12 Thread Ian
Ian added the comment: As indicated earlier, I would prefer to see clear instructions on how to call a class's static method from another static method within the same class. Currently, it's only clear how to call from outside the class. If that's not going to happen, then I agree that this

[issue25516] threading.Condition._is_owned() is wrong when using threading.Lock

2017-07-12 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2747 ___ Python tracker ___ ___ Python-bugs-list

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-07-12 Thread Tim Graham
Tim Graham added the comment: Hi, I observed an error while trying to install numpy after 6969eaf4682beb01bc95eeb14f5ce6c01312e297. gcc: numpy/random/mtrand/mtrand.c numpy/random/mtrand/mtrand.c: In function ‘__Pyx_PyCFunction_FastCall’: numpy/random/mtrand/mtrand.c:44374:5: error: too

[issue30909] ServerProxy should not make requests with malformed XML

2017-07-12 Thread Alex Corcoles
New submission from Alex Corcoles: https://docs.python.org/3.7/library/xmlrpc.client.html says: """ When passing strings, characters special to XML such as <, >, and & will be automatically escaped. However, it’s the caller’s responsibility to ensure that the string is free of characters that

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread WoFy The 95s
On Wednesday, 12 July 2017 18:57:11 UTC+5:30, Peter Otten wrote: > WoFy The 95s wrote: > > > i tried from idle interpreter > > > > from person import Manager > > > > > > > from person import Manager > > Traceback (most recent call last): > > File "", line 1, in > > from

[issue27099] IDLE: turn builting extensions into regular modules

2017-07-12 Thread Charles Wohlganger
Charles Wohlganger added the comment: Pull Request is passing build tests. Please check for pushing to master at your convenience. -- ___ Python tracker

[issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads

2017-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The alternate solution is to remove all references to test instances before calling tearDownClass(). Interesting, that this warning is occurred only in the leak hunting mode. In normal cases test instances are removed from a testsuite, but regrtest hacks

[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-07-12 Thread Max Rothman
Max Rothman added the comment: > Generally the called with asserts can only be used to match the *actual > call*, and they don't determine "equivalence". That's fair, but as unittest.mock stands now, it *does* check equivalence, but only partially, which is more confusing to users than either

[issue30730] [security] Injecting environment variable in subprocess on Windows

2017-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I forgot that null character/byte errors were of type TypeError before 3.5. The simplest fix is changing corresponding ValueError in self.assertRaises() to the tuple (ValueError, TypeError). I have updated the PR for 3.5. You can include the fix in your

[issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads

2017-07-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset d1cc037d1442cc35d1b194ec8e50901514360949 by Victor Stinner in branch 'master': bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) https://github.com/python/cpython/commit/d1cc037d1442cc35d1b194ec8e50901514360949 --

[issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads

2017-07-12 Thread STINNER Victor
STINNER Victor added the comment: > This isn't specific to test_keywords. Dangling threads occurred even if > replace the test body with just "return". This is caused by setUp/tearDown or > setUpClass/tearDownClass. Right, see my PR #2680. The general problem is that tearDownClass() seems to

[issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads

2017-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This isn't specific to test_keywords. Dangling threads occurred even if replace the test body with just "return". This is caused by setUp/tearDown or setUpClass/tearDownClass. -- nosy: +serhiy.storchaka ___

[issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads

2017-07-12 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2746 ___ Python tracker ___ ___

[issue30730] [security] Injecting environment variable in subprocess on Windows

2017-07-12 Thread STINNER Victor
STINNER Victor added the comment: I rebased my "[3.4] Backport CI config from master" PR #2475 on top of 3.4 to test the new security fixes, but a few test_subprocess tests failed: https://github.com/python/cpython/pull/2475 https://travis-ci.org/python/cpython/jobs/252804589

[issue30907] speed up comparisons to self for built-in containers

2017-07-12 Thread Wouter Bolsterlee
Changes by Wouter Bolsterlee : -- pull_requests: +2745 ___ Python tracker ___ ___

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread Peter Otten
WoFy The 95s wrote: > i tried from idle interpreter > > from person import Manager > > > from person import Manager > Traceback (most recent call last): > File "", line 1, in > from person import Manager > ImportError: cannot import name 'Manager' Enter import person

[issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads

2017-07-12 Thread STINNER Victor
New submission from STINNER Victor: The test_keywords() test of test_os.TestSendfile emits a warning about dangling threads: haypo@selma$ ./python -m test --fail-env-changed -R 3:3 test_os -m test.test_os.TestSendfile.test_keywords Run tests sequentially 0:00:00 load avg: 0.53 [1/1] test_os

[issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472)

2017-07-12 Thread Larry Hastings
Larry Hastings added the comment: Correct. But technically 3.3 is being upgraded to 2.2.*1*, which is being tracked on--repeating myself here--Issue #30694. -- ___ Python tracker

botlib - framework to program bots

2017-07-12 Thread Bart Thate
BOTLIB - Framework to program bots is released in the Public Domain - https://lnkd.in/ginB49K #publicdomain #python3 #xmpp #irc #bot Framework to program bots. -- https://mail.python.org/mailman/listinfo/python-list

[issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472)

2017-07-12 Thread Larry Hastings
Larry Hastings added the comment: Here, I'll remove 3.4 and 3.5 from the versions affected. Now everybody can be pedantic! -- versions: -Python 3.3, Python 3.4 ___ Python tracker

[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2017-07-12 Thread R. David Murray
R. David Murray added the comment: I don't think that helps. The issue here is that *sequences* are iterated over by incrementing an integer index. If you change the size of the list, you are potentially changing which value any given index points to. Presumably the tutorial writer thought

[issue30907] speed up comparisons to self for built-in containers

2017-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue30907] speed up comparisons to self for built-in containers

2017-07-12 Thread Wouter Bolsterlee
New submission from Wouter Bolsterlee: when comparing instances of the built-in container types (dict, list, and others) python assumes that "identity implies equality". this is documented (and assumed) behaviour: "In enforcing reflexivity of elements, the comparison of collections assumes

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread WoFy The 95s
On Wednesday, 12 July 2017 18:20:32 UTC+5:30, Steve D'Aprano wrote: > Please COPY AND PASTE the FULL error, starting with the line "Traceback". > > The code you show below looks fine, and you don't need an import, so I don't > know what error you are getting. > > > On Wed, 12 Jul 2017 10:31

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread WoFy The 95s
On Wednesday, 12 July 2017 18:20:32 UTC+5:30, Steve D'Aprano wrote: > Please COPY AND PASTE the FULL error, starting with the line "Traceback". > > The code you show below looks fine, and you don't need an import, so I don't > know what error you are getting. > > > On Wed, 12 Jul 2017 10:31

Re: python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread Steve D'Aprano
Please COPY AND PASTE the FULL error, starting with the line "Traceback". The code you show below looks fine, and you don't need an import, so I don't know what error you are getting. On Wed, 12 Jul 2017 10:31 pm, lunkamba...@gmail.com wrote: > class Person: > def __init__(self, name,

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2017-07-12 Thread Larry Hastings
Larry Hastings added the comment: New changeset 6f6bc1da8aaae52664e7747e328d26eb59c0e74f by larryhastings (Victor Stinner) in branch '3.4': bpo-26657: Fix Windows directory traversal vulnerability with http.server (#782)

[issue30500] [security] urllib connects to a wrong host

2017-07-12 Thread Larry Hastings
Larry Hastings added the comment: New changeset cc54c1c0d2d05fe7404ba64c53df4b1352ed2262 by larryhastings (Victor Stinner) in branch '3.4': bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2291)

[issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472)

2017-07-12 Thread STINNER Victor
STINNER Victor added the comment: > Okay. Closing this bug, because all the branches that are being upgraded to > expat 2.2.*0* have already gotten their upgrades. Job done. Well, technically 3.3 wasn't upgraded yet: https://github.com/python/cpython/pull/2204 --

[issue30694] Update embedded copy of expat to 2.2.1

2017-07-12 Thread Larry Hastings
Larry Hastings added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203)

[issue30726] [Windows] Warnings in elementtree due to new expat

2017-07-12 Thread Larry Hastings
Larry Hastings added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203)

[issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472)

2017-07-12 Thread Larry Hastings
Larry Hastings added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203)

python 3.5 raiaing an error when import the class Manager in this module sayning name Manager is not define

2017-07-12 Thread lunkambamuk
class Person: def __init__(self, name, job=None, pay=0): self.name = name self.job = job self.pay = pay def lastName(self): return self.name.split()[-1] def giveRaise(self, percent): self.pay = int(self.pay * (1 + percent)) def

[issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472)

2017-07-12 Thread Larry Hastings
Larry Hastings added the comment: Okay. Closing this bug, because all the branches that are being upgraded to expat 2.2.*0* have already gotten their upgrades. Job done. The discussions for PRs 2203 and 2204 should move to Issue #30694, which is for the upgrade to expat 2.2.*1*. --

[issue23835] configparser does not convert defaults to strings

2017-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: Responded on the PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue30760] configparse module in python3 can not write '%' to config file

2017-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: With the default ConfigParser, we're using basic interpolation, as covered by: https://docs.python.org/3/library/configparser.html#configparser.BasicInterpolation To not have it, set interpolation to None in the ConfigParser constructor: config =

[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules

2017-07-12 Thread Antoni Szych
Antoni Szych added the comment: Hi, It's been 3 years now since this issue was first raised. We bumped upon this issue while using code like following: def tearDown(): patch.stopall() def test123(): p=patch.dict(...) p.start() assert False p.stop() While

Re: Test 0 and false since false is 0

2017-07-12 Thread Rhodri James
On 12/07/17 03:29, Stefan Ram wrote: Grant Edwards writes: False is required to be a singleton. »singleton« usually means »the sole object of its class«. »Ensure a class only has one instance, and provide a global point of access to it.« - Gamma

Re: Write this accumuator in a functional style

2017-07-12 Thread Chris Angelico
On Wed, Jul 12, 2017 at 7:52 PM, Paul Rubin wrote: > Not so easily in Python since the built-in list and dict types are > designed for mutation update. In Haskell, the list type is a linked > list and the dictionary type is a balanced tree. So, you can make a new > list

Re: Write this accumuator in a functional style

2017-07-12 Thread Paul Rubin
Steven D'Aprano writes: > for parrot in parrots: > accumulator[parrot.colour].append(parrot) > > That's pretty compact and understandable, but it require mutating a bunch > of pre-allocated lists inside an accumulator. Can we re-write this in a > functional style? Not

[issue26415] Excessive peak memory consumption by the Python parser

2017-07-12 Thread Petr Viktorin
Changes by Petr Viktorin : -- nosy: +encukou ___ Python tracker ___ ___ Python-bugs-list

Re: Write this accumuator in a functional style

2017-07-12 Thread Steven D'Aprano
On Wed, 12 Jul 2017 17:47:50 +1200, Gregory Ewing wrote: > Steve D'Aprano wrote: >> - Greg's dict comprehension version requires N+1 passes through the >> data, >> one to convert to a list, and 1 per each possible key. > > Just to be clear, my solution was a response to the requirement that it

[issue30906] os.path.join misjoins paths

2017-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I afraid that failing on os.path.join('', '/path') or os.path.join('.', '/path') can break a lot of code. > I'd be in favor of preserving the drive when encountering a component > starting with a separator. Already done (issue19456). >>> import ntpath >>>

Re: Write this accumuator in a functional style

2017-07-12 Thread Rustom Mody
On Tuesday, July 11, 2017 at 4:11:50 PM UTC+5:30, Alain Ketterlin wrote: > Steven D'Aprano writes: > > > I have a colleague who is allergic to mutating data structures. Yeah, I > > know, he needs to just HTFU but I thought I'd humour him. > > > > Suppose I have an iterator that yields named

[issue30876] SystemError on importing module from unloaded package

2017-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2744 ___ Python tracker ___ ___

[issue30876] SystemError on importing module from unloaded package

2017-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, this is because issue18018 was fixed only in 3.6. Issue18018 is similar to this issue, it is about confusing SystemError. As a side effect it solved an example from issue26367 in C builtin __import__. I think that both raising SystemError and returning

  1   2   >