[issue46562] Add typeof or enum behavior in the typing module

2022-01-28 Thread Pedro Torres
Change by Pedro Torres : -- title: Add typeof or enum behavior for in the Typing module -> Add typeof or enum behavior in the typing module ___ Python tracker <https://bugs.python.org/issu

[issue46562] Add typeof or enum behavior for in the Typing module

2022-01-28 Thread Pedro Torres
Change by Pedro Torres : -- title: Add typeof or eum behavior for in the Typing module -> Add typeof or enum behavior for in the Typing module ___ Python tracker <https://bugs.python.org/issu

[issue46562] Add typeof or eum behavior for in the Typing module

2022-01-28 Thread Pedro Torres
New submission from Pedro Torres : Currently, the addition of Annotated in PEP 593 on Python 3.9 allows adding arbitrary metadata for type hints. Let's consider the following time_available_online: list[str] = [ '1m', '5m', '1d' ] ``` Hour = Annotated(str, "time available o

[issue44954] Bug in float.fromhex

2021-08-20 Thread Pedro Gimeno
Pedro Gimeno added the comment: > @Pedro Thanks again for the report! Just out of curiosity, how did you manage > to find this? I'm writing a C strtod implementation and I was adding corner cases to the unit testing (now published here: https://codeberg.org/pgimeno/ACSL/src/branch/

[issue44954] Bug in float.fromhex

2021-08-19 Thread Pedro Gimeno
New submission from Pedro Gimeno : >>> float.fromhex('0x0.8p-1074') 0.0 >>> float.fromhex('0x.8p-1074') 5e-324 One of them is obviously wrong. It's the second one, because: - The smallest denormal is 0x1p-1074 - Therefore, 0x0.8p-1074 is a tie for rounding purposes. - The

[issue42382] No easy way to get the distribution which provided a importlib.metadata.EntryPoint

2020-12-06 Thread Pedro Algarvio
Pedro Algarvio added the comment: Our software uses a plug-in based approach. Plugins are able to add/modify internal behavior, and, as part of bug submission process we have a CLI flag which provides information about the core app as well as any intervening plugins. This is where we need

[issue42382] No easy way to get the distribution which provided a importlib.metadata.EntryPoint

2020-11-17 Thread Pedro Algarvio
Pedro Algarvio added the comment: Guess I jumped too fast :) Will the changes in CPythom be included in `importlib_metadata`? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42382] No easy way to get the distribution which provided a importlib.metadata.EntryPoint

2020-11-16 Thread Pedro Algarvio
Change by Pedro Algarvio : -- keywords: +patch pull_requests: +2 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23334 ___ Python tracker <https://bugs.python.org/issu

[issue42382] No easy way to get the distribution which provided a importlib.metadata.EntryPoint

2020-11-16 Thread Pedro Algarvio
New submission from Pedro Algarvio : With `pkg_resources` an `EntryPoint` has a dist attribute which allows you to get the distribution that provided that specific entry-point, however, with `importlib.metafata` and `importlib_metadata` that's not an east task. ```python

[issue38263] [Windows] multiprocessing: DupHandle.detach() race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE)

2020-02-22 Thread Pedro Algarvio
Pedro Algarvio added the comment: What I'm able to copy from the console(though I doubt I'm getting all of the traceback): Traceback (most recent call last): File "", line 1, in File "c:\hostedtoolcache\windows\python\3.5.4\x64\lib\multiprocessing\spawn.py", lin

[issue38263] [Windows] multiprocessing: DupHandle.detach() race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE)

2020-02-22 Thread Pedro Algarvio
Pedro Algarvio added the comment: Any possible workaround for this issue? I seem to be consistingly hitting this issue. -- nosy: +s0undt3ch ___ Python tracker <https://bugs.python.org/issue38

[issue38800] Resume position for UTF-8 codec error handler not working

2019-11-14 Thread Pedro Gimeno
Pedro Gimeno added the comment: Python 3.5 from Debian stretch (oldstable). You're right, I can't reproduce it in 3.7 from Buster. Sorry for the bogus report. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38800] Resume position for UTF-8 codec error handler not working

