[issue25461] Unclear language (the word ineffective) in the documentation for os.walk

2019-02-13 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +11867 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35500] Align expected and actual calls on mock.assert_called_with error message

2019-02-13 Thread Tal Einat
Tal Einat added the comment: Susan, I agree that similarly improving the failure message for assert_called_with would be good. I find the final "Not called" line unclear, though. Perhaps something like the following: AssertionError: expected call not found. Expected: mock(1, 2, 3, 4) Actual

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Joannah Nanjekye
New submission from Joannah Nanjekye : In a discussion to fix https://bugs.python.org/issue35951, @giampaolo.rodola pointed out that there are no tests for os.renames() I have opened this issue to track this. -- messages: 335395 nosy: nanjekyejoannah priority: normal severity: normal

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I have just tried with 3.7.2 and I don't get your error. Python 3.7.2 (default, Jan 16 2019, 19:49:22) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import shutil >>> import os >>> s

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is this Windows specific? I am unable to reproduce this on Mac and Ubuntu with master and Python 3.7 . ➜ cpython git:(master) ./python.exe -c 'import os, shutil; shutil.make_archive("foo...bar..", "zip", os.path.abspath("./Tools"))' ➜ cpython git:

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-13 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: @giampaolo.rodola thanks for insight on tests. I dint catch that at all :) I am working on tests for os.renames() I opened an issue to track that here : https://bugs.python.org/issue35982. IMHO, I think we need to improve the current behavior. This discus

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: good catch -- nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I am working on this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: ok, I was working on this issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: You can check this branch, but I have not created the PR because you were working on this issue. https://github.com/matrixise/cpython/commit/3f23deceef423b038273d28080d4aaee664b6bc9 -- ___ Python tracker

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +11868 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: ok, I have created a PR, you can comment it and we can work together on this PR. Have a nice day, Stéphane -- stage: patch review -> ___ Python tracker __

[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-02-13 Thread Olivier Grisel
Olivier Grisel added the comment: Adding such a hook would make it possible to reimplement cloudpickle.CloudPickler by deriving from the fast _pickle.Pickler class (instead of the slow pickle._Pickler as done currently). This would mean rewriting most of the CloudPickler method to only rely

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-02-13 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : When designing an extension type subclassing an existing type, it makes sense to call the tp_dealloc of the base class from the tp_dealloc of the subclass. Now suppose that I'm subclassing "list" which uses the trashcan mechanism. Then it can happen that t

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Jeroen, could you share your example? I am learning the C-API of Python and this example could be interesting. -- nosy: +matrixise ___ Python tracker __

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Giampaolo, I added you to this issue, about the tests, I have created a very simple test but I would like to know your advice. Thank you, -- nosy: +giampaolo.rodola ___ Python tracker

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : The reafleak buildbots have detected memory block leaks in test__xxsubinterpreters: Ran 112 tests in 4.721s OK (skipped=5) . test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=10 1 test failed again: test__xxsubinterpreters == Tests resu

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > Bisecting shows 16f842da3c862d76a1177bd8ef9579703c24fa5a is the first bad > commit. This was introduced in PR11822. That's issue bpo-35972. -- ___ Python tracker ___

[issue35972] _xxsubinterpreters: channel_send() may truncate ints on 32-bit platforms

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 16f842da3c862d76a1177bd8ef9579703c24fa5a by Eric Snow (Alexey > Izbyshev) in branch 'master': > bpo-35972: _xxsubinterpreters: Fix potential integer truncation on 32-bit in > channel_send() (gh-11822) It seems like this change introduced a re

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +izbyshev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: $ ./python -m test.bisect_cmd -R 3:3 test__xxsubinterpreters found: test.test__xxsubinterpreters.ShareableTypeTests.test_non_shareable_int -- ___ Python tracker _

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: I'm mentoring Alexey Izbyshev. @Alexey: Do you want to work on this issue? -- ___ Python tracker ___ ___

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: If you have created a PR, that is fine. Am not able to look now though may be later. -- ___ Python tracker ___ ___

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I'll look into it later today. An obvious guess is that my test simply exposed an existing leak because the exception code path wasn't tested before AFAIK, but I need to check it. -- assignee: -> izbyshev ___ Py

[issue18283] shutil.which() should support bytes

2019-02-13 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue18283] shutil.which() should support bytes

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5680f6546dcda550ad70eefa0a5ebf1375303307 by Victor Stinner (Cheryl Sabella) in branch 'master': bpo-18283: Add support for bytes to shutil.which (GH-11818) https://github.com/python/cpython/commit/5680f6546dcda550ad70eefa0a5ebf1375303307 -

