[issue27637] int.to_bytes(-1, ...) should automatically choose required count of bytes

2021-10-04 Thread Lorenz Panny
Lorenz Panny added the comment: I would like to express my support for making length=None to automatically use the minimal possible length. It's true that this will rarely be needed in production-grade serialization code, but this functionality is worth its weight in gold for qu

[issue43388] shutil._fastcopy_sendfile() makes wrong (?) assumption about sendfile() return value

2021-07-05 Thread Lorenz Hüdepohl
Lorenz Hüdepohl added the comment: Sure, as written it would. As I said: Error handling etc. left out for clarity, just to point out the new structure. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43388] shutil._fastcopy_sendfile() makes wrong (?) assumption about sendfile() return value

2021-03-03 Thread Lorenz Hüdepohl
New submission from Lorenz Hüdepohl : Since version 3.8, the shutil.copyfile() function tries to make use of os.sendfile(). Currently, this is done in a loop that aborts as soon as sendfile() returns 0, as it is assumed that this signifies the end of the file. The problem: the return value of

[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-09-28 Thread Lorenz Mende
Change by Lorenz Mende : -- pull_requests: +16036 pull_request: https://github.com/python/cpython/pull/16456 ___ Python tracker <https://bugs.python.org/issue36

[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-08-25 Thread Lorenz Mende
Change by Lorenz Mende : -- keywords: +patch pull_requests: +15175 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15488 ___ Python tracker <https://bugs.python.org/issu

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-06-09 Thread Lorenz Mende
Lorenz Mende added the comment: Did some minor changes with win_utils. Encoding changed to 'oem'. @heckad: does this bugfix work for u? @all: please verify working of the changes with different localizations. thx -- Added file: https://bugs.python.org/file48406/wi

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-06-09 Thread Lorenz Mende
Change by Lorenz Mende : Removed file: https://bugs.python.org/file48285/win_utils.py ___ Python tracker <https://bugs.python.org/issue36670> ___ ___ Python-bugs-list m

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-04-24 Thread Lorenz Mende
Lorenz Mende added the comment: Sorry, was off some days. I tried to decode the output with mbcs, solves the issue partly - the counter name is still wrong. Was able to pick the localization specific counter name from registry and use it for the typeperf. But the tests fail after several

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-04-19 Thread Lorenz Mende
Lorenz Mende added the comment: Hi Ammar, you are correct. typeperf returns: P:\Repos\CPython\cpython>typeperf "\System\Prozessor-Warteschlangenlänge" -si 1 "(PDH-CSV 4.0)","\\ZERO\System\Prozessor-Warteschlangenlänge" "04/19/2019 19:09:14.510",&qu

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-04-19 Thread Lorenz Mende
Change by Lorenz Mende : -- nosy: -ammar2 ___ Python tracker <https://bugs.python.org/issue36670> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-04-19 Thread Lorenz Mende
Change by Lorenz Mende : -- nosy: +ammar2 ___ Python tracker <https://bugs.python.org/issue36670> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36670] test suite broken due to cpu usage feature on win 10/ german

2019-04-19 Thread Lorenz Mende
New submission from Lorenz Mende : The test suite fails with the first tests (I assume 1st call of getloadavg of WindowsLoadTracker). Traceback (most recent call last): File "P:\Repos\CPython\cpython\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_glo

[issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage

2019-04-09 Thread Lorenz Mende
Change by Lorenz Mende : -- pull_requests: +12669 ___ Python tracker <https://bugs.python.org/issue32409> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-09-03 Thread Lorenz Mende
Lorenz Mende added the comment: @jeremy: nice work The fix works for me reproducable, tests run normal now. Why dont you create a PR? Can someone explain why this issue only came up with parallel tests? -- ___ Python tracker <ht

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

2018-09-02 Thread Lorenz Mende
Lorenz Mende added the comment: Issue shall be closed, as no reproduction code is provided. No patch provided and no comments since 2015. -- nosy: +LorenzMende ___ Python tracker <https://bugs.python.org/issue5

[issue23949] Number of elements display in error message is wrong while unpacking in traceback

2018-09-02 Thread Lorenz Mende
Lorenz Mende added the comment: This issue shall be closed, as the solution is already on master with 4171bbe687904582329c7977d571686953275b45. -- nosy: +LorenzMende ___ Python tracker <https://bugs.python.org/issue23

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2018-09-02 Thread Lorenz Mende
Lorenz Mende added the comment: I want to bring this issue up again. As the others correctly stated, either the documentation or the implementation of Decimal 'g' formatting is incorrect. For floats the implementation suits the docu: >>> '{:g}'.format(0.1) &

[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-09-01 Thread Lorenz Mende
Lorenz Mende added the comment: I was able to reproduce the issue with Win 10, current cpython @master. All sequential test runs are good. With parallel execution a race condition comes up, as Victor already mentioned. I was able to track the issue to the teardown function of the TestCase In

[issue25094] [EASY][Windows] test_tools fails on Windows when passing

2018-07-21 Thread Lorenz Mende
Lorenz Mende added the comment: Approving the behaviour on 3.6.5 and fresh cpython-built @master: >From the docs: test_sundry "contains extremely basic regression tests... which >don't have separate tests of their own". IMHO 2to3 can be added to the whitelist of test_su

[issue34144] venv activate.bat reset codepage fails on windows 10

2018-07-18 Thread Lorenz Mende
Change by Lorenz Mende : -- keywords: +patch pull_requests: +7857 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34144> ___ ___ Py

[issue34144] venv activate.bat reset codepage fails on windows 10

2018-07-18 Thread Lorenz Mende
New submission from Lorenz Mende : environment: Windows 10 Pro German/ 1803 cpython @master When running the venv activate.bat the script fails to reset the codepage to the stored. # Parameterformat falsch - 65001. It seems that version 1803 brought a small change to the output of chcp.com

[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-30 Thread Lorenz Mende
Lorenz Mende added the comment: I confirm the issue too. I am running the tests on a win 10 Ver 1709, clean build. Most likely the issue is caused by the changes from commit fa9a502a387a26ba116840d35ae4a30f672e78ad at test.support.script_helper The function in test was altered to support a

[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-30 Thread Lorenz Mende
Change by Lorenz Mende : -- keywords: +patch pull_requests: +7643 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32942> ___ ___ Py

[issue22143] rlcompleter.Completer has duplicate matches

2015-02-22 Thread Lorenz Quack
Lorenz Quack added the comment: sorry it took so long but my contributor agreement is now signed. Do you want me to write a patch with the results sorted? If so, should I also change the docs to reflect that the results are sorted? This would then also affect other implementations because they

[issue22141] rlcompleter.Completer matches too much

2015-02-22 Thread Lorenz Quack
Lorenz Quack added the comment: sorry it took so long but the contributor agreement is now signed. -- ___ Python tracker <http://bugs.python.org/issue22

[issue22143] rlcompleter.Completer has duplicate matches

2014-10-31 Thread Lorenz Quack
Lorenz Quack added the comment: I couldn't find anything concerning order in the docs so I didn't see any reason the have them sorted. I'm not opposed to sorting them. I guess you could call me +0 on returning sorted(set(matches)) -- ___

[issue22772] doc error in __ifloordiv__ and __itruediv__

2014-10-31 Thread Lorenz Quack
New submission from Lorenz Quack: the doc string of __itruediv__ and __ifloordiv__ represent the operator as x/y and x//y respectively. This is obviously false and should be x/=y and x//=y patch attached -- assignee: docs@python components: Documentation files: inplace_div_doc.patch

[issue22143] rlcompleter.Completer has duplicate matches

2014-10-30 Thread Lorenz Quack
Lorenz Quack added the comment: Thanks for reviewing! test now use assertIn and assertIsNone as suggested PS: My Contributors Agreement is in progress. Just emailed the PSF with some question (but I intend to sign it) -- Added file: http://bugs.python.org/file37074/rlcompleter_22143

[issue22143] rlcompleter.Completer has duplicate matches

2014-10-29 Thread Lorenz Quack
Lorenz Quack added the comment: Hi, here finally the updated patch with test case. It depends on and should be applied after the patch included in issue22141. This patch does changes two things: 1) completions are now unique 2) completions are now in no specific order I had to touch some

[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack
Changes by Lorenz Quack : Added file: http://bugs.python.org/file37064/rlcompleter_22141.patch ___ Python tracker <http://bugs.python.org/issue22141> ___ ___ Python-bug

[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack
Changes by Lorenz Quack : Removed file: http://bugs.python.org/file37063/rlcompleter_22141.patch ___ Python tracker <http://bugs.python.org/issue22141> ___ ___ Python-bug

[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack
Lorenz Quack added the comment: sorry for the delay but here is a new patch with a test. I changed the strategy for fixing the bug because the dealing with the opening parenthesis became to complicated. So, now I simply check whether the match actually startswith the search phrase before

[issue22141] rlcompleter.Completer matches too much

2014-09-26 Thread Lorenz Quack
Lorenz Quack added the comment: Oops! tests sound like a good Idea. I realized my "fix" doesn't work. I had not noticed this before because in my application I had already implemented a workaround :/ The problem with catching the trailing parenthesis is that the group then does

[issue22141] rlcompleter.Completer matches too much

2014-08-05 Thread Lorenz Quack
Lorenz Quack added the comment: attached the mini patch changing the regular expression in the proposed way -- keywords: +patch Added file: http://bugs.python.org/file36269/rlcompleter.diff ___ Python tracker <http://bugs.python.org/issue22

[issue22143] rlcompleter.Completer has duplicate matches

2014-08-05 Thread Lorenz Quack
New submission from Lorenz Quack: Example: >>> import rlcompleter >>> completer = rlcompleter.Completer() >>> class A(object): ... foo = None >>> class B(A): ... pass >>> b = B() >>> print([completer.complete("b.foo", i

[issue22141] rlcompleter.Completer matches too much

2014-08-05 Thread Lorenz Quack
New submission from Lorenz Quack: Example: >>> completer = rlcompleter.Completer() >>> class A(object): ... def foo(): pass ... def foobar(): pass >>> completer.complete("A.foo(", 0) 'A.foo(' >>> completer.complete("A.foo(

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2013-08-02 Thread Lorenz Huedepohl
Lorenz Huedepohl added the comment: > If that's a problem, then the user can raise the RLIMIT_NOFILE. This can only be raised (above the hard limit) by a privileged process, so I would be out of luck there, as I could not convince my sysadmins to raise this further. Anyway, I don'

[issue11598] missing afxres.h error when building bdist_wininst in Visual Studio 2008 Express

2011-03-18 Thread Lorenz
Lorenz added the comment: replace the "afxres.h" by the following lines and then it builds: #include #ifndef IDC_STATIC #define IDC_STATIC (-1) #endif but the problem is, that the 'install.rc' file is generated. Unfortunately I do not know how to solve the root cau

[issue11596] import error in test_fileinput.py when bz2 not installed (windows)

2011-03-18 Thread Lorenz
New submission from Lorenz : there is an ImportError when there is no bz2 lib and the test_fileinput is running. -- components: Tests files: check_bz2_lib_available.diff keywords: patch messages: 131338 nosy: DaMutz priority: normal severity: normal status: open title: import error in

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-12 Thread Lorenz Huedepohl
Lorenz Huedepohl added the comment: Thanks SilentGhost, you were much faster than me :) I agree with Antoine, that the dup() is unexpected: It cost me some time to figure out where these additonal file descriptors originated from. One of the powers of mmap() is, that you do not need one, so

[issue10897] UNIX mmap unnecessarily dup() file descriptor

2011-01-12 Thread Lorenz Huedepohl
New submission from Lorenz Huedepohl : The UNIX mmap version in Modules/mmapmodule.c makes a call to dup() to duplicate the file descriptor that is passed for creating the memory-mapped region. This way, I frequently hit the limit for the number of open file handles while creating

[issue10247] mold builder

2010-10-30 Thread Lorenz Quack
New submission from Lorenz Quack : RV Plastics is your end to end partner for all your moulds and Injection Moulding requirements. Founded in 2003, RV Plastics dedicates itself to the plastic industry, exporting Plastic injection moulds and molded Components to customers spread over 20

[issue8113] PyUnicode_AsUnicode doesn't check for NULL pointer

2010-03-11 Thread Lorenz Quack
Lorenz Quack added the comment: Thanks for the fast replies. I used to groups some Python calls together and check in the end if any of them failed in one exception handling block. I will now check every call individually. I will open a new bug for documentation fixes where there is now

[issue8113] PyUnicode_AsUnicode doesn't check for NULL pointer

2010-03-10 Thread Lorenz Quack
Lorenz Quack added the comment: I thought that the CamelCase C-functions like PyUnicode_AsUnicode would check for errors like this and if you don't want error checking you can use the capitalized versions like PyUnicode_AS_UNICODE. I just looked at the code for PyFloat_AsDouble and it c

[issue8113] PyUnicode_AsUnicode doesn't check for NULL pointer

2010-03-10 Thread Lorenz Quack
New submission from Lorenz Quack : The C-API function "PyUnicode_AsUnicode(PyObject *unicode)" does not check the argument for NULL pointers. It passes it directly to the macro "PyUnicode_Check(op)" which then crashes when trying to access "Py_TYPE(op)". I marke

[issue7460] extended slicing not sufficiently covered in docs

2010-03-05 Thread Lorenz Quack
Lorenz Quack added the comment: When I wrote this bug report I was mainly thinking about the C-API documentation which doesn't mention extended slicing at all. Since the C-API isn't mentioned in the other bug I don't think it's a duplicate but they could maybe be m

[issue7460] extended slicing not sufficiently covered in docs

2009-12-08 Thread Lorenz Quack
New submission from Lorenz Quack : I find the documentation regarding extended slicing to be lacking. To be honest I couldn't find any documentation about it. The only - and quite good - source of information I found was [1]. Maybe I didn't search enough. If so I would appreciate a l

[issue6145] distutils.extension.read_setup_file misinterprets -C switch

2009-05-29 Thread Lorenz Quack
New submission from Lorenz Quack : I'm not sure if this is a bug or some weird backward-compatible behaviour... In "distutil.extension.read_setup_file" it checks for the "-C" switch but then appends "word" instead of "value" So if you pass &qu

[issue1944] Documentation for PyUnicode_AsString (et al.) missing.

2009-04-18 Thread Lorenz Quack
Lorenz Quack added the comment: Ok, here is my shot at a patch for at least some of the undocumented functions. Namely the following functions are being documented in the patch: PyUnicode_FromFormat PyUnicode_FromFormatV PyUnicode_FromString PyUnicode_FromStringAndSize

[issue1944] Documentation for PyUnicode_AsString (et al.) missing.

2009-04-18 Thread Lorenz Quack
Lorenz Quack added the comment: In addition to the above mentioned functions I found these to be undocumented: PyUnicode_DecodeUTF7 PyUnicode_DecodeUTF7Stateful PyUnicode_EncodeDecimal PyUnicode_EncodeUTF7 PyUnicode_FromFormat PyUnicode_FromString PyUnicode_FromStringAndSize

[issue5488] nb_inplace_divide slot is missing in docs

2009-03-14 Thread Lorenz Quack
New submission from Lorenz Quack : http://docs.python.org/c-api/typeobj.html#PyNumberMethods lists the slots in the PyNumberMethods struct used to implement the Number Protocol for extension types. The entry for "binaryfunc nb_inplace_divide;" is missing from this listing. It belon

[issue5443] trivial typo in itertools documentation

2009-03-10 Thread Lorenz Quack
Lorenz Quack added the comment: FWIW here is the patch. It is against r70267 of the trunk -- keywords: +patch message_count: 3.0 -> 4.0 Added file: http://bugs.python.org/file13291/itertools.patch ___ Python tracker <http://bugs.pyth

[issue5443] trivial typo in itertools documentation

2009-03-10 Thread Lorenz Quack
Lorenz Quack added the comment: Thanks for fixing. But I'm afraid you missed the second typo in this Bug. It's the same thing one line beneath the one you fixed. next time I'll attach a patch. I promise. -- message_count: 2.0 -> 3.0 stat

[issue5443] trivial typo in itertools documentation

2009-03-08 Thread Lorenz Quack
New submission from Lorenz Quack : In the docs: "http://docs.python.org/library/itertools.html#module-itertools"; In the table: "Iterators terminating on the shortest input sequence:" In row: "imap()" and "starmap()" In the column: &qu

[issue2650] re.escape should not escape underscore

2008-04-28 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: >> The loop in escape should really use enumerate >> instead of "for i in range(len(pattern))". > >It needs i to edit s[i]. enumerate(iterable) returns a tuple for each element in iterable containing th

[issue2250] rlcompleter raises Exception on bad input

2008-04-18 Thread Lorenz Quack
Changes by Lorenz Quack <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10054/rlcompleter.rst.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2250] rlcompleter raises Exception on bad input

2008-04-18 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: In the last patch I used the wrong ticks. I hope it's fine like this. Added file: http://bugs.python.org/file10055/rlcompleter.rst.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2250] rlcompleter raises Exception on bad input

2008-04-18 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: I attached a patch for the docs. It now states that the rlcompleter.Completer will catch and silence all exceptions raised by evaluating the expression passed to complete() Added file: http://bugs.python.org/file10054/rlcompleter.rs

[issue2250] rlcompleter raises Exception on bad input

2008-04-04 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: I confirmed that the rlcompleter can raise a SyntaxError on bad input. Upon further investigation I found that a ReferenceError could also be raised. I didn't check on other Exceptions. I attached a new version of the patch where

[issue2250] rlcompleter raises Exception on bad input

2008-03-26 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: I was thinking that the code in question could maybe also raise other exceptions. too bad I´m on vacation and can´t try this out myself. I believe the regular expression also matches something like import rlcompleter rlcompleter.Com

[issue2250] rlcompleter raises Exception on bad input

2008-03-24 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: I have no idea what or who NAS is but comments are always welcome :) concerning the documentation: I´ve never done it before but there is a first time for everything, right? I´m currently on vacation so I won´t look into it for at

[issue2250] rlcompleter raises Exception on bad input

2008-03-07 Thread Lorenz Quack
New submission from Lorenz Quack: in line 130 rlcompleter calls eval on the first part (before the last dot) of the input text. if that part is not valid it will raise an exception which is likely to crash a calling application. example 1: == import rlcompleter rlcompleter.Completer

[issue2220] bug in rlcompleter

2008-03-03 Thread Lorenz Quack
Lorenz Quack added the comment: Some more information: the dot in the example causes complete() to call self.attr_matches(text) which in turn performes the following call re.match(r"(\w+(\.\w+)*)\.(\w*)", text) and return None if there is no match. the complete method unconditionall

[issue2220] bug in rlcompleter

2008-03-03 Thread Lorenz Quack
New submission from Lorenz Quack: The following code would raise a TypeError: >>> rlcompleter.Completer().complete("print self.foo", 0) with this fix it will just return None -- components: Library (Lib) files: rlcompleter.patch keywords: patch messages: 63208 nosy: