[issue46070] _PyImport_FixupExtensionObject() regression causing a crash in subintepreters

2021-12-30 Thread Manuel Reimer
Change by Manuel Reimer : -- nosy: +M-Reimer ___ Python tracker <https://bugs.python.org/issue46070> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45523] Python3 ThreadingHTTPServer fails to send chunked encoded response

2021-10-19 Thread Manuel
New submission from Manuel : I'm implementing an HTTPServer class that produces a response with transfer-encoding chunked mode. I'm sending the chunks as described in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding#chunked_encoding If I send chunks of length <

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Manuel Jacob
Manuel Jacob added the comment: I was running "make all" and I also ran the documentation generator command without an error. However, I tried it again and now it failed the same way as reported. With a debug build, I get "Python/Python-ast.c:231: get_ast_state: Assertion

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Manuel Jacob
Manuel Jacob added the comment: I couldn’t reproduce the problem with a freshly compiled Python 3.9.0rc1 on Arch Linux. Was this ever reproduced on a non-Red Hat system? -- nosy: +mjacob ___ Python tracker <https://bugs.python.org/issue41

[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2020-08-26 Thread Manuel Barkhau
Manuel Barkhau added the comment: This issue cropped up recently in the black project: https://github.com/psf/black/issues/1631 It appears to me that PR 7666 was closed without being merged. I created https://github.com/python/cpython/pull/21971 before I had found this issue

[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2020-08-26 Thread Manuel Barkhau
Change by Manuel Barkhau : -- nosy: +mbarkhau nosy_count: 6.0 -> 7.0 pull_requests: +21079 pull_request: https://github.com/python/cpython/pull/21971 ___ Python tracker <https://bugs.python.org/issu

[issue41221] Output of print() might get truncated in unbuffered mode

2020-07-07 Thread Manuel Jacob
Manuel Jacob added the comment: It’s possible to trigger the problem on Unix with much smaller sizes, e.g. by interrupting the write() with a signal handler (even if the signal handler doesn’t do anything). The following script starts a subprocess doing a 16MiB write and sends a signal

[issue41221] Output of print() might get truncated in unbuffered mode

2020-07-06 Thread Manuel Jacob
Manuel Jacob added the comment: `io.TextIOWrapper.write()` returns the length of the passed string instead of the actually written number of characters. % python -u -c "import sys; print(sys.stdout.write('x'*4294967296), file=sys.stderr)" | wc -c 4294967296 2147479552 So the p

[issue41221] Output of print() might get truncated in unbuffered mode

2020-07-06 Thread Manuel Jacob
Manuel Jacob added the comment: 2147479552 is the 0x7000 bytes limit documented for write() on Linux (source: https://man7.org/linux/man-pages/man2/write.2.html). The limit could be even smaller in other circumstances or other systems. I’m adding Victor Stinner to the nosy list, as he

[issue41221] Output of print() might get truncated in unbuffered mode

2020-07-06 Thread Manuel Jacob
New submission from Manuel Jacob : Without unbuffered mode, it works as expected: % python -c "import sys; sys.stdout.write('x'*4294967296)" | wc -c 4294967296 % python -c "import sys; print('x'*4294967296)" | wc -c 4294967297 With unbuffered mode, writes get tru

[issue41091] Remove recommendation in curses module documentation to initialize LC_ALL and encode strings

2020-06-25 Thread Manuel Jacob
Change by Manuel Jacob : -- keywords: +patch pull_requests: +20319 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21159 ___ Python tracker <https://bugs.python.org/issu

[issue41091] Remove recommendation in curses module documentation to initialize LC_ALL and encode strings

2020-06-23 Thread Manuel Jacob
New submission from Manuel Jacob : The documentation for the curses module (https://docs.python.org/3.9/library/curses.html) has the following note: > Since version 5.4, the ncurses library decides how to interpret non-ASCII > data using the nl_langinfo function. That means that yo

[issue41051] Flush file after warning is written

2020-06-20 Thread Manuel Jacob
Change by Manuel Jacob : -- keywords: +patch pull_requests: +20175 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21000 ___ Python tracker <https://bugs.python.org/issu

[issue41051] Flush file after warning is written

2020-06-20 Thread Manuel Jacob
New submission from Manuel Jacob : Calling warnings.warn() will write to a file, but not flush it. On Python 3.9+, it won’t usually be a problem because the file is most likely stderr, which is always line-buffered. However, on older Python versions or if a different file is used, the current

[issue17110] sys.argv docs should explaining how to handle encoding issues

2020-06-18 Thread Manuel Jacob
Manuel Jacob added the comment: If the encoding supports it, since which Python version do Py_DecodeLocale() and os.fsencode() roundtrip? The background of my question is that Mercurial goes some extra rounds to determine the correct encoding to emulate what Py_EncodeLocale() would do

[issue41012] Some code comments refer to removed initfsencoding()

2020-06-17 Thread Manuel Jacob
New submission from Manuel Jacob : Some code comments refer to initfsencoding(), which was however removed after Python 3.7. -- messages: 371779 nosy: mjacob priority: normal severity: normal status: open title: Some code comments refer to removed initfsencoding

Problems with python383.dll

2020-06-17 Thread Manuel Fernandez - Università
thank you for your help. Best wishes, Manuel Fernandez -- -- https://mail.python.org/mailman/listinfo/python-list

[issue17110] sys.argv docs should explaining how to handle encoding issues

2020-06-17 Thread Manuel Jacob
Manuel Jacob added the comment: The actual startup code uses Py_DecodeLocale() for converting argv from bytes to unicode. Since which Python version is it guaranteed that Py_DecodeLocale() and os.fsencode() roundtrip? -- nosy: +mjacob ___ Python

[issue40983] urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler

2020-06-16 Thread Manuel Jacob
Manuel Jacob added the comment: I’ve created issue40996, which suggests that urllib should fsdecode percent-encoded parts of file URIs on Unix. Since the two tickets are very related and I’d prefer if the issue was solved more generally for the whole module, I close this as a duplicate

[issue40996] urllib should fsdecode percent-encoded parts of file URIs on Unix

2020-06-16 Thread Manuel Jacob
New submission from Manuel Jacob : On Unix, file names are bytes. Python mostly prefers to use unicode for file names. On the Python <-> system boundary, os.fsencode() / os.fsdecode() are used. In URIs, bytes can be percent-encoded. On Unix, most applications pass the percent-decoded

[issue40983] urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler

2020-06-16 Thread Manuel Jacob
Change by Manuel Jacob : -- title: Can’t configure encoding used by urllib.request.url2pathname() -> urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler ___ Python tracker <https:/

[issue40983] Can’t configure encoding used by urllib.request.url2pathname()

2020-06-15 Thread Manuel Jacob
New submission from Manuel Jacob : On Python 2, it was possible to recover a percent-encoded byte: >>> from urllib import url2pathname >>> url2pathname('%ff') '\xff' On Python 3, the byte is decoded using the utf-8 encoding and the "replace" error handler (therefo

[issue39229] library/functions.rst causes translated builds to fail

2020-06-14 Thread Manuel Kaufmann
Manuel Kaufmann added the comment: We are having a similar issue in python-docs-es translation. cpython/Doc/library/ctypes.rst:: WARNING: inconsistent term references in translated message. original: [], translated: [':ref:`evento de auditoría `'] https://travis-ci.org/github/python/python

[issue40868] io.TextIOBase.buffer is not necessarily a buffer

2020-06-04 Thread Manuel Jacob
New submission from Manuel Jacob : https://docs.python.org/dev/library/io.html#io.TextIOBase.buffer says: "The underlying binary buffer (a BufferedIOBase instance) that TextIOBase deals with. This is not part of the TextIOBase API and may not exist in some implementa

[issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method

2020-05-31 Thread Manuel Jacob
Manuel Jacob added the comment: For the record, I’ve added a comment to the pull request about that ssl.PROTOCOL_TLSv1_1 / ssl.PROTOCOL_TLSv1_2 are now defined unconditionally. https://github.com/python/cpython/commit/6e8cda91d92da72800d891b2fc2073ecbc134d98#r39569316 -- nosy

[issue39464] Allow translating argument error messages

2020-01-27 Thread José Manuel Ferrer
New submission from José Manuel Ferrer : Argument error messages display the untranslatable text 'argument ', which should be translatable to other languages, just like it's possible to do with the rest of the constructed error message. -- components: Library (Lib) messages: 360764

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Manuel Barkhau
Manuel Barkhau added the comment: > If you pass a string, you will get a string, so existing code will continue > to work as before. Somebody might have code that is running against a flat directory and have written their ignore function expecting to get a pathlib.Path, because

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Manuel Barkhau
Manuel Barkhau added the comment: > For completeness, a similar problem is present also on python < 3.8 Fair point. I'll have a look. -- ___ Python tracker <https://bugs.python.org/i

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Manuel Barkhau
Change by Manuel Barkhau : -- pull_requests: +17554 pull_request: https://github.com/python/cpython/pull/18168 ___ Python tracker <https://bugs.python.org/issue39

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-22 Thread Manuel Barkhau
Change by Manuel Barkhau : -- pull_requests: +17509 pull_request: https://github.com/python/cpython/pull/18122 ___ Python tracker <https://bugs.python.org/issue39

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Manuel Barkhau
Manuel Barkhau added the comment: Unless somebody else wants to, I could have a go at an PR to update shutil.py -- ___ Python tracker <https://bugs.python.org/issue39

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Manuel Barkhau
Manuel Barkhau added the comment: Is there anything I can do to help move this forward? -- ___ Python tracker <https://bugs.python.org/issue39390> ___ ___ Pytho

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-20 Thread Manuel Barkhau
Manuel Barkhau added the comment: > This looks like a backward incompatible change in 3.8. Indeed. > Should not copytree convert arguments of the ignore callback to str and list > correspondingly? Well, since any existing code probably expects that behavior (or at least proba

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-19 Thread Manuel Barkhau
Change by Manuel Barkhau : -- keywords: +patch pull_requests: +17462 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18069 ___ Python tracker <https://bugs.python.org/issu

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-19 Thread Manuel Barkhau
Change by Manuel Barkhau : -- title: shutil.copytree - ignore callback behaviour change -> shutil.copytree - 3.8 changed argument types of the ignore callback ___ Python tracker <https://bugs.python.org/issu

[issue39390] shutil.copytree - ignore callback behaviour change

2020-01-19 Thread Manuel Barkhau
New submission from Manuel Barkhau : In Python 3.8, the types of the parameters to the ignore callable appear to have changed. Previously the `src` parameter was a string and the `names` parameter was a list of strings. Now the `src` parameter appears to be either a `pathlib.Path

[issue38710] unsynchronized write pointer in io.TextIOWrapper in 'r+' mode

2019-11-05 Thread Manuel Ignacio Pérez Alcolea
New submission from Manuel Ignacio Pérez Alcolea : There seems to be a bug in the `io.TextIOWrapper` class while working in 'r+' mode, although I can't say the source of the problem is right there. The write pointer doesn't match `file.tell()` after performing a read operation. For example

[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2019-03-04 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: -ceronman ___ Python tracker <https://bugs.python.org/issue21879> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25737] array is not a Sequence

2019-02-27 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: +ceronman ___ Python tracker <https://bugs.python.org/issue25737> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23864] issubclass without registration only works for "one-trick pony" collections ABCs.

2019-02-27 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: +ceronman ___ Python tracker <https://bugs.python.org/issue23864> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35360] Update SQLite to 3.26 in Windows and macOS installer builds

2019-02-27 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: +ceronman ___ Python tracker <https://bugs.python.org/issue35360> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2019-02-24 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: +ceronman ___ Python tracker <https://bugs.python.org/issue21879> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-02-24 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: +ceronman ___ Python tracker <https://bugs.python.org/issue18299> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2019-02-24 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: +ceronman ___ Python tracker <https://bugs.python.org/issue25026> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29446] Improve tkinter 'import *' situation

2019-02-24 Thread Manuel Cerón
Change by Manuel Cerón : -- nosy: +ceronman ___ Python tracker <https://bugs.python.org/issue29446> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34321] mmap.mmap() should not necessarily clone the file descriptor

2018-08-02 Thread Manuel
New submission from Manuel : mmap.mmap(fileno, length, flags, prot, access, offset) always clones the file descriptor that should be used [1]. The cloning of the file descriptor seems to be done to ensure that the file cannot be closed behind mmap's back, but if you are mmap()'ing a lot

[issue33216] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW

2018-04-03 Thread Manuel Vazquez Acosta
Manuel Vazquez Acosta <man...@merchise.org> added the comment: Correction, the documentation for CALL_FUNCTION_VAR said: Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The top element on the stack contains the variable argument list, followed by keyword and posi

[issue33216] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW

2018-04-03 Thread Manuel Vazquez Acosta
Change by Manuel Vazquez Acosta <man...@merchise.org>: -- keywords: +patch pull_requests: +6075 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33216] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW

2018-04-03 Thread Manuel Vazquez Acosta
New submission from Manuel Vazquez Acosta <man...@merchise.org>: The documentation of the dis module says that: CALL_FUNCTION_VAR (argc) Calls a function. *argc* is interpreted as in CALL_FUNCTION. The top elements on the stack are the keyword arguments, followed by the va

[issue33216] CALL_FUNCTION_VAR

2018-04-03 Thread Manuel Vazquez Acosta
Change by Manuel Vazquez Acosta <man...@merchise.org>: -- nosy: mvaled priority: normal severity: normal status: open title: CALL_FUNCTION_VAR ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

CSV file edition

2018-01-09 Thread Manuel Rincon
Dear: With what function could you separate the numerical part of each column? MarketTime Price Type Type=0 MarketTime=11:18:26.549 Price=112.8300 Type=0 MarketTime=11:18:28.792 Price=112.8300 Type=0

Regarding the error: TypeError: can’t pickle _thread.lock objects

2017-12-21 Thread Winston Manuel Vijay
: can’t pickle _thread.lock objects-please find the attached screenshot for your reference. Thanks, A.Winston Manuel Vijay This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged

[issue31113] Stack overflow with large program

2017-08-06 Thread Manuel Krebber
Manuel Krebber added the comment: @Serhiy That would require me to compile Python myself though, right? Is there a reason why the limit is only for try/for and not for if? @Antoine Well, the goal is to be able to generate Python 2 compatible code . I will try to split the code into more

[issue31113] Stack overflow with large program

2017-08-04 Thread Manuel Krebber
Manuel Krebber added the comment: I have already tried to reduce the nesting, but it still crashes. I have to admit that ~20 levels of nesting are still quite a lot. But I am surprised that so few levels of nesting already are a problem for the parser... I have attached the generated code

[issue31113] Stack overflow with large program

2017-08-03 Thread Manuel Krebber
Manuel Krebber added the comment: 1) Yes. 2) A .pyc file was not generated. 3) It is always the same location where the error occurs. 4) It did not crash on the linux machine that I tested it on. I have tried to split the code up into multiple files, but it still crashes. I have uploaded

[issue31113] Stack overflow with large program

2017-08-03 Thread Manuel Krebber
New submission from Manuel Krebber: With a pattern matching library I am generating some Python code that matches patterns. For a very big pattern set I generate a Python file which is about 20MB and has ~300K LOC. When I try to execute the file with Python 3.6.2 on Windows 10 (64bit

How to store some elements from a list into another

2017-06-12 Thread José Manuel Suárez Sierra
Hello, I am stuck with a (perhaps) easy problem, I hope someone can help me: My problem is: I have a list of lists like this one: [[55, 56, 57, 58, 83, 84, 85, 86, 89, 90, 91, 92, 107, 108, 109, 110, 111, 117, 118, 119, 120, 128, 129, 130, 131, 135, 136, 137, 138, 184, 185, 186, 187, 216, 217,

[issue29830] pyexpat.errors doesn't have __spec__ and __loader__ set

2017-03-17 Thread Manuel Jacob
Manuel Jacob added the comment: You're of course right that pyexpat is an extension module and not a builtin module. I was confused because on PyPy it's a builtin module. But the same question applies for ExtensionFileLoader.is_package(). It returns False in the case of pyexpat

[issue29830] pyexpat.errors doesn't have __spec__ and __loader__ set

2017-03-16 Thread Manuel Jacob
New submission from Manuel Jacob: The same applies to pyexpat.model. It seems like pyexpat is the only builtin module which has submodules (errors, model). Normally, as I understand it, the module gets imported given a spec and the import machinery ensures that this spec ends up

Doubt with files

2017-02-14 Thread José Manuel Suárez Sierra
hello, im trying to read a rtf or txt file with this python script: with open(dirFichero,'r') as reader: for line in reader: print line the problem is that shown is : {\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf810 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}

[issue29418] inspect.isroutine does not return True for some bound builtin methods

2017-02-02 Thread Manuel Krebber
New submission from Manuel Krebber: Some of the builtin methods are not recognized as such by inspect.isroutine(). inspect.ismethoddescriptor() only returns True for the unbound versions of the methods but not the bound ones. For example: >>> inspect.isroutine(object.__st

Re: doubt loading pages

2017-02-01 Thread José Manuel Suárez Sierra
El miércoles, 1 de febrero de 2017, 11:55:11 (UTC+1), José Manuel Suárez Sierra escribió: > hello everyone, > Im trying to make a program that takes an archive from pdb (for instance this > link http://www.rcsb.org/pdb/files/fasta.txt?structureIdList=5HXY > > after reading it I

doubt loading pages

2017-02-01 Thread José Manuel Suárez Sierra
hello everyone, Im trying to make a program that takes an archive from pdb (for instance this link http://www.rcsb.org/pdb/files/fasta.txt?structureIdList=5HXY after reading it I want it to save in a list only this part of the archive:

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-02-01 Thread Manuel Krebber
Manuel Krebber added the comment: One question I was wondering about is whether those types should be checked by inspect.isroutine() as well. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-30 Thread Manuel Krebber
Manuel Krebber added the comment: Okay, I added MethodDescriptorType to the types module and updated the docs. Hope this is okay now. -- Added file: http://bugs.python.org/file46455/slot-wrapper-types.patch ___ Python tracker <rep...@bugs.python.

[issue26355] Emit major version based canonical URLs for docs

2017-01-27 Thread Manuel Krebber
Manuel Krebber added the comment: Sorry, I accidentally replied to the worng issue -.- -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-27 Thread Manuel Krebber
Manuel Krebber added the comment: I created the last patch without commiting, so maybe this one will work properly with the revision tool. -- Added file: http://bugs.python.org/file46429/slot-wrapper-types.patch ___ Python tracker <

[issue26355] Emit major version based canonical URLs for docs

2017-01-27 Thread Manuel Krebber
Changes by Manuel Krebber <ad...@wheerd.de>: Removed file: http://bugs.python.org/file46428/slot-wrapper-types.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26355] Emit major version based canonical URLs for docs

2017-01-27 Thread Manuel Krebber
Manuel Krebber added the comment: I create the last diff without creating a commit, so maybe this one works better. -- nosy: +Wheerd Added file: http://bugs.python.org/file46428/slot-wrapper-types.patch ___ Python tracker <rep...@bugs.python.

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
Manuel Krebber added the comment: Alright, I added some tests and tried it again with the patch. -- Added file: http://bugs.python.org/file46427/slot-wrapper-types.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
Manuel Krebber added the comment: I added some docs, but I am not sure what I would want to test here. There are no tests for types.BuiltinMethodType either. Maybe the string representation of it could be tested, but an isinstance test seems pretty redundant. I hope this patch file works

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
Manuel Krebber added the comment: I would suggest the names SlotWrapperType and MethodWrapperType because I think they match their string representations the closest. For checking whether something is a method/function one could also use inspect.isroutine (or inspect.ismethoddescriptor

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
Changes by Manuel Krebber <ad...@wheerd.de>: -- keywords: +patch Added file: http://bugs.python.org/file46420/0001-Added-SlotWrapperType-and-MethodWrapperType-to-the-t.patch ___ Python tracker <rep...@bugs.python.org> <http://

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Manuel Krebber
New submission from Manuel Krebber: There currently is no type in the types module for the slot wrappers/wrapper_descriptor types. I would like to have something like WrapperDescriptor = type(object.__init__) added to it (or maybe even add it to MethodType). This would be helpful

Doubt with matrix

2017-01-12 Thread José Manuel Suárez Sierra
Hello, I want to go over matrix indexs with this code: def comparador2(a, b): c3 = ["0"] # variables x = -1 # contador de letras aniadidas a c3 i = 0 # contador bucle secuencia a j = 0 # contador bucle secuencia b l1 = len(a) l2 = len(b) cont = [] # contador de

Re: Help with this code

2017-01-09 Thread José Manuel Suárez Sierra
El lunes, 9 de enero de 2017, 14:09:09 (UTC+1), José Manuel Suárez Sierra escribió: > Hello, I am trying to make a code wich compares between 2 or several > sequences (lists). It compares every element in a list with another list > elements. For example, if we have a list_a=["

Re: Help with this code

2017-01-09 Thread José Manuel Suárez Sierra
El lunes, 9 de enero de 2017, 14:09:09 (UTC+1), José Manuel Suárez Sierra escribió: > Hello, I am trying to make a code wich compares between 2 or several > sequences (lists). It compares every element in a list with another list > elements. For example, if we have a list_a=["

Help with this code

2017-01-09 Thread José Manuel Suárez Sierra
Hello, I am trying to make a code wich compares between 2 or several sequences (lists). It compares every element in a list with another list elements. For example, if we have a list_a=["a","b","c","d"] and list_b=["a","b"] I want to obtain a new list_c containing elements that match between

[issue28773] typing.FrozenSet missing in documentation.

2016-11-22 Thread Manuel Krebber
Manuel Krebber added the comment: I updated the patch to add reflect the covariance. -- Added file: http://bugs.python.org/file45606/frozenset-doc.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28773] typing.FrozenSet missing in documentation.

2016-11-22 Thread Manuel Krebber
New submission from Manuel Krebber: The typing.FrozenSet is missing in the typing module documentation. I have attached a patch that adds it similar to the typing.Set which is already in the documentation. -- components: Library (Lib) files: frozenset-doc.patch keywords: patch

[issue28404] Logging SyslogHandler not appending '\n' to the end

2016-10-17 Thread José Manuel
José Manuel added the comment: Sorry to bother you again, but I've tested this not only with Fluentd, but with a RSYSLOG server and it does not work with TCP except if you manually add the trailer LF character. Other than that, UDP default transport protocol has no issues and works fine

[issue28404] Logging SyslogHandler not appending '\n' to the end

2016-10-10 Thread José Manuel
José Manuel added the comment: After reading the RFC5424 it seems that there is no such "new line message delimiter": 4.3.1. Message Length The message length is the octet count of the SYSLOG-MSG in the SYSLOG-FRAME. A transport receive

[issue28404] Logging SyslogHandler not appending '\n' to the end

2016-10-10 Thread José Manuel
New submission from José Manuel: I'm using SyslogHandler from logging.handlers to send syslog messages to a Fluentd input (https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin/in_syslog.rb), both in TCP and UDP. UDP works fine, but TCP does not work. The "pr

[issue28296] Add __le__ and __ge__ to collections.Counter

2016-09-28 Thread Manuel Krebber
Manuel Krebber added the comment: Oh, I should have searched properly before creating this ticket. Sorry about that. I guess I will be subclassing Counter in my project then, to get this functionality... Only problem is, that when using the builtin __add__ etc. of my Counter subclass, I

[issue28296] Add __le__ and __ge__ to collections.Counter

2016-09-28 Thread Manuel Krebber
New submission from Manuel Krebber: I would really like there to be comparison operators for collection.Counter similar to the ones for sets. While you can now use minus to some degree for that comparison, it is very inefficient. I have attached an implementation of __ge__ and __le__

[issue27393] Command to activate venv in Windows has wrong path

2016-06-26 Thread Manuel Kaufmann
New submission from Manuel Kaufmann: The `venv` module has a bug in the command to activate it on Windows. In 3.3 and 3.4 the bar used is wrong: `/` instead `\` * https://docs.python.org/3.4/library/venv.html#creating-virtual-environments * https://docs.python.org/3.3/library/venv.html

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-21 Thread Manuel Jacob
Manuel Jacob added the comment: I think the "What's New" entry has two typos. It should be `importlib.__import__()` instead of `importlib.__init__()` and SystemError instead of RuntimeError. -- ___ Python tracker <rep...@bugs.pyth

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-18 Thread Manuel Jacob
Manuel Jacob added the comment: Done. I'm a bit surprised this wasn't necessary for my previous two patches, but they were even more trival than this one. ;) Do we have to wait until my tracker profile is updated? -- ___ Python tracker <

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-18 Thread Manuel Jacob
Manuel Jacob added the comment: (For some reason, I forgot to submit the previous comment). The attached patches fix the issue (one for the 3.5 branch, one for the default branch) by bringing importlib.__import__ closer to the builtin __import__. The extra code in the default / 3.6 branch

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-16 Thread Manuel Jacob
Changes by Manuel Jacob <m...@manueljacob.de>: Added file: http://bugs.python.org/file41938/relimport-3.6.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-16 Thread Manuel Jacob
Changes by Manuel Jacob <m...@manueljacob.de>: -- keywords: +patch Added file: http://bugs.python.org/file41937/relimport-3.5.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-15 Thread Manuel Jacob
New submission from Manuel Jacob: Python 3.6.0a0 (default:6c6f7dff597b, Feb 16 2016, 01:24:51) [GCC 5.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import importlib >>> importlib.__import__('ar

Re: Supply condition in function call

2015-03-29 Thread Manuel Graune
Cameron Simpson c...@zip.com.au writes: In xterm and I think several other X11 terminals, Shift-Insert pastes. I found that _way_ more convenient than middle click. The mouse is not your friend. This information might prove as useful as your answer to my original question. ;-) Thanks for

Re: Supply condition in function call

2015-03-27 Thread Manuel Graune
Cameron Simpson c...@zip.com.au writes: This passes the local variables inside test1() to condition as a single parameter. Now, I grant that vars['i'] is a miracle of tediousness. So consider this elaboration: from collections import namedtuple condition_test = lambda vars: vars.i +

Re: Supply condition in function call

2015-03-27 Thread Manuel Graune
Peter Otten __pete...@web.de writes: Cameron Simpson wrote: test1([0,1,2,3], [1,2,3,4], condition_test) This passes the local variables inside test1() to condition as a single parameter. Now, I grant that vars['i'] is a miracle of tediousness. So consider this elaboration: from

Re: Supply condition in function call

2015-03-26 Thread Manuel Graune
Gary Herron gher...@digipen.edu writes: On 03/25/2015 10:29 AM, Manuel Graune wrote: def test1(a, b, condition=True): for i,j in zip(a,b): c=i+j if eval(condition): print(Foo) test1([0,1,2,3],[1,2,3,4],i+j 4) print(Bar) test1([0,1,2,3],[1,2,3,4],c 4

Supply condition in function call

2015-03-25 Thread Manuel Graune
([0,1,2,3],[1,2,3,4],c 4) print(Bar) test1([0,1,2,3],[1,2,3,4],a[i] 2) print(Bar) test1([0,1,2,3],[1,2,3,4]) Resulting in Foo Foo Bar Foo Foo Bar Foo Bar Foo Foo Foo Foo Thanks for your help Regards, Manuel -- A hundred men did the rational thing. The sum of those rational choices was called panic

Re: Supply condition in function call

2015-03-25 Thread Manuel Graune
Joel Goldstick joel.goldst...@gmail.com writes: On Wed, Mar 25, 2015 at 1:29 PM, Manuel Graune manuel.gra...@koeln.de wrote: def test1(a, b, condition=True): for i,j in zip(a,b): c=i+j if eval(condition): print(Foo) I'm not sure I understand your question

[issue23742] expandvars removes single quotes ( ' )

2015-03-22 Thread Manuel Vögele
New submission from Manuel Vögele: When executing os.path.expandvars(%SystemDrive%\\Foo'Bar) the function erases the ' returning 'C:\\FooBar' using Python 3.4.3 on Windows 7 -- components: Library (Lib) messages: 238968 nosy: manuel_v, serhiy.storchaka priority: normal severity

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2015-02-24 Thread Manuel Jacob
Manuel Jacob added the comment: Maybe I'm missing something, but it seems to me that test_int_subclass_with_index() is testing for the exactly wrong behaviour. Isn't the point of this issue that operator.index(a) should be equal to a.__index__()? Why are the tests checking

  1   2   3   >