[issue36299] Deprecate 'u' type in array module

2019-03-14 Thread Inada Naoki
New submission from Inada Naoki : The doc says: > 'u' will be removed together with the rest of the Py_UNICODE API. > Deprecated since version 3.3, will be removed in version 4.0. > https://docs.python.org/3/library/array.html But DeprecationWarning is not raised yet. Let's raise it. * 3.8

[issue36298] Lib/pyclbr.py crashes when the package spec cannot be determined by importlib

2019-03-14 Thread mental
Change by mental : -- type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36298] Lib/pyclbr.py crashes when the package spec cannot be determined by importlib

2019-03-14 Thread mental
New submission from mental : Hi folks! (apologies in advance if any of the code blocks come out irregular, this is my first issue) I was just exploring the `Lib` modules out of curiosity and I discovered `pyclbr` a peculiar artifact from the older days of the Python standard library. I

[issue36297] Remove unicode_internal codec

2019-03-14 Thread Inada Naoki
New submission from Inada Naoki : unicode_internal codec is deprecated since Python 3.3. It raises DeprecationWarning from 3.3. >>> "hello".encode('unicode_internal') __main__:1: DeprecationWarning: unicode_internal codec has been deprecated

[issue36286] Random failure in test_idle

2019-03-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am guessing that test_idle and hence this test have been run over 500 days X 20 runs/day (1 times) since merged. This is the first report I have seen, though failures that get retested would be masked. My guess is a sporadic timing delay such that

[issue23216] IDLE grep/find/replace source code needs docstrings

2019-03-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: There are several minor things to fix after this (and multiple issues), including the difference between find in search and replace. It seems to me that is should be the same. We will definitely need to test changes on both Windows and Linux. The font

Re: How to modify Adaline Stochastic gradient descent

2019-03-14 Thread MRAB
On 2019-03-15 02:48, voko...@gmail.com wrote: Dear May I know how to modify my own Python programming so that I will get the same picture as refer to the attached file - Adaline Stochastic gradient descent [snip] This newsgroup is text-only, and all other attachments, including pictures, are

How to modify Adaline Stochastic gradient descent

2019-03-14 Thread vokoyov
Dear May I know how to modify my own Python programming so that I will get the same picture as refer to the attached file - Adaline Stochastic gradient descent (I am using the Anaconda Python 3.7) Prayerfully Tron Orino Yeong tcynoteb...@yahoo.com 0916643858 from

[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-14 Thread Jess
Jess added the comment: Nevermind, the hold over issue was from another bit. Updated the change request. -- versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue36276] Python urllib CRLF injection vulnerability

