[issue33015] Fix function cast warning in thread_pthread.h

2018-10-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Shall we introduce a new thread-starting API that takes a function with the > "correct" pthread signature? Do we need it? I don't think saving a single memory allocation is worth the bother. -- ___ Python track

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: I tested PR 10079 using gdb on Fedora 28 with GCC 8.1.1 to check if Py_INCREF/Py_DECREF functions are inlined. I understand that "static inline void Py_INCREF()" is *not* inline by gcc -O0, but it *is* inlined using gcc -Og which is the *default* optimizatio

[issue33015] Fix function cast warning in thread_pthread.h

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: "Shall we introduce a new thread-starting API that takes a function with the "correct" pthread signature?" Extract of my PR: "Python uses pthread_detach() and doesn't use pthread_join(), the thread return value is ignored." Python doesn't give access to th

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Change by Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) : -- nosy: +thatiparthy ___ Python tracker ___ ___ Python-bugs-li

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: I modified PR 10079 to add a Py_STATIC_INLINE(TYPE) macro: * Use __attribute__((always_inline)) with GCC and clang * Use __forceinline with MSVC Tests on Linux, example: "./configure --with-pydebug CC=clang CFLAGS="-O0" && make clean && make platform" * Li

[issue34547] Wsgiref server does not handle closed connections gracefully

2018-10-25 Thread Petter S
Change by Petter S : -- pull_requests: +9419 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue35047] Better error messages in unittest.mock

2018-10-25 Thread Petter S
Change by Petter S : -- keywords: +patch pull_requests: +9420 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue34547] Wsgiref server does not handle closed connections gracefully

2018-10-25 Thread Petter S
Change by Petter S : -- pull_requests: -9419 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue35063] Checking for abstractmethod implementation fails to consider MRO for builtins

2018-10-25 Thread Antony Lee
New submission from Antony Lee : When checking whether a class implements all abstractmethods (to know whether the class can be instantiated), one should only consider methods that come *before* the abstractmethod in the MRO -- methods that come after cannot be said to override the abstractme

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: On Windows, a Debug build doesn't inline Py_INCREF/DECREF even if it uses __forceinline. I looked at the Py_IncRef() and Py_DecRef() assembly in Visual Studio using a breakpoint. Using /Ob1, Py_INCREF/DECREF are inlined as expected. I set this option in the

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: Ok, I confirm that Py_XINCREF() is properly inlined in Py_IncRef() with the latest version of my PR 10079. I tested: * gcc -O0 * clang -O0 * MSVC: x64 build in Debug mode -- ___ Python tracker

[issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix

2018-10-25 Thread STINNER Victor
New submission from STINNER Victor : Extract of Include/object.c: #ifdef COUNT_ALLOCS PyAPI_FUNC(void) inc_count(PyTypeObject *); PyAPI_FUNC(void) dec_count(PyTypeObject *); The "make smelly" fails with 10 symbols: --- $ ./configure --with-pydebug CFLAGS="-D COUNT_ALLOCS -O0" $ make smelly (.

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it guarantied that static inline functions will be inlined and will be not called as external functions from the Python library? The latter would break binary compatibility of extensions compiled with newer Python headers with older binary Python librar

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: > Is it guarantied that static inline functions will be inlined and will be not > called as external functions from the Python library? The latter would break > binary compatibility of extensions compiled with newer Python headers with > older binary Python

[issue34424] Unicode names break email header

2018-10-25 Thread Michael Thies
Michael Thies added the comment: Thanks for pointing me to this issue. :) > Michael, if you could check if Jens patch fixes your problem I would > appreciate it. Jens PR does exactly, what I proposed in #35057, so it fixes my problem, indeed. --

[issue35063] Checking for abstractmethod implementation fails to consider MRO for builtins

2018-10-25 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: > Is it guarantied that static inline functions will be inlined and will be not > called as external functions from the Python library? The latter would break > binary compatibility of extensions compiled with newer Python headers with > older binary Python

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: Interesting article on inline/static inline and symbols: https://gist.github.com/htfy96/50308afc11678d2e3766a36aa60d5f75 -- ___ Python tracker __