[issue35961] test_slice: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset dcb68f47f74b0cc8a1896d4a4c5a6b83c0bbeeae by Victor Stinner in branch 'master': bpo-35961: Fix a crash in slice_richcompare() (GH-11830) https://github.com/python/cpython/commit/dcb68f47f74b0cc8a1896d4a4c5a6b83c0bbeeae -- _

[issue35961] test_slice: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

2019-02-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +11869 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35961] test_slice: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7 is not affected: it doesn't have the slice_richcompare() function, but the old slice_compare() implementation. Python 3.6 is affected but doesn't accept bugfixes anymore: https://devguide.python.org/#status-of-python-branches This bug is 13 years

[issue35961] test_slice: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > This bug is 13 years old, I don't think that it's really useful to fix it. It > mostly impact test_slice and only test_slice. To be clear, I compiled Python 3.6 in release mode and applied test_slice patch of msg335333: no crash after 1500 runs. The bug is

[issue35810] Object Initialization does not incref Heap-allocated Types

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > * Should I write something up in python-dev/Discourse? Please open a thread on python-dev. The purpose is not really to ask if it's worth it, but more to communicate properly on backward incompatible changes. > * Do I need to update the PY_VERSION_HEX? No

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > I'll look into it later today. An obvious guess is that my test simply > exposed an existing leak because the exception code path wasn't tested before > AFAIK, but I need to check it. Right. I don't think that your change introduced a regression.

[issue35961] test_slice: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

2019-02-13 Thread miss-islington
miss-islington added the comment: New changeset a78251e2d6de37f46c230be924032a87df730761 by Miss Islington (bot) in branch '3.7': bpo-35961: Fix a crash in slice_richcompare() (GH-11830) https://github.com/python/cpython/commit/a78251e2d6de37f46c230be924032a87df730761 -- nosy: +miss

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Could be the case that it's windows specific. For "foo...bar..." abspath returns "foo...bar..." in Python on Mac. I don't have access to Windows but checking this on dotnet fiddle with C# which I hope uses Windows full path strips out the leading d

[issue35961] test_slice: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: Thanks everyone for helping on the analysis and for reviews obviously. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Lukas J
New submission from Lukas J : When converting an email.message.Message with the policy set to email.policy.EmailPolicy with all default settings, I eventually end up with this exception: File "/usr/lib/python3.7/email/_header_value_parser.py", line 2727, in _fold_as_ew first_part = t

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems to be same as issue33524 ? -- nosy: +xtreak ___ Python tracker ___ ___ Pytho

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Lukas J
Lukas J added the comment: Indeed it is. Sorry I didn't find it before. So it seems that changing float("+inf") to sys.maxsize would solve the problem? I've tried it in an interactive shell: >>> a = "asd"; import sys >>> a[:sys.maxsize] 'asd' --

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-13 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +11870 stage: needs patch -> patch review ___ Python tracker ___ ___ P

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi, I have created the PR for Maxwell. After tomorrow, if we have no news from him, I propose to you to update/comment the PR. Of course, I will add a co-authored-by field in the commit. -- keywords: -patch nosy: +matrixise stage: patch review -> n

[issue35986] print() documentation typo?

2019-02-13 Thread 李笑来
New submission from 李笑来 : print(), default value sep, should be ' '(one space), rather than an empty str, ''. -- assignee: docs@python components: Documentation messages: 335428 nosy: docs@python, 李笑来 priority: normal severity: normal status: open title: print() documentation typo? type

[issue35986] print() documentation typo?

2019-02-13 Thread 李笑来
李笑来 added the comment: sep argument default value should be ' '(a space), rather than ''(an empty string). -- resolution: -> remind ___ Python tracker ___ ___

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Could you share your example? Thank you -- nosy: +matrixise ___ Python tracker ___ ___ Python-bu

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Lukas J
Lukas J added the comment: Minimal example: import email.policy import email.mime.text responsehtml = "somehtmlbody" msg = email.mime.text.MIMEText(responsehtml, "html", policy=email.policy.EmailPolicy()) msg["to"] = "t...@example.com" msg["cc"] = "äöü " msg["From"] = "f...@bar.com" msg["S

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the confirmation. I would propose closing this as a duplicate. The PR on the other issue might fix your issue and is just waiting on a NEWS entry. -- ___ Python tracker

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Lukas J
Lukas J added the comment: Ok thank you! -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35986] print() documentation typo?