2019-03-14 Thread ragdoll
ragdoll added the comment: OK -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-14 Thread Jess
Jess added the comment: Looks like the brackets are fine even in the bracket case Steve mentioned. @echo off if NOT DEFINED ABCDEF ( echo "all good" ) if NOT DEFINED ABCDE ( echo "all good2" ) set ABCDE= if NOT DEFINED ABCDE ( echo "sadness" ) if [%ABCDE%]==[] ( echo "all good3"

[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-14 Thread Jess
Jess added the comment: Alas, "IF NOT DEFINED PYTHON" isn't working - as it's even more possible to get into a state where PYTHON="" than it is for a bracket to be in the python name. Thus, the system would think it declared where we would have created it into an actual path otherwise.

[issue36296] distutils.version.StrictVersion objects cannot be compared with distutils.version.LooseVersionobjects

2019-03-14 Thread Éric Araujo
Éric Araujo added the comment: Hello! Are you seeing this problem when building or installing some package, or are you using the classes directly? If it’s the latter, I would recommand you to use https://pypi.org/project/packaging/ rather than distutils, which is not meant to be used as a

[issue36296] distutils.version.StrictVersion objects cannot be compared with distutils.version.LooseVersionobjects

2019-03-14 Thread Harry Seeber
New submission from Harry Seeber : The self.version used in Version._cmp is a List in LooseVersion's implementation, a Tuple in StrictVersion's implementation. Attempting to compare Strict & Loose versions results in a TypeError. I'd like to PR a fix, but I'd like to know if I'm being stupid

Re: Generator question

2019-03-14 Thread Pierre Reinbold
Wow, thank you Ian for this very detailed answer, and thank you for taking the time for that! Much appreciated! If I get this right, I have to somehow fix the value of a_list during the loop, like when you use the classic default value argument trick with lambdas (damn, I should have thought of

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Thank you sir. I think you may be on to something there. I've done mainframe, machine, 3GL, and 4GL languages, but the last couple I've taken on have given me headaches. I guess I'll have to just read a bunch first and then try and write something simpler than what I'm attempting to take on...

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 3:49 PM, DL Neil wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ .. The section is on classes and objects -

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ .. The section is on classes and objects - https://www.learnpython.org/en/Classes_and_Objects

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 2:28 PM, DL Neil wrote: Jack, On 15/03/19 3:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ ..

[issue36295] Need to yield (sleep(0)) twice in asyncio

2019-03-14 Thread Zachary Ware
Change by Zachary Ware : -- components: +asyncio nosy: +asvetlov, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Jack, On 15/03/19 3:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: UG Announcement - Python Mauritius User-Group (pymug)

2019-03-14 Thread DL Neil
On 14/03/19 6:53 PM, Abdur-Rahmaan Janhangeer wrote: As per requirements, i'm announcing the existence of the Python User-Group for Mauritius, an island in the Indian Ocean. Below are some info. Congratulations! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-14 Thread jt
jt added the comment: Yeah, having this in the NuGet version would be amazing! I have been too specific with the ticket with my narrow mind set on a solution, but NuGet + complete standard library (including venv and pip) is what I now believe I actually should be using. Not that I would

Re: Not a python question, just programming logic trap?

2019-03-14 Thread jonas . thornvall
Den torsdag 14 mars 2019 kl. 06:09:02 UTC+1 skrev Rick Johnson: > jonas.t...@gmail.com wrote: > > Nah i can't see the error is due to the "If clause" branching possibly it > > should been an elseif at instead of separate if. No there is something > > going wrong with the variables. > > Well,

[issue36287] Make ast.dump() not output optional default fields

2019-03-14 Thread Brett Cannon
Brett Cannon added the comment: @eamanu tests are basically always necessary. :) -- ___ Python tracker ___ ___ Python-bugs-list

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 12:50 PM, Calvin Spealman wrote: You still need to get of the two lines at the start of your class, they are unnecessary and reference variables you never defined: class weapon:     weaponId  # Get rid of this line!     manufacturerName  # And this one, too! On Thu, Mar 14, 2019

[issue33944] Deprecate and remove pth files

2019-03-14 Thread Brett Cannon
Brett Cannon added the comment: We could also have a new namespace package which is *just* for startup injection so it wasn't such a hack to tie into the codecs startup code. -- ___ Python tracker

[issue36276] Python urllib CRLF injection vulnerability

2019-03-14 Thread Brett Cannon
Brett Cannon added the comment: Yep, if it's the same problem then close this as a dupe and just poke the other issue. -- ___ Python tracker ___

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-14 Thread Paul Moore
Paul Moore added the comment: Ah, yes, you're right. I'd misremembered. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list

[issue36268] Change default tar format to modern POSIX 2001 (pax) for better portability/interop, support and standards conformance

2019-03-14 Thread C.A.M. Gerlach
C.A.M. Gerlach added the comment: Sure, in work now. Its my first contribution to CPython, so bear with me. I presume this is too trivial to go in the What's New in Python article, but does merit a NEWS entry so users are aware of the change? Aside from changing [this

[issue34160] ElementTree not preserving attribute order

2019-03-14 Thread Diego Rojas
Change by Diego Rojas : -- pull_requests: +12306 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36295] Need to yield (sleep(0)) twice in asyncio

2019-03-14 Thread Assaf Dayan
New submission from Assaf Dayan : In asyncio, 'await asyncio.sleep(0)' is used to relinquish control and check for finished awaitables before continuing. In my example, an awaitable returns but is only handled if 'await asyncio.sleep(0)' is called twice (adjacently) and only then the

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-14 Thread Eryk Sun
Eryk Sun added the comment: > It appears that the venv module did not get added to the 3.7.3 rc1 > embedded distribution. Was that an oversight, or had I misunderstood > what was needed for this to have happened? I think it was supposed to be added to the nuget package:

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
You still need to get of the two lines at the start of your class, they are unnecessary and reference variables you never defined: class weapon: weaponId # Get rid of this line! manufacturerName # And this one, too! On Thu, Mar 14, 2019 at 12:43 PM Jack Dangler wrote: > > On 3/14/19

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 10:39 AM, Calvin Spealman wrote: A few notes, Jack: On Thu, Mar 14, 2019 at 10:32 AM Jack Dangler > wrote: On 3/14/19 10:11 AM, Calvin Spealman wrote: Where are you seeing something like this? The two lines under `class weapon:` are not

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-14 Thread Paul Moore
Paul Moore added the comment: It appears that the venv module did not get added to the 3.7.3 rc1 embedded distribution. Was that an oversight, or had I misunderstood what was needed for this to have happened? -- ___ Python tracker

[issue34714] timeout in test_multiprocessing_spawn x86 Windows7 3.x buildbot

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: We should extend the timeout of this buildbot worker. More and more tests are failing randomly with the 15 min timeout: https://buildbot.python.org/all/#/builders/58/builds/2060 0:19:49 [ 36/420/1] test_zipfile crashed (Exit code 1) -- running:

[issue18368] PyOS_StdioReadline() leaks memory when realloc() fails

2019-03-14 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- pull_requests: +12305 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36262] Coverity scan: Python/dtoa.c resource leak

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the report Charalampos. I fixed dtoa.c in 2.7, 3.7 and master branches. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36262] Coverity scan: Python/dtoa.c resource leak

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset b14057877fd897eaee7bc6626682fc6092b6bbd2 by Victor Stinner in branch '2.7': bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276) (GH-12332) https://github.com/python/cpython/commit/b14057877fd897eaee7bc6626682fc6092b6bbd2