2019-11-14 Thread Pedro Gimeno
Pedro Gimeno added the comment: I forgot the quotes in the assertion, it should have been "b'xz'". -- ___ Python tracker <https://bugs.python.o

[issue38800] Resume position for UTF-8 codec error handler not working

2019-11-14 Thread Pedro Gimeno
New submission from Pedro Gimeno : When implementing an error handler, it must return a tuple consisting of a substitution string and a position where to resume decoding. In the case of the UTF-8 codec, the resume position is ignored, and it always resumes immediately after the character

[issue22253] ConfigParser does not handle files without sections

2019-11-05 Thread Pedro Lacerda
Pedro Lacerda added the comment: Hi, there is a working PR at https://github.com/python/cpython/pull/2735. I was in doubt about get the default section with `__init__(..., allow_unnamed_section=True)` and `config.get('', 'option')` or with `config.get(DEFAULT_SECTION, 'option')`. I'd

[issue35135] pip install --download option does not exist

2018-11-01 Thread Pedro
New submission from Pedro : https://pip.pypa.io/en/stable/user_guide/#installing-from-local-packages states that you can use a --directory option with the install subcommand. This fails with pip 18.1 on both Python 2.7 on SLES12 and Python 3.6 on Windows 10: == pip install

[issue32846] Deletion of large sets of strings is extra slow

2018-02-17 Thread Luis Pedro Coelho
Luis Pedro Coelho <l...@luispedro.org> added the comment: I think some of this conversation is going off-topic, but there is no disk-swapping in my case. I realize ours is not a typical setup, but our normal machines have 256GB of RAM and the "big memory" compute nodes are

[issue32846] Deletion of large sets of strings is extra slow

2018-02-16 Thread Luís Pedro Coelho
Luís Pedro Coelho <l...@luispedro.org> added the comment: Original poster here. The benchmark is artificial, but the problem setting is not. I did have a problem that is roughly: interesting = set(line.strip() for line in open(...)) for line in open(...): key,rest = line

[issue32789] Note missing from logging.debug() docs

2018-02-07 Thread Pedro
Pedro <pgacv2+pythonb...@gmail.com> added the comment: Might be cleaner to just say, "The arguments are interpreted as for debug/info/warning/error/critical/exception/log," but with the bookmark URL pointing to the Logger methods. -- __

[issue32789] Note missing from logging.debug() docs