[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9e00e80e213ebc37eff89ce72102c1f928ebc133 by Victor Stinner in branch 'master': bpo-35053: Enhance tracemalloc to trace free lists (GH-10063) https://github.com/python/cpython/commit/9e00e80e213ebc37eff89ce72102c1f928ebc133 --

[issue35061] Specify libffi.so soname for ctypes

2018-10-25 Thread Yongkwan Kim
Change by Yongkwan Kim : -- components: +Build type: -> compile error versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-

[issue34187] Issues with lazy fd support in _WindowsConsoleIO fileno() and close()

2018-10-25 Thread Tal Einat
Change by Tal Einat : -- nosy: +taleinat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue34160] ElementTree not preserving attribute order

2018-10-25 Thread Tal Einat
Tal Einat added the comment: This doesn't strike me as a bug, or even clearly being a potential improvement. If this about round-trip parsing/serializing not preserving order, that would be significant. As it is, if this is only intended as a debugging tool, why change it? Is there a concre

[issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever

2018-10-25 Thread Vincent Michel
New submission from Vincent Michel : I'm not sure whether it is intended or not, but I noticed a change in the behavior of `StreamReader` between version 3.7 and 3.8. Basically, reading some received data from a closed TCP stream using `StreamReader.read` might hang forever, under certain co

[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9422 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: Hey, I am starting my journey with the contribution to CPython. and this is i think i can do these changes. if Charalampos is not there to work on it. i would like to try this. -- nosy: +shivank98 ___ Python track

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Hello Shivank. I had a PR ready locally which I was about to push, so you posted just at the right time :) Feel free to work on this issue. -- ___ Python tracker ___

[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-25 Thread Tim Graham
Change by Tim Graham : -- pull_requests: +9423 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailin

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-25 Thread Tim Graham
Change by Tim Graham : -- pull_requests: +9424 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: Thanks, Charalampos :) I would be thankful if you or Serhiy can help me a little bit. so do I need to just do the following work? 1924--> n._call_user_data_handler(operation, n, entity) -- ___ Python tracker

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: *1924--> n._call_user_data_handler(operation, n, notation) -- ___ Python tracker ___ ___ Python

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You need also to write a test. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6279c1c5003cd94b5e04e568ce3df7c4e8f1eaa3 by Victor Stinner in branch 'master': bpo-35053: Add Include/tracemalloc.h (GH-10091) https://github.com/python/cpython/commit/6279c1c5003cd94b5e04e568ce3df7c4e8f1eaa3 -- __

[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2018-10-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset e25d5fc18e6c4b0062cd71b2eb1fd2d5eb5e2d3d by Victor Stinner (madman-bob) in branch 'master': bpo-32321: Add pure Python fallback for functools.reduce (GH-8548) https://github.com/python/cpython/commit/e25d5fc18e6c4b0062cd71b2eb1fd2d5eb5e2d3d --

[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2018-10-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +9425 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: I just merged PR 8548. See the PR to the discussion. IMHO it's a nice enhancement to have a pure Python implementation: https://github.com/python/cpython/pull/8548#issuecomment-433063178 (and the PR has been approved by 2 other core devs ;-)) But I'm against

[issue32321] Add pure Python fallback for functools.reduce

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- title: functools.reduce has a redundant guard or needs a pure Python fallback -> Add pure Python fallback for functools.reduce ___ Python tracker ___

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: Oh, I see, so I believe that's where my learning of CPython is going to start. can anyone help me in completing this? what I understood till now is in minidom.py we need to change line 1924. else it, we need to create a test. I want to help in what should a t

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: >I want to help in *need help in -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: This change modifies _Py_NewReference() which is a very important function and it impacts Python performance. I prefer to keep the bug in Python 3.6 and 3.7 to not risk to introduce a regression. The bug exists since Python 3.4 and I'm the first one to spot

[issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever

2018-10-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: Hi Vincent! No, the hang is not intended behavior. Thanks for the report. I'll assign the issue to myself to don't miss the bug; but if you have a patch with a fix -- please don't hesitate to make a Pull Request for it. -- __

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Michael Saah
New submission from Michael Saah : A call to time.strftime('%') returns '%' A similar call to datetime.utcfromtimestamp(int(time.time()).strftime('%') raises ValueError: strftime format ends with raw % Similar inputs like '%D %' behave similarly. I might take a crack at fixing this, but first

[issue34765] Update install-sh

2018-10-25 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Adding to this, the reason I initially caught up with that, was due to a coverity scan. More explicitly: Error: SHELLCHECK_WARNING: [#def1] /usr/lib64/python3.6/config-3.6dm-x86_64-linux-gnu/install-sh:63:1: warning: transform_arg appears unused. Ver

[issue34765] Update install-sh

2018-10-25 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Generic reference on the issue: https://github.com/koalaman/shellcheck/wiki/SC2034 -- ___ Python tracker ___

[issue32321] Add pure Python fallback for functools.reduce

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: > However, the documentation says nothing about reduce being optional, and it > is unconditionally included in the module __all__. Oh, about this specific issue: maybe test___all__ should be fixed to test functools.py with _functools blocked? As done by test

[issue34765] Update install-sh

2018-10-25 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Alright the static scanner warns in the case of a typo being made where the variable is actually used, but since the variable is indeed not used, that doesn't not make it a bug. -- ___ Python tracker

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9426 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9427 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-25 Thread Steve Dower
Steve Dower added the comment: New changeset d03b7757811ae51277f8ed399a9a0fd78dfd3425 by Steve Dower (Tim Graham) in branch 'master': bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082) https://github.com/python/cpython/commit/d03b7757811ae51277f8ed399a9a0fd78dfd3425 -

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: for me, yep normally we should provide the same behavior. now, if you want, you can submit a PR but before your PR, you have to sign the CLA. thanks -- nosy: +matrixise ___ Python tracker

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 18618e652c56e61a134e596b315a13c7cb997a89 by Victor Stinner in branch 'master': bpo-35059: Add Py_STATIC_INLINE() macro (GH-10093) https://github.com/python/cpython/commit/18618e652c56e61a134e596b315a13c7cb997a89 -- ___

[issue35067] Use vswhere instead of _distutils_findvs

2018-10-25 Thread Steve Dower
New submission from Steve Dower : We have much simpler needs for distutils that don't require the more complex build/dependencies we currently have. We should remove the extra native module and just shell out to vswhere.exe, which is always included in the VS installer in a known location. -

[issue35067] Use vswhere instead of _distutils_findvs

2018-10-25 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +9428 stage: needs patch -> patch review ___ Python tracker ___ ___ Pytho

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 626bff856840f471e98ec627043f780c111a063d by Victor Stinner in branch 'master': bpo-9263: Dump Python object on GC assertion failure (GH-10062) https://github.com/python/cpython/commit/626bff856840f471e98ec627043f780c111a063d -- __

[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-25 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +9429 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-25 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +9430 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-25 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +9431 stage: needs patch -> patch review ___ Python tracker ___ ___ Py

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-25 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I have proposed a PR. -- keywords: -patch nosy: +matrixise stage: patch review -> needs patch ___ Python tracker ___ ___

[issue33533] Provide an async-generator version of as_completed

2018-10-25 Thread Michael DePalatis
Michael DePalatis added the comment: Is there any progress on this? I was thinking the exact same thing regarding the backwards-compatible approach and would like to work on it if no one else is. -- nosy: +mivade ___ Python tracker

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: -9424 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35068] [2.7] Possible crashes due to incorrect error handling in pyexpat.c

2018-10-25 Thread Zackery Spytz
Change by Zackery Spytz : -- components: Extension Modules nosy: ZackerySpytz priority: normal severity: normal status: open title: [2.7] Possible crashes due to incorrect error handling in pyexpat.c type: crash versions: Python 2.7 ___ Python tracke

[issue35068] [2.7] Possible crashes due to incorrect error handling in pyexpat.c

2018-10-25 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +9432 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue35068] [2.7] Possible crashes due to incorrect error handling in pyexpat.c

2018-10-25 Thread Zackery Spytz
New submission from Zackery Spytz : The attached PR fixes several error handling bugs in pyexpat.c. -- ___ Python tracker ___ ___ Py

[issue34160] ElementTree not preserving attribute order

2018-10-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Consider this as a feature request. It is perfectly reasonable for a user to want to generate specific XML output and to want to control the order that the attributes are listed. It is perfectly reasonable for the API to preserve the order that the user

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Eric V. Smith
Eric V. Smith added the comment: I think it would be a good idea to make this more consistent. We should run through a multi-release deprecation cycle, since it might break existing, working code. And we could only start that in 3.8. -- nosy: +eric.smith versions: +Python 3.8 -Python

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Michael Saah
Michael Saah added the comment: Ok, seems reasonable. What branch would I submit a PR against? On Thu, Oct 25, 2018 at 1:11 PM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > I think it would be a good idea to make this more consistent. We should > run through a multi-release

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am not sure time.strftime("%") should raise an error. There is an explicit test case and it's mentioned as platform dependent in the comment to raise a ValueError or succeed. So I don't know if it should be changed despite the inconsistency and

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Eric V. Smith
Eric V. Smith added the comment: Hmm, if there's a test for this, then that does complicate the decision. Is this behavior documented anywhere? If so, then we shouldn't change it. If we do decide to go forward with a change, it should be in the master branch, which will become 3.8.

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Eric V. Smith
Eric V. Smith added the comment: After a little more thinking: maybe we should just document this behavior, make it official, and not change it. -- ___ Python tracker ___ ___

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Michael Saah
Michael Saah added the comment: >From a pure usability standpoint I'd prefer for datetime to match the time behavior you're demonstrating, that is to not fail on a dangling %. Of course I defer to the dev team on this, but I want to make clear where I'm coming from. On Thu, Oct 25, 2018 at 1:

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Change by Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) : -- nosy: +thatiparthy ___ Python tracker ___ ___ Python-bugs-li

[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-25 Thread Steve Dower
Steve Dower added the comment: New changeset a7ffb663953bc84452af1e5f4089359d54e226b5 by Steve Dower in branch '3.7': [3.7] bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082) https://github.com/python/cpython/commit/a7ffb663953bc84452af1e5f4089359d54e226b5 -- ___

[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-25 Thread Steve Dower
Steve Dower added the comment: New changeset 4aa1fda7069642c21c1ee570c4ba2a657e5e by Steve Dower in branch '3.6': bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082) https://github.com/python/cpython/commit/4aa1fda7069642c21c1ee570c4ba2a657e5e -- _

[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-25 Thread Steve Dower
Steve Dower added the comment: Thanks, Tim! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34145] uuid3 and uuid5 hard to use portably between Python 2 and 3

2018-10-25 Thread Braden Groom
Change by Braden Groom : -- keywords: +patch pull_requests: +9433 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Michael: I understand the inconsistency but since there is a test that says ValueError is platform dependent then making it as an intentional error there might be breakage. I am not against changing this but if it's done then it should be done wit

[issue34145] uuid3 and uuid5 hard to use portably between Python 2 and 3

2018-10-25 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Tal Einat
Tal Einat added the comment: The test code should fail with the current, unfixed code, due to the bug described here. You will need to: 1. figure out which conditions will trigger the wrong behavior 2. set up a scenario where you can detect whether the behavior is correct 3. code this as a n

[issue33710] Deprecate gettext.lgettext()

2018-10-25 Thread Braden Groom
Change by Braden Groom : -- nosy: +bradengroom ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue33710] Deprecate gettext.lgettext()

2018-10-25 Thread Braden Groom
Braden Groom added the comment: What's the process for deprecating functions? Do we just start by adding a note in the docs? -- ___ Python tracker ___ ___

[issue34160] ElementTree not preserving attribute order

2018-10-25 Thread Tal Einat
Tal Einat added the comment: Thanks for the clarification, Raymond. I've spent a few minutes searching for uses of dump(), and have only come up with uses for debugging or printing helpful info in command line tools. So, it seems that changing this as suggested wouldn't break much existing

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread James Hewitt
New submission from James Hewitt : Having 'import logging.config' in an if statement in a function causes a namespace issue, despite the fact that the import is not reached. Example code: --- #!/usr/bin/env python3 # Test weird import bug import logging config = {} config['log'] = {} conf

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Could you share a pastebin? Thank you > Le 25 oct. 2018 à 21:28, James Hewitt a écrit : > > > New submission from James Hewitt : > > Having 'import logging.config' in an if statement in a function causes a > namespace issue, despite the fact that the impo

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread James Hewitt
James Hewitt added the comment: Sure, it's at https://pastebin.com/L1RMPD7K -James On 10/25/2018 12:30 PM, Stéphane Wirtel wrote: > > Stéphane Wirtel added the comment: > > Could you share a pastebin? Thank you > >> Le 25 oct. 2018 à 21:28, James Hewitt a écrit : >> >> >> New submission f

[issue29341] Missing accepting path-like object in docstrings of os module functions

2018-10-25 Thread Luna Chen
Change by Luna Chen : -- keywords: +patch pull_requests: +9434 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-

[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-25 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- title: test_posix -> test_posix fails on macOS 10.14 Mojave ___ Python tracker ___ ___ Python-bugs-li

[issue35070] test_posix

2018-10-25 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : It looks like macOS 10.14 Mojave has changed the return value for getgroups(). On 10.13 it returns the set of GIDs give by `id -G` but afaict on 10.14 it returns only the primary GID. $ python3 -c "import os; print(os.getgroups())" [101] $ id -G 101 503

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Michael Saah
Michael Saah added the comment: Did a little digging. Seems that there are two versions of the datetime module, a C version (looks like an accelerator module) and a Py version. Both define a wrap_strftime function that replace %z, %Z and %f format codes before handing off to the timemodule.c c

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is expected behaviour: import is a form of assignment. "import logging", like "logging = 1", tells the compiler to treat logging as a local variable (unless you declare logging as global). As the exception says, you are trying to access the logging lo

[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-25 Thread Ned Deily
Ned Deily added the comment: Hmm, I'm not seeing that behavior with either a freshly-built top of master 3.8 or with the python.org 3.7.1. $ ./python -c "import os;print(os.getgroups())" [20, 12, 61, 79, 80, 81, 98, 33, 100, 204, 250, 395, 398, 399] $ id -G 20 12 61 79 80 81 98 33 100 204 25

[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-25 Thread Ned Deily
Ned Deily added the comment: $ sw_vers ProductName:Mac OS X ProductVersion: 10.14 BuildVersion: 18A391 -- ___ Python tracker ___

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: Stéphane, I'm curious why you asked for a pastebin when James already provided the code right here in the tracker? (Your email even included a copy of that code.) Why split the information into another website? -- ___

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: now when I am running test_minidom.py for both 1,2 1: e._call_user_data_handler(operation, n, entity) 2: n._call_user_data_handler(operation, n, notation) I am receiving the same following result. FAIL: testRemoveAttributeNode (__main__.MinidomTest)

[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Seems to fail for me with every version of Python 3 on Mojave. In master, it’s test_getgroups(). > Ned Deily added the comment: > > $ sw_vers > ProductName: Mac OS X > ProductVersion: 10.14 > BuildVersion: 18A391 Mine is exactly the same.

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread James Hewitt
James Hewitt added the comment: I don't quite follow... the 'import logging.config' statement should never be executed, and if it is commented out the program works fine as written. It's as if the mere presence of the statement in the code causes 'logging' to be shadowed inside the functio

[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-25 Thread Ned Deily
Ned Deily added the comment: OK. When you asy "every version of Python 3", are those all versions you've built yourself? If so, what ./configure arguments do you use? -- ___ Python tracker

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Tal Einat
Tal Einat added the comment: Shivank, your last comment is unclear. Are you asking a question or just reporting some progress? -- ___ Python tracker ___ _

[issue35071] Canot send real string from c api to module (corrupted string)

2018-10-25 Thread Yhojann Aguilera
New submission from Yhojann Aguilera : The functios like as PyUnicode_FromString use a printf format in char array argument. Example: PyUnicode_FromString("a%22b"); in module interprete the %22 as 22 blank spaces. A double quote in module add a backslash. Poc: Y try send a string from c++ to

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: Oh Sorry, it was like was more like a question. running test_minidom.py is giving an error for both (1 and 2), i am not sure even if "testRemoveAttributeNode (__main__.MinidomTest)" is related to _clone_node or not. should i first try solve for this error? o

  1   2   >