2019-02-13 Thread Steven D'Aprano
Steven D'Aprano added the comment: Which documentation are you referring to? The docstring says: print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False) which is clearly a space. The docs here: https://docs.python.org/3/library/functions.html#print say something very similar: p

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Just add the link to the other issue: https://bugs.python.org/issue33524 -- ___ Python tracker ___ __

[issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: See this issue as a duplicata of this one: https://bugs.python.org/issue35985 -- nosy: +matrixise ___ Python tracker ___ ___

[issue35985] Folding tries to slice from 0 to float("+inf") when maxlength is 0

2019-02-13 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- superseder: -> non-ascii characters in headers causes TypeError on email.policy.Policy.fold ___ Python tracker ___ ___

[issue35224] PEP 572: Assignment Expressions

2019-02-13 Thread Miro Hrončok
Miro Hrončok added the comment: PEP 572 is nowhere to be found in https://docs.python.org/3.8/whatsnew/3.8.html Should I open a separate issue for that? -- nosy: +hroncok ___ Python tracker _

[issue35224] PEP 572: Assignment Expressions

2019-02-13 Thread Miro Hrončok
Miro Hrončok added the comment: (I've somehow missed the previous comments about the same, sorry about that.) -- ___ Python tracker ___

[issue35987] Mypy and Asyncio import cannot be skipped

2019-02-13 Thread Samuel GIFFARD
New submission from Samuel GIFFARD : Some modules cannot be found with mypy. And cannot be silenced/skipped by mypy. Have the following 3 files: ## # example1.py from asyncio import BaseEventLoop # Module 'asyncio' has no attribute 'BaseEventLoop' from asyncio imp

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-02-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: The problem is easily reproduced with Cython: cdef class List(list): cdef int deallocated def __dealloc__(self): if self.deallocated: print("Deallocated twice!") self.deallocated = 1 L = None for i in range(10*

[issue35987] Mypy and Asyncio import cannot be skipped

2019-02-13 Thread Samuel GIFFARD
Samuel GIFFARD added the comment: I've created a similar ticket on mypy side: https://github.com/python/mypy/issues/6383 as I'm not sure where this belongs to. -- ___ Python tracker ___

[issue12374] Execution model should explain compile vs definition vs execution time

2019-02-13 Thread Nick Coghlan
Nick Coghlan added the comment: Cheryl has started the conversion process for the old user reference manuscript [1], so I think it makes sense to mark this as "postponed" for now, until we see how far we can get with this more usage-centric level of explanation as a separate project from the

[issue35986] print() documentation typo?

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @steven I have a solution with a css selector if we update the python-docs theme for Sphinx. You can check my screenshot -- nosy: +matrixise Added file: https://bugs.python.org/file48136/print_screenshot.png ___

[issue35987] Mypy and Asyncio import cannot be skipped

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. mypy is not part of stdlib and it seems that typeshed doesn't have BaseEventLoop defined in asyncio.__init__.pyi [0] . Adding it to the import removes the error . I guess this needs to be filed in typeshed. There is an issue

[issue35987] Mypy and Asyncio import cannot be skipped

2019-02-13 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This is not a Python issue, this should be reported on typeshed tracker (but likely a duplicate of the issue mentioned by Karthikeyan). -- resolution: -> third party stage: -> resolved status: open -> closed ___

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-02-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: On windows os.path.abspath("foo...bar..") returns "foo...bar" which is used in shutil.make_archive [0] returning foo...bar.zip. @matrixise , I am reopening this and adding Windows so that this can be confirmed as known behavior and closed. https:/

[issue35988] Python interpreter segfault

2019-02-13 Thread Hinko Kocevar
New submission from Hinko Kocevar : I'm running a tornado server with websockets client. Every now and then the python3.5 crashes, seg faults. I added code tracking (https://stackoverflow.com/questions/2663841/python-tracing-a-segmentation-fault) and this is what I see: line, /usr/lib64/pyth

[issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction

2019-02-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: -Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue35982] Create unit-tests for os.renames()

2019-02-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Assigning this to me. FWIW I created a post on python-dev in order to add a test.support.rmpath() utility function and hopefully cover other os.* functions which may also be untested or not properly tested: https://mail.python.org/pipermail/python-dev/2019

[issue35988] Python interpreter segfault

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > Program received signal SIGPIPE, Broken pipe. SIGPIPE is not a bug, it's a deliberate signal to notice something to your application. You have to ignore SIGPIPE in gdb: (gdb) handle SIGPIPE nostop noprint SignalStop Print Pass to program Des

[issue35988] Python interpreter segfault

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: You can enable faulthandler to get a traceback of your Python theads when a crash occurs: https://pythondev.readthedocs.io/debug_tools.html#get-a-traceback-on-a-crash -- ___ Python tracker

[issue35988] Python interpreter segfault

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > Every now and then the python3.5 crashes, seg faults. Sorry but Python 3.5 no longer accepts bugfixes and has known bugs. http://devguide.python.org/#status-of-python-branches It's time to upgrade your Python! Are you able to reproduce the crash on Python

[issue35224] PEP 572: Assignment Expressions

2019-02-13 Thread Emily Morehouse
Emily Morehouse added the comment: I have a work-in-progress (WIP) documentation branch I've been working on that I'll push up this week to address the following: - Add summary to What's New in Doc/whatsnew/3.8.rst - Add to list of delimiters in Doc/reference/lexical_analysis.rst - Add usage

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-02-13 Thread Eric Snow
Eric Snow added the comment: FWIW, subclassing builtin types is a relatively new thing. There are still a number of lingering (older) implementation details throughout CPython that were written assuming no subclassing. I'd guess that this is one of them. -- nosy: +eric.snow stage:

[issue35988] Python interpreter segfault

2019-02-13 Thread Hinko Kocevar
Hinko Kocevar added the comment: > Are you able to reproduce the crash on Python 3.6 or 3.7? I'm running it under python3.6 as we speak. -- ___ Python tracker ___ ___

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: By "relatively new thing", you mean less than 20 years old? :-) -- ___ Python tracker ___ ___ Pyt

[issue35988] Python interpreter segfault

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > [26194250.314042] Out of memory: Kill process 8399 (python3.6) score 574 or > sacrifice child That's not a bug in Python: your application is using more memory than what is available in the system. -- ___ Pytho

[issue35224] PEP 572: Assignment Expressions

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > If anyone has another area they think the documentation should be updated, > please let me know! If we forget something, it's not an issue: it can be added later! -- ___ Python tracker

[issue35988] Python interpreter segfault

2019-02-13 Thread Hinko Kocevar
Hinko Kocevar added the comment: Using python3.6 now. I've also used the 'handle SIGPIPE nostop noprint' to skip SIGPIPE. Now the interpreter is killed instead: INF 2019-02-13 15:42:19,131 web:2162 log_request - 200 GET /NPM.html (10.0.6.209) 1.10ms [Thread 0x7fffe76eb700 (LWP 8411) exited

[issue35972] _xxsubinterpreters: channel_send() may truncate ints on 32-bit platforms

2019-02-13 Thread Eric Snow
Eric Snow added the comment: ack -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-02-13 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +11871 stage: test needed -> patch review ___ Python tracker ___ ___ P

[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-02-13 Thread John Florian
New submission from John Florian : I wanted a simple is_valid_ipv4_network() function, so I wrote one and a bunch of unit tests where I discovered that I can legally: >>> n = IPv4Network(('192.168.123.234', 12345678)) >>> n IPv4Network('192.168.123.234/12345678') >>> n.prefixlen 12345678 >>> n

[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-02-13 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread Eric Snow
Eric Snow added the comment: Alexey, even though the refleak does not appear to be related to your earlier PR, you are welcome to keep working on this issue. :) If you do then please add me as a reviewer on whatever PR you make. Also, I'd be glad to answer any questions you have about the

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread Eric Snow
Eric Snow added the comment: FYI, the _xxsubinterpreters module serves several purposes. First, it allows us to more thoroughly test the subinterpreter functionality of CPython (doing so via _testembed and _testcapi is messy), effectively in test__xxsubinterpreters. Second, it is the found

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-02-13 Thread Eric Snow
Eric Snow added the comment: On Wed, Feb 13, 2019 at 8:42 AM Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > By "relatively new thing", you mean less than 20 years old? :-) Yeah, looks like it was in the 2.2 release (Dec 2001) for PEP 253. Anyway, I know of several core devs wh

[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: > @Victor, do you see any problems with doing this? It will help simplify > other changes I'm working on. I'm quite sure that they are users of the PyInterpreterState structure outside CPython internals and stdlib, but I expect that the number is quite low.

[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-02-13 Thread SilentGhost
Change by SilentGhost : -- components: +Library (Lib) nosy: +pitrou stage: -> test needed type: -> behavior ___ Python tracker ___ ___

[issue35949] Move PyThreadState into Include/internal/pycore_pystate.h

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: Same ratione than for PyInterpreterState: https://bugs.python.org/issue35886#msg335464 Except that I expect that a few more projects rely on PyThreadState fields. Maybe not. It's hard to guess :-( I mean that I'm ok-ish with the change but it should be care

[issue35907] Unnecessary URL scheme exists to allow file:// reading file in urllib

2019-02-13 Thread Sihoon Lee
Change by Sihoon Lee : -- keywords: +patch pull_requests: +11872 stage: needs patch -> patch review ___ Python tracker ___ ___ Pytho

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-22213. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: PEP 432 will allow to give with fine control on parameters used to initialize Python. Sadly, I failed to agree with Nick Coghlan and Eric Snow on the API. The current implementation (_PyCoreConfig and _PyMainInterpreterConfig) has some flaw (don't separate c

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-13 Thread STINNER Victor
STINNER Victor added the comment: PEP 432 will allow to give with fine control on parameters used to initialize Python. Sadly, I failed to agree with Nick Coghlan and Eric Snow on the API. The current implementation (_PyCoreConfig and _PyMainInterpreterConfig) has some flaw (don't separate c

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-13 Thread Steve Dower
Steve Dower added the comment: That's not a "see also" - it's just a duplicate :) I'll close this one as the other one has been around longer. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Make pyvenv style virtual environments easier to confi

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2019-02-13 Thread Steve Dower
Steve Dower added the comment: I just closed 35706 as a duplicate of this one (the titles are basically identical, which feels like a good hint ;) ) It seems that the disagreement about the design is fundamentally a disagreement between a "quick, painful but complete fix" and "slow, careful

[issue35988] Python interpreter segfault

2019-02-13 Thread Josh Rosenberg
Josh Rosenberg added the comment: "your application is using more memory than what is available in the system." Well, it alone may not be using more memory, but the cumulative usage on the system is "too high" by whatever metric the OOM killer is using (IIRC the default rule is that actual

[issue5038] urrlib2/httplib doesn't reset file position between requests

2019-02-13 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +11873 stage: test needed -> patch review ___ Python tracker ___ ___ Pyt

[issue15753] No-argument super in method with variable arguments raises SystemError

2019-02-13 Thread Josh Rosenberg
Josh Rosenberg added the comment: Moving from pending back to open (not sure what was "pending" about it?). The workaround is viable (and used by Python implemented dict subclasses in the standard library since they must accept **kwargs with arbitrary strings, including self), but it does se

[issue15753] No-argument super in method with variable arguments raises SystemError

2019-02-13 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue35990] ipaddress.IPv4Interface won't accept 2-tuple (address, mask)

2019-02-13 Thread John Florian
New submission from John Florian : The docs say """The meaning of address is as in the constructor of IPv4Network, except that arbitrary host addresses are always accepted.""" However, that doesn't seem to be entirely true: >>> tup1 = ('192.168.123.234', 24) >>> tup2 = ('192.168.123.234', '25

[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-02-13 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +11875 stage: test needed -> patch review ___ Python tracker ___ ___ P

[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I proposed my PR but I prefer a review because in the code of ipaddress, there is a function for the validation of an address with the netmask. Maybe we could use this function and try to refactor/improve the current code. -- nosy: +matrixise __

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-02-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: NOTE: also OrderedDict currently uses trashcan hacking to work around this problem: /* Call the base tp_dealloc(). Since it too uses the trashcan mechanism, * temporarily decrement trash_delete_nesting to prevent triggering it * and putting the

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +11876 stage: test needed -> patch review ___ Python tracker ___ ___

[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-13 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you for your introduction about _xxsubinterpreters, Eric. This particular leak is easy: it's right in _channel_send(). I've submitted a PR. I've also done a quick scan of neighboring code, and it seems there are other leaks as well, e.g.: * PyThread

[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4

2019-02-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: See also https://bugs.python.org/issue35983 for another trashcan-related issue. -- nosy: +jdemeyer ___ Python tracker ___ ___

  1   2   >