2018-02-07 Thread Pedro
New submission from Pedro <pgacv2+pythonb...@gmail.com>: The docs for Logger.debug() (https://docs.python.org/3/library/logging.html#logging.Logger.debug) specify that exc_info can take an exception instance as of version 3.5. However, the docs for logging.debug() (https://docs.python

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2018-01-19 Thread Pedro
Pedro <pgacv2+pythonb...@gmail.com> added the comment: I agree that an empty list, instead of a list with an empty string, makes more sense. Leaving _xoptions as {} would be the same as when it runs non-embedded without any -X arguments, but I guess there's no way of making {} any more

[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread Pedro
Pedro <pgacv2+pythonb...@gmail.com> added the comment: My comment above uses "code that we provide for supporting embedding," not "third party code," as the definition of embedded. -- ___ Python tracker <r

[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread Pedro
Pedro <pgacv2+pythonb...@gmail.com> added the comment: My first inclination would be no. An argv value of [''] means "zero command-line arguments" (not even a filename), which implies the following as far as I know: 1. Python was called as an executable rather than a library, b

[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread Pedro
New submission from Pedro <pgacv2+pythonb...@gmail.com>: Embedded Python interpreters, such as Boost.Python, do not have sys.argv available. (sys itself works fine.) This causes the interpreter to crash with the following exception when you try to access argv: AttributeError: '

[issue32054] Creating RPM on Python 2 works, but Python 3 fails because of sys.implementation.cache_tag

2017-11-16 Thread Pedro
New submission from Pedro <pgacv2+pythonb...@gmail.com>: I am trying to create an RPM on SLES12 SP2. (I think that corresponds to OpenSUSE 42.2.) This is my setup.py file, nothing special: import setuptools setuptools.setup(name='MyApp', version=

[issue27268] Incorrect error message on float('')

2017-07-17 Thread Pedro Lacerda
Changes by Pedro Lacerda <pslace...@gmail.com>: -- pull_requests: +2805 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27268> ___

[issue22253] ConfigParser does not handle files without sections

2017-07-16 Thread Pedro Lacerda
Pedro Lacerda added the comment: Thank you 林自均! I just made a pull-request with the relevant bits. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue11588] Add "necessarily inclusive" groups to argparse

2017-05-26 Thread Pedro
Pedro added the comment: Just voicing my support for this. I was also looking for a solution on StackOverflow and ended up here. -- nosy: +pgacv2 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30220] Why are custom messages for ValueError, TypeError suppressed in argparse?

2017-05-05 Thread Pedro
Pedro added the comment: Paul, There are a number of scenarios in which you need to check a value and not just a type. For instance, I have a tool with several command-line arguments that need to be *nonnegative* integers, and a call to int() would not catch that. Many other utilities

[issue30220] Why are the custom messages for ValueError and TypeError suppressed in argparse?

2017-05-01 Thread Pedro
Pedro added the comment: You can get around the message suppression by raising anything that isn't a ValueError, TypeError, or subclass thereof. It will propagate up past _get_value(). I still don't see the reason for giving special treatment to ValueError and TypeError

[issue30220] Why are the custom messages for ValueError and TypeError suppressed in argparse?

2017-05-01 Thread Pedro
New submission from Pedro: ArgumentParser._get_value() has two exception handlers: one for ArgumentTypeError, and one for (TypeError, ValueError). But in the latter case, any custom message I include the TypeError or ValueError is ignored and replaced with a generic "invalid value&quo

[issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings

2017-03-24 Thread Pedro
Changes by Pedro <pgacv2+pythonb...@gmail.com>: -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings

2017-03-24 Thread Pedro
Pedro added the comment: I guess I'm a little allergic to magic strings. I think there is value in greater consistency across modules, but agree it's not a big deal because the Action classes are already accessible that way. I was unaware of the details behind `action` and actually just found

[issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings

2017-02-23 Thread Pedro
New submission from Pedro: The possible values for action are currently: 'store' 'store_true' 'store_false' 'store_const' 'append' 'append_const' 'count' 'help' 'version' a subclass of argparse.Action The string values are evidently for backward compatibility with optparse. However, adding

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Pedro
Pedro added the comment: "Because deepcopy copies everything it may copy too much, such as data which is intended to be shared (instead of duplicated) between copies." A bit more explicit? -- ___ Python tracker <rep...@bugs.pyth

[issue29506] Incorrect documentation for the copy module

2017-02-08 Thread Pedro
New submission from Pedro: The docs for the copy module contain a bullet that says the following: "Because deep copy copies everything it may copy too much, e.g., even administrative data structures that should be shared even between copies." There should be a "not&q

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2016-10-30 Thread Pedro Algarvio
Pedro Algarvio added the comment: Would also love to see this in the stdlib soon. My use case is logging setup(forward logs to the main process). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2016-10-30 Thread Pedro Algarvio
Changes by Pedro Algarvio <pe...@algarvio.me>: -- nosy: +Pedro.Algarvio ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21423> ___

[issue27258] Exception in BytesGenerator.flatten

2016-06-18 Thread Pedro Lacerda
Pedro Lacerda added the comment: Now the file is back! If any previous header has a newline before the value the error will not happen. But even with the output correct it isn't as expected. -- Added file: http://bugs.python.org/file43457/flatten-no-exception.mail

[issue27258] Exception in BytesGenerator.flatten

2016-06-18 Thread Pedro Lacerda
Pedro Lacerda added the comment: Now the file is back! If any previous header has a newline before the value the error will not happen. But even with the output correct it isn't as expected. -- Added file: http://bugs.python.org/file43456/flatten-no-exception.mail

[issue27258] Exception in BytesGenerator.flatten

2016-06-17 Thread Pedro Lacerda
Pedro Lacerda added the comment: Seems that ``token.has_fws`` evaluates to True in the following condition if token.has_fws: causing ``token._fold(self)`` where isn't needed and raising the exception. Hope it helps! By the way, why the _header_value_parser.py was removed from

[issue27258] Exception in BytesGenerator.flatten

2016-06-16 Thread Pedro Lacerda
Pedro Lacerda added the comment: I was unable to reproduce this bug using the following snippet import email, sys from email.generator import BytesGenerator from email.mime.text import MIMEText fp = open('flatten-exception.mail', 'rb') email.message_from_binary_file(fp

[issue27268] Incorrect error message on float('')

2016-06-16 Thread Pedro Lacerda
Pedro Lacerda added the comment: Following the bug pointed by Adam and Eryk. -- keywords: +patch nosy: +Pedro Lacerda Added file: http://bugs.python.org/file43405/float.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue26836] Add memfd_create to os module

2016-06-16 Thread Pedro Lacerda
Pedro Lacerda added the comment: Maybe useful at mmapmodule.c replacing /* SVR4 method to map anonymous memory is to open /dev/zero */ fd = devzero = _Py_open("/dev/zero", O_RDWR); tagname is unused at UNIX version of new_mmap_object() so if provided something

[issue27320] ./setup.py --help-commands should sort extra commands

2016-06-15 Thread Pedro Lacerda
Pedro Lacerda added the comment: Please look if these simple patches are acceptable. I don't know if standard commands are already in a sane order or if it also need to be sorted. -- keywords: +patch nosy: +Pedro Lacerda Added file: http://bugs.python.org/file43402/sortextra.patch

[issue27320] ./setup.py --help-commands should sort extra commands

2016-06-15 Thread Pedro Lacerda
Changes by Pedro Lacerda <pslace...@gmail.com>: Added file: http://bugs.python.org/file43403/sortcommands.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue22253] ConfigParser does not handle files without sections

2016-06-11 Thread Pedro Lacerda
Pedro Lacerda added the comment: I also never found a mixture of sectionless options followed by sectioned options. So an unnamed section that is also the DEFAULTSECTION will probably work. In this patch when `default_section=None` is passed to `RawConfigParser` it will parse top level

[issue2506] Add mechanism to disable optimizations

2014-06-22 Thread Pedro Gimeno
Pedro Gimeno added the comment: I consider peephole optimization when no optimization was requested a bug. Documentation for -O says it Turns on basic optimizations. Peephole optimization is a basic optimization, yet it is performed even when no basic optimizations were requested. No need

[issue7300] Unicode arguments in str.format()

2012-12-30 Thread Pedro Algarvio
Pedro Algarvio added the comment: This is not a 2.7 issue only: import sys sys.version_info (2, 6, 5, 'final', 0 'Foo {0}'.format(u'bár') Traceback (most recent call last): File stdin, line 1, in module UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 1

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-21 Thread Pedro Meirelles
Pedro Meirelles added the comment: Hello, I am biologist I am just starting to learn Python. I have a mac and I am using OS X 10.8.2. I have installed Python 2.7.3 and when I try to copy and paste (use command) or go to preferences IDLE crashes. I did what Ned Deily said in msg169739: sudo

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-21 Thread Pedro Meirelles
Pedro Meirelles added the comment: Thank you very much, Ned! It worked, awesome! All the best 2012/10/20 Ned Deily rep...@bugs.python.org Ned Deily added the comment: Pedro, try installing the older ActiveTcl 8.5.11.1 from here: http://downloads.activestate.com/ActiveTcl/releases

[issue14670] subprocess.call with pipe character in argument

2012-04-25 Thread Pedro Larroy
New submission from Pedro Larroy pedro.lar...@gmail.com: When running a command with pipe character as argument the result is not the same as in commandline For example: subprocess.call([rC:\Program Files (x86)\Microsoft Visual Studio 10.0\Commo n7\IDE\devenv,/build,rDebug|x64,gpc10.sln

[issue14256] test_logging fails if zlib is not present

2012-03-11 Thread Pedro Kroger
Pedro Kroger kro...@pedrokroger.net added the comment: Attached patch to fix this issue. -- keywords: +patch nosy: +kroger Added file: http://bugs.python.org/file24791/issue14256.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-18 Thread Pedro Andres Aranda Gutierrez
Pedro Andres Aranda Gutierrez paag...@gmail.com added the comment: Thanks a lot again :-) We have a saying here: you'll never go to sleep without having learnt something new :-) On Tue, Jan 17, 2012 at 4:11 PM, patrick vrijlandt rep...@bugs.python.org wrote: patrick vrijlandt patrick.vrijla

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-16 Thread Pedro Andres Aranda Gutierrez
Pedro Andres Aranda Gutierrez paag...@gmail.com added the comment: Touché :-) I was just frustrated because my XMLs never have tail or text as attributes and I wanted to have more compact code... On Mon, Jan 16, 2012 at 12:14 PM, patrick vrijlandt rep...@bugs.python.org wrote: patrick

[issue13795] CDATA Element missing

2012-01-15 Thread Pedro Andres Aranda Gutierrez
New submission from Pedro Andres Aranda Gutierrez paag...@gmail.com: When creating ElementTree objects that hold SVG drawings, I need a CDATA object similar to the ProcessingInstruction object. There was a circumvention of the problem for Python 2.6: http://stackoverflow.com/questions/174890

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-15 Thread Pedro Andres Aranda Gutierrez
New submission from Pedro Andres Aranda Gutierrez paag...@gmail.com: I have extended the xml.etree.ElementTree.Element class and pass the text attribute in the arguments. This creates much more compact code: import xml.etree.ElementTree as xml class Element(xml.Element

[issue12651] -O2 or -O3? this brings excitement to computing!

2011-07-28 Thread Pedro Larroy
New submission from Pedro Larroy pedro.lar...@gmail.com: When I build it compiles with both -O2 and -O3... this is debian testing on amd64. gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python

[issue9689] threading.Timer poorly documented

2010-08-25 Thread Pedro Mendes
New submission from Pedro Mendes pedrorm2...@gmail.com: The documentation existent ( http://docs.python.org/library/threading.html#threading.Timer ) is not very helpful. The user is left wondering about the exact syntax of this function, what types of parameter it accepts etc. Could

[issue7704] Math calculation problem (1.6-1.0)0.6, python said TRUE

2010-01-14 Thread pedro flores
New submission from pedro flores pflore...@gmail.com: this simple comparison (1.6-1.0)0.6 , python answer TRUE, and that isnt true. -- components: Windows files: bug.py messages: 97785 nosy: DhaReaL severity: normal status: open title: Math calculation problem (1.6-1.0)0.6, python said

[issue7704] Math calculation problem (1.6-1.0)0.6, python said TRUE

2010-01-14 Thread pedro flores
pedro flores pflore...@gmail.com added the comment: kk, then i cannot use this comparison?, and this not happen with8.6-80.6 this is false, according to python. 2010/1/14 Mark Dickinson rep...@bugs.python.org Mark Dickinson dicki...@gmail.com added the comment: This is not a bug

[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-05-11 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: I get it with r63075, r63085, on Linux. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2378 __ ___ Python-bugs-list mailing

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-05-10 Thread Pedro Werneck
Changes by Pedro Werneck [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9499/issue_2118_smtplib.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2118

[issue837234] Tk.quit and sys.exit cause Fatal Error

2008-05-10 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: I tried reproducing the bug with the info provided but neither case worked. Since it doesn't mention platform, I'm including the file in case anyone wants to try it on anything other than Linux/Python2.5. -- nosy: +werneck Added file

[issue869780] curselection() in Tkinter.py should return ints

2008-05-10 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: Just a bare self._getints will raise an exception with no item selected and an empty string returned, so I'm adding a patch to check for it and return an empty tuple in that case, or the tuple with ints. It's open for discussion if we should

[issue869780] curselection() in Tkinter.py should return ints

2008-05-10 Thread Pedro Werneck
Changes by Pedro Werneck [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10248/issue869780_3.patch Tracker [EMAIL PROTECTED] http://bugs.python.org/issue869780

[issue869780] curselection() in Tkinter.py should return ints

2008-05-10 Thread Pedro Werneck
Changes by Pedro Werneck [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10248/issue869780_3.patch Tracker [EMAIL PROTECTED] http://bugs.python.org/issue869780

[issue869780] curselection() in Tkinter.py should return ints

2008-05-10 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: I used the tuple from splitlist() in both cases. I'm not sure if it should return None on an empty selection since that is not documented anywhere. Added file: http://bugs.python.org/file10252/issue869780.py

[issue869780] curselection() in Tkinter.py should return ints

2008-05-10 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: Neither I do, but the current version already returns an empty tuple. Since the map(int, curselection) idiom is widely used, changing to int is not likely to break any code, but returning None on empty selection

[issue1410739] Add notes to the manual about `is` and methods

2008-05-10 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: I agree it's not a good idea to be too much specific about this. The patch attached adds the following footnote to the 'is' operator: Due to automatic garbage-collection, free lists, and the dynamic nature of descriptors, you may notice unusual

[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-05-10 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: Just note the error happens even without the try/except block inside the 'if' statement. -- nosy: +werneck __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2378

[issue869780] curselection() in Tkinter.py should return ints

2008-05-10 Thread Pedro Werneck
Changes by Pedro Werneck [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10252/issue869780.py Tracker [EMAIL PROTECTED] http://bugs.python.org/issue869780

[issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False

2008-05-02 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: In 3.0 it happens with any class. Just the cls argument missing on the call to instancecheck. -- keywords: +patch nosy: +werneck Added file: http://bugs.python.org/file10174/issue2325.patch __ Tracker

[issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False

2008-05-02 Thread Pedro Werneck
Changes by Pedro Werneck [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10174/issue2325.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2325 __ ___ Python

[issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False

2008-05-02 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: Seems like that's the wrong usage and the PEP 3119 notices that it's hard to get the right semantics. To use it that way you need to define the methods as a classmethod(). http://www.python.org/dev/peps/pep-3119/#one-trick-ponies

[issue2736] datetime needs and epoch method

2008-05-02 Thread Pedro Werneck
Pedro Werneck [EMAIL PROTECTED] added the comment: That's expected as mktime is just a thin wrapper over libc mktime() and it does not expect microseconds. Changing time.mktime doesn't seems an option, so the best alternative is to implement a method in datetime type. Is there a real demand

[issue1193577] add server.shutdown() method and daemon arg to SocketServer

2008-02-25 Thread Pedro Werneck
Pedro Werneck added the comment: I had some code here to do the exact same thing with XML-RPC server. The patch adds the feature to SocketServer, with a server.shutdown() method to stop serve_forever(), and change the unittest to use and test the feature. I disagree on adding the daemon_threads

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-23 Thread Pedro Werneck
Pedro Werneck added the comment: It seems the right thing to do would be to have it raise a base exception, but SMTPConnectError docstring states Error during connection establishment., so I chosen to use it with the errno and message from socket.error, even if it's supposed to happen only after

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2008-02-23 Thread Pedro Werneck
Pedro Werneck added the comment: Previous patch didn't passed the tests right. This patch fixes both the code, unindenting port number conversion to integer and the test. Added file: http://bugs.python.org/file9509/issue_2118_fixed.patch __ Tracker [EMAIL

[issue1375] hotshot IndexError when loading stats

2008-02-23 Thread Pedro Werneck
Pedro Werneck added the comment: Fixed by raising StopIteration when the stack is empty. -- nosy: +werneck Added file: http://bugs.python.org/file9510/issue_1375_hotshot.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1375

[issue1697] Problems with float and 6 type

2007-12-25 Thread Pedro Clemente Pereira Neto
New submission from Pedro Clemente Pereira Neto: Problems with float and 6 type Hi, I am having problems both in the Windows version on the Linux version of Python as put some number with some 6 type that it always returns a value me, following examples: 2.0 2.0 1.55 1.55 1.56

[issue1149] fdopen does not work as expected

2007-09-11 Thread Luís Pedro Coelho
New submission from Luís Pedro Coelho: from os import * def Fork(): b = fork() if b 0: raise Exception('fork() failed') return b r,w=pipe() b = Fork() if b == 0: dup2(w,1) close(w) execlp('echo',\ 'echo',\ 'Hello world') else: for line in fdopen