[issue36292] Coverity scan: Resource leaks in longobject.c

2019-03-14 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: This code is unreachable. Will mark it as such. -- ___ Python tracker ___ ___

[issue36292] Coverity scan: Resource leaks in longobject.c

2019-03-14 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- versions: -Python 2.7, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36262] Coverity scan: Python/dtoa.c resource leak

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9818360ed94b39c4605951077b73ae798cddbfb9 by Victor Stinner in branch '3.7': bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276) (GH-12331) https://github.com/python/cpython/commit/9818360ed94b39c4605951077b73ae798cddbfb9

[issue35809] test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest fails intermittently on Travis and passes in verbose mode

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: Another example: https://travis-ci.org/python/cpython/jobs/506338756 0:06:39 load avg: 4.23 [326/416/1] test_concurrent_futures failed -- running: test_multiprocessing_spawn (1 min 27 sec) Traceback: Thread 0x2b2b1c243700 (most recent call first):

[issue36294] `io.BufferedIOBase` returns `None`

2019-03-14 Thread Cyker Way
New submission from Cyker Way : Document of [BufferedIOBase](https://docs.python.org/3/library/io.html#io.BufferedIOBase) says: > ...unlike their RawIOBase counterparts, they will never return None. But this example shows the above statement is not true: import io import os

[issue36293] Nonblocking read sys.stdin raises error

2019-03-14 Thread Cyker Way
New submission from Cyker Way : This piece of code will raise an error: import os import sys os.set_blocking(sys.stdin.fileno(), False) sys.stdin.read() Error: > TypeError: can't concat NoneType to bytes Not sure if this is relevant (for a different version of Python):

[issue36292] Coverity scan: Resource leaks in longobject.c

2019-03-14 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- keywords: +patch pull_requests: +12304 stage: -> patch review ___ Python tracker ___ ___

[issue36289] [2.7] Coverity scan: Modules/_io/bufferedio.c leaked_storage: Variable "data" going out of scope leaks the storage it points to.

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: Thanks Charalampos, I merged your PR. Python 3.7 and master are not affected: _bufferedreader_read_all() has been refactored to add a "cleanup" label which clears all local data including the 'data' variable. -- resolution: -> fixed stage: patch

[issue36289] [2.7] Coverity scan: Modules/_io/bufferedio.c leaked_storage: Variable "data" going out of scope leaks the storage it points to.

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2dd6e079ae71f3723fbea2582ac080be06a6968f by Victor Stinner (stratakis) in branch '2.7': [2.7] bpo-36289: Fix a possible reference leak in the io module (GH-12329) https://github.com/python/cpython/commit/2dd6e079ae71f3723fbea2582ac080be06a6968f

[issue34160] ElementTree not preserving attribute order

2019-03-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please do add an entry to WhatsNew. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36262] Coverity scan: Python/dtoa.c resource leak

2019-03-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +12303 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36262] Coverity scan: Python/dtoa.c resource leak

2019-03-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +12302 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36292] Coverity scan: Resource leaks in longobject.c

2019-03-14 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36291] [2.7] Coverity Scan: Modules/_json.c: leaked_storage: Variable "numstr" going out of scope leaks the storage it points to.

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: Thanks Charalampos, I merged your PR. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36291] [2.7] Coverity Scan: Modules/_json.c: leaked_storage: Variable "numstr" going out of scope leaks the storage it points to.

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset fb3336acfde3204fd01ce519ef24cc18a94dfa3f by Victor Stinner (stratakis) in branch '2.7': [2.7] bpo-36291: Fix a possible reference leak in the json module (GH-12330)

[issue36291] [2.7] Coverity Scan: Modules/_json.c: leaked_storage: Variable "numstr" going out of scope leaks the storage it points to.

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: Note for myself: Python 3 isn't affected by this issue. The issue in Python 2 is in the _match_number_str() function which doesn't exist in Python 3. In Python 3, _parse_object_unicode() uses a very different code: it calls PyFloat_FromString() or

[issue36292] Coverity scan: Resource leaks in longobject.c

2019-03-14 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36292] Coverity scan: Resource leaks in longobject.c

2019-03-14 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : The coverity scan was run on python2, however the same defect seems to exist in python3 as well. Error: RESOURCE_LEAK (CWE-772): [#def69] Python-2.7.15/Objects/longobject.c:3793: alloc_fn: Storage is returned from allocation function "_PyLong_New".

[issue36212] [2.7] Coverity scan: Modules/_hotshot.c , Variable "s1" going out of scope leaks the storage it points to.

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2832ad53358e3fbc4bdc601b9f3fa04dd0deae46 by Victor Stinner (stratakis) in branch '2.7': [2.7] bpo-36212: Fix two possible reference leaks in the hotshot module (GH-12327)

[issue36212] [2.7] Coverity scan: Modules/_hotshot.c , Variable "s1" going out of scope leaks the storage it points to.

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: Thanks Charalampos, I merged your PR. I made minor changes in your commit message. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36212] [2.7] Coverity scan: Modules/_hotshot.c , Variable "s1" going out of scope leaks the storage it points to.

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: Note for myself: Python 3 isn't affected, _hotshot module has been removed from Python 3. -- nosy: +vstinner ___ Python tracker ___

[issue36268] Change default tar format to modern POSIX 2001 (pax) for better portability/interop, support and standards conformance

2019-03-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to create a PR? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36291] [2.7] Coverity Scan: Modules/_json.c: leaked_storage: Variable "numstr" going out of scope leaks the storage it points to.

2019-03-14 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- keywords: +patch pull_requests: +12301 stage: -> patch review ___ Python tracker ___ ___

[issue36291] [2.7] Coverity Scan: Modules/_json.c: leaked_storage: Variable "numstr" going out of scope leaks the storage it points to.

2019-03-14 Thread Julien Palard
Change by Julien Palard : -- assignee: -> matrixise nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33002] Making a class formattable as hex/oct integer with printf-style formatting requires both __int__ and __index__ for no good reason

2019-03-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Resolved in issue36048. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__

[issue12974] array module: deprecate '__int__' conversion support for array elements

2019-03-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__ ___ Python tracker

[issue36291] [2.7] Coverity Scan: Modules/_json.c: leaked_storage: Variable "numstr" going out of scope leaks the storage it points to.

2019-03-14 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : Coverity reports a leak within the json module: Error: RESOURCE_LEAK (CWE-772): [#def26] Python-2.7.15/Modules/_json.c:1367: alloc_fn: Storage is returned from allocation function "PyString_FromStringAndSize".

[issue36290] _ast.ast_type_init does not handle args and kwargs correctly.

2019-03-14 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : While looking at issue 36287 I noticed that the argument parsing logic in _ast.ast_type_init is wrong, for example ast.Constant takes only one argument: ✗ ./python.exe Python 3.8.0a2+ (remotes/origin/HEAD-1-ged9b774cf3:ed9b774cf3, Mar 14 2019, 00:50:47)

[issue36289] [2.7] Coverity scan: Modules/_io/bufferedio.c leaked_storage: Variable "data" going out of scope leaks the storage it points to.

2019-03-14 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- keywords: +patch pull_requests: +12300 stage: -> patch review ___ Python tracker ___ ___

[issue36288] Incorrect answer when using round()

2019-03-14 Thread Zachary Ware
Change by Zachary Ware : -- components: -Build ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36288] Incorrect answer when using round()

2019-03-14 Thread Zachary Ware
Zachary Ware added the comment: Please see the documentation for `round`, it explains this: https://docs.python.org/3/library/functions.html#round -- nosy: +zach.ware -remi.lapeyre resolution: -> not a bug stage: -> resolved status: open -> closed type: behavior ->

[issue36288] Incorrect answer when using round()

2019-03-14 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Thanks for submitting a report MeeranRizvi. This is the expected behavior, according to the IEEE 754 Python round to nearest even integer. This is called the bankers' rounding and is done (I think) to limitate the propagation of errors. I suggest we close

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
A few notes, Jack: On Thu, Mar 14, 2019 at 10:32 AM Jack Dangler wrote: > > On 3/14/19 10:11 AM, Calvin Spealman wrote: > > Where are you seeing something like this? The two lines under `class > weapon:` are not correct because they are variable names that you've never > defined. > > Maybe you

[issue36289] [2.7] Coverity scan: Modules/_io/bufferedio.c leaked_storage: Variable "data" going out of scope leaks the storage it points to.

2019-03-14 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : Coverity scan reports this for bufferedio.c : Error: RESOURCE_LEAK (CWE-772): [#def23] Python-2.7.15/Modules/_io/bufferedio.c:1353: alloc_fn: Storage is returned from allocation function "PyString_FromStringAndSize".

[issue36288] Incorrect answer when using round()

2019-03-14 Thread MeeranRizvi
New submission from MeeranRizvi : When using round() for calculation it gives the incorrect answer. For Example: round(1.5) >>2(Which is correct) But when we calculate: round(2.5) >>2(Should give 3 right?) -- components: Build messages: 337921 nosy: MeeranRizvi priority: normal

[issue33944] Deprecate and remove pth files

2019-03-14 Thread Nick Coghlan
Nick Coghlan added the comment: Just noting that https://bugs.python.org/issue14803 is probably our most comprehensive discussion of the coverage use case for arbitrary pre-__main__ code execution. Steve also made a comment above about potentially turning encodings into a namespace

[issue36287] Make ast.dump() not output optional default fields

2019-03-14 Thread Emmanuel Arias
Change by Emmanuel Arias : -- keywords: +patch pull_requests: +12299 stage: -> patch review ___ Python tracker ___ ___

[issue36287] Make ast.dump() not output optional default fields

2019-03-14 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi @serhiy.storchaka, I send a patch to Github to review. Let me know if is necessary unittest. Regards -- ___ Python tracker ___

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 10:11 AM, Calvin Spealman wrote: Where are you seeing something like this? The two lines under `class weapon:` are not correct because they are variable names that you've never defined. Maybe you intended this to "declare" the attributes for the class? That isn't something you

[issue36263] test_hashlib.test_scrypt() fails on Fedora 29

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: I wrote a PR to fix OpenSSL: https://github.com/openssl/openssl/pull/8483 -- ___ Python tracker ___

[issue36266] Which module could not be found?

2019-03-14 Thread Steve Dower
Steve Dower added the comment: Okay, in that case we're just adding `shortname` into the formatted `message` in _PyImport_FindSharedFuncptrWindows in Python/dynload_win.c I've marked this as "easy (C)" as it seems like a good first contribution for someone. -- keywords: +easy (C)

Re: Not Defined error in basic code

2019-03-14 Thread Jason Friedman
On Thu, Mar 14, 2019 at 8:07 AM Jack Dangler wrote: > > > class weapon: > weaponId > manufacturerName > > def printWeaponInfo(self): > infoString = "ID: %d Mfg: %s Model: %s" % (self.weaponId, > self.manufacturerName) > return infoString > > > > import

Re: Not Defined error in basic code

2019-03-14 Thread Dan Sommers
On 3/14/19 9:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - class weapon:     weaponId     manufacturerName The previous two lines attempt to refer to existing names, but neither name exists.     def printWeaponInfo(self):  

[issue34160] ElementTree not preserving attribute order

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: > Victor, I thought that the news changes were only for major changes. It's a backward incompatible change. It broke at least docutils. So it should be mentioned at least at: https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-python-api --

[issue34160] ElementTree not preserving attribute order

2019-03-14 Thread Diego Rojas
Diego Rojas added the comment: Victor, I thought that the news changes were only for major changes. In another hand, I could retake this bug in a few days with the issues that you mentioned. -- ___ Python tracker

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
Where are you seeing something like this? The two lines under `class weapon:` are not correct because they are variable names that you've never defined. Maybe you intended this to "declare" the attributes for the class? That isn't something you need to do in Python. If you simply remove these

Not Defined error in basic code

2019-03-14 Thread Jack Dangler
Just getting started with tutorials and such, and don't understand this - class weapon:     weaponId     manufacturerName     def printWeaponInfo(self):     infoString = "ID: %d Mfg: %s Model: %s" % (self.weaponId, self.manufacturerName)     return infoString import class_weapon

[issue36202] Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake

2019-03-14 Thread Nick Coghlan
Nick Coghlan added the comment: Victor and I were discussing the appropriate behaviour for the "What do we do if _Py_PreInitialize() hasn't been called?" case, and Victor pointed out that the potential for mojibake provides a solid rationale for going back to the Python 3.6 behaviour:

[issue34160] ElementTree not preserving attribute order

2019-03-14 Thread STINNER Victor
STINNER Victor added the comment: This change broke docutils test suite: https://sourceforge.net/p/docutils/bugs/359/ Problems: * I cannot see the change documented anywhere in https://docs.python.org/dev/whatsnew/3.8.html * I don't see any simple workaround. It would be nice to add an

[issue36212] [2.7] Coverity scan: Modules/_hotshot.c , Variable "s1" going out of scope leaks the storage it points to.

2019-03-14 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- keywords: +patch pull_requests: +12298 stage: -> patch review ___ Python tracker ___ ___

[issue15749] cgitb prints html for text when display disabled.

2019-03-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hi Rémi, I think @r.david.murray would need to review the PR, based on his last comment. That's why I was asking whether the patch should be converted to a PR. There seemed to be a conflict between this and issue 12890 and I wasn't certain which parts of

[issue36231] no "proper" header files on macOS 10.14 Mojave

2019-03-14 Thread Ned Deily
Ned Deily added the comment: Thanks for the report and for the PR offer but let's hold off on that for the moment: I'm planning to merge a somewhat different approach. -- assignee: -> ned.deily ___ Python tracker

[issue35647] Cookie path check returns incorrect results

2019-03-14 Thread Senthil Kumaran
Senthil Kumaran added the comment: Got it, Larry. I wanted to track it and make sure you don't miss it. Looks like we have the PR from @xtreak for 3.4 and 3.5 branches. Thank you! -- ___ Python tracker

Re: Generator question

2019-03-14 Thread Pierre Reinbold
Le 14/03/19 à 10:45, Peter Otten a écrit : > Pierre Reinbold wrote: > >> Wow, thank you Ian for this very detailed answer, and thank you for taking >> the time for that! Much appreciated! >> >> If I get this right, I have to somehow fix the value of a_list during the >> loop, like when you use

[issue36287] Make ast.dump() not output optional default fields

2019-03-14 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Vulnerability: urlsplit does not handle NFKC normalization

2019-03-14 Thread Steve Dower
We recently disclosed and patched a potential vulnerability in Python applications that use urlsplit() or urlparse() on user-provide URLs. You may be impacted if a user can provide a Unicode URL to your application that is later converted to IDNA (Punycode) or ASCII. This conversion will

UG Announcement - Python Mauritius User-Group (pymug)

2019-03-14 Thread Abdur-Rahmaan Janhangeer
As per requirements, i'm announcing the existence of the Python User-Group for Mauritius, an island in the Indian Ocean. Below are some info. Name: Python Mauritius User-Group Website: pymug.com Github: github.com/pymug Mailing list: https://mail.python.org/mailman3/lists/pymug.python.org/ Wiki

cx_Oracle 7.1.2

2019-03-14 Thread Anthony Tuininga
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python 3.x and 2.x and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to

[ANN] PyYAML-5.1: YAML parser and emitter for Python

2019-03-14 Thread Ingy dot Net
=== Announcing PyYAML-5.1 === A new MAJOR RELEASE of PyYAML is now available: https://pypi.org/project/PyYAML/ This is the first major release of PyYAML under the new maintenance team. Among the many changes listed below, this release specifically

rJSmin 1.1.0

2019-03-14 Thread André Malo
Hello World, I'm pleased to announce version 1.1.0 of rJSmin. About rJSmin rJSmin is a javascript minifier written in python. The minifier is based on the semantics of jsmin.c by Douglas Crockford. The module is a re-implementation aiming for speed, so it can be used at runtime

  1   2   >