[issue41274] Better way to random.seed()?

2020-07-30 Thread Juan Jimenez
Juan Jimenez added the comment: Pull request https://github.com/python/cpython/pull/21693 created for the demo steven.daprano suggested. -- message_count: 8.0 -> 9.0 pull_requests: +20836 pull_request: https://github.com/python/cpython/pull/21

[issue41446] New demo, using a web api

2020-07-30 Thread Juan Jimenez
Change by Juan Jimenez : -- keywords: +patch pull_requests: +20835 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21693 ___ Python tracker <https://bugs.python.org/issu

[issue41446] New demo, using a web api

2020-07-30 Thread Juan Jimenez
New submission from Juan Jimenez : As per a suggestion in https://bugs.python.org/issue41274 I would like to submit for consideration a new demo program, one that demonstrates how to use a web API to generate a pseudo-random generator seed from high resolution, high cadence images of the sun

[issue41274] Better way to random.seed()?

2020-07-11 Thread Juan Jimenez
Juan Jimenez added the comment: How would I know if my demo is good enough to be included in that repo? Is there a guide for this, or do I just create a pull request, throw it over the fence and wait until the wolves either grunt in approval or throw it back at me in pieces? I ask because I

[issue41274] Better way to random.seed()?

2020-07-10 Thread Juan Jimenez
Juan Jimenez added the comment: Thanks Rémi. :) -- ___ Python tracker <https://bugs.python.org/issue41274> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41274] Better way to random.seed()?

2020-07-10 Thread Juan Jimenez
Juan Jimenez added the comment: I'm not a Python guru, but I was wondering, is it possible to write a new module that overrides the seed() method in the random library in its initialization code and replaces it with this method of seeding the generator

[issue41274] Better way to random.seed()?

2020-07-10 Thread Juan Jimenez
New submission from Juan Jimenez : I have invented a new way to seed the random number generator with about as random a source of seeds as can be found: hashes generated from high cadence, high resolution images of the surface of the Sun. These are captured by the Solar Dynamics

[issue39247] dataclass defaults and property don't work together

2020-04-15 Thread Juan Arrivillaga
Juan Arrivillaga added the comment: But when would you want to have a descriptor as an instance attribute? Descriptors must be in the class dictionary to work: https://docs.python.org/3/reference/datamodel.html#implementing-descriptors I suppose, you could want some container class

[issue39247] dataclass defaults and property don't work together

2020-01-10 Thread Juan Arrivillaga
Juan Arrivillaga added the comment: Actually, couldn't the following be a workaround, just set the property on the class after the class definition: import dataclasses import typing @dataclasses.dataclass class FileObject: uploaded_by:typing.Optional[None]=None def

[issue39247] dataclass defaults and property don't work together

2020-01-10 Thread Juan Arrivillaga
Juan Arrivillaga added the comment: So, after glancing at the source code: https://github.com/python/cpython/blob/ce54519aa09772f4173b8c17410ed77e403f3ebf/Lib/dataclasses.py#L869 During this processing of fields, couldn't you just special case property/descriptor objects? -- nosy

[issue38052] Include sspipe Module with Core Python

2019-09-14 Thread Juan Telleria
Juan Telleria added the comment: And based on previous example, a more "pythonic" syntax would: MyObj = Class \ .method1() \ .f_function1() \ .method2() \ .f_function2(param1 = "A", param2 = .) So that any function preceded by a dot "." becomes a

[issue38052] Include sspipe Module with Core Python

2019-09-13 Thread Juan Telleria
Juan Telleria added the comment: Even if it is not currently mainstream, piping (tidy and readable code, left to right), should be a foundation, not just a module. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38052] Include sspipe Module with Core Python

2019-09-08 Thread Juan Telleria
Juan Telleria added the comment: There was a positive response from package mantainers for this issue :) See: https://github.com/sspipe/sspipe/issues/4 >> is the module mature and stable? I am using this module in my own projects for a while and it satisfies my own requirements. Howe

[issue38052] Include sspipe Module with Core Python

2019-09-07 Thread Juan Telleria
Change by Juan Telleria : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue38052> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38052] Include sspipe Module with Core Python

2019-09-07 Thread Juan Telleria
New submission from Juan Telleria : Could sspipe be included as a Core Python module? https://sspipe.github.io/ https://github.com/sspipe/sspipe https://pypi.org/project/sspipe/ sspipe allows to use syntax such as: from sspipe import p, px import numpy as np import pandas as pd

[issue35655] documentation have wrong info about fibo module examples

2019-01-04 Thread Juan
New submission from Juan : The below sections in modules documentation have wrong information about fibo module: 6. Modules 6.1. More on Modules 6.1.1. Executing modules as scripts 6.3. The dir() Function The name of module is Fibo not fibo and the attributes are fab,fab2 not fib,fib2

[issue33360] ALternative recipe for password using secrets

2018-04-26 Thread Juan Postlbauer
Juan Postlbauer <jpc4...@gmail.com> added the comment: Just a clarification: by "infinite potential loop" I meant a loop that *theoretically* could last forever. Of course in practice it won't, but my experiments show that for the conditions in the example in average the

[issue33364] Conditionals not evaluating propertly

2018-04-26 Thread Juan Enrique Segebre Zaghmout
New submission from Juan Enrique Segebre Zaghmout <juansege...@gmail.com>: The following code generates False when it should generate true: True == False < 20 Either way the order of operation is taken should result in True but the answer still results in False. To further confirm t

[issue33360] ALternative recipe for password using secrets

2018-04-25 Thread Juan Postlbauer
New submission from Juan Postlbauer <jpc4...@gmail.com>: Chapter 15.3.4 shows a recipe with an infinite potential loop. An alternative would be: ''.join(sorted([choice(string.ascii_lowercase) for i in range(1)]+[choice(string.ascii_uppercase) for i in range(1)]+[choice(string.digits)

[issue29616] input() after restarting causes bug

2017-02-22 Thread Juan
Juan added the comment: I am using Windows 10 64-bit. >> sometimes whatever you pressed in step 3 disappears, > > When Shell is restarted by whatever means, any pending input, whether in > response to '>>>' or user input(), is cancelled and > *should* disapp

[issue29616] input() after restarting causes bug

2017-02-22 Thread Juan
Juan added the comment: *doesn't respond to commands. I mean something similar to (not equal) "while(1): pass") -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.py

[issue29616] input() after restarting causes bug

2017-02-22 Thread Juan
Juan added the comment: What I meant was: 1. Open a file whose content is "input()" with IDLE 2. F5 3. Type something but without pressing Enter. 4. Come back to the script (with input() still responding to keystrokes on the input line) 5. F5 6. Bug. (Results vary even on the sa

[issue29616] input() after restarting causes bug

2017-02-21 Thread Juan
New submission from Juan: This bug can be recreated by opening a file whose content is "input()" with IDLE, press F5 and the shell opens as expected. Without making the input in the shell stop, press F5 in the script again. In Python 3.5 IDLE only take input until another F5 (

[issue28336] Slicing (operation) is not symmetrical with respect to suffixes and prefixes

2016-10-01 Thread Juan Carlos Pujol Mainegra
New submission from Juan Carlos Pujol Mainegra: Let s be a string or other array-like object, a, b > 0 integers, s[0:b] returns a b-long prefix to s, the same as s[:b], but s[-a:0] returns empty (for len(s) > 0 and a > 1), while it should return the same as s[-a:], an a-long suffi

[issue25058] Right square bracket argparse metavar

2015-09-10 Thread Juan Jimenez-Anca
New submission from Juan Jimenez-Anca: When trying to assign the metavar in add_argument() method of argparse module I'm unable to include characters after a right square bracket. Trying to set something like this: metavar="[host:database:collection:]field" would raise an Asse

[issue25058] Right square bracket argparse metavar

2015-09-10 Thread Juan Jimenez-Anca
Juan Jimenez-Anca added the comment: My apologies for the formatting of the last line. This is my issue corrected: When trying to assign the metavar in add_argument() method of argparse module I'm unable to include characters after a right square bracket. Trying to set something like

[issue15634] Add serialized decorator to the threading module

2013-10-27 Thread Juan Javier
Juan Javier added the comment: David, I think this doesn't deserve to be part of the library since it is trivial to write and it is just a particular use case. Adding it as an example in the threading module's documentation might be a good idea, what do you think

[issue13785] Make concurrent.futures.Future state public

2013-10-26 Thread Juan Javier
Juan Javier added the comment: Hi Brian, No, no progress on this. I think this is not an interesting feature after all. You can close this. Juan Javier -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13785

[issue15634] Add serialized decorator to the threading module

2013-10-26 Thread Juan Javier
Juan Javier added the comment: It looks like this is not very interesting after all. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15634

[issue13785] Make concurrent.futures.Future state public

2013-10-26 Thread Juan Javier
Changes by Juan Javier jjdomingu...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13785 ___ ___ Python-bugs

[issue18512] sys.stdout.write does not allow bytes in Python 3.x

2013-08-18 Thread Juan Luis Boya García
Juan Luis Boya García added the comment: Sorry for the late response, GMail's SPAM filter ate the replies. The main issue is sys.stdout being opened as text instead of binary. This fact is stated in the docs. http://docs.python.org/3/library/sys.html#sys.stdout In any case, there are some

[issue7263] Fix set.intersection docstring

2012-12-23 Thread Juan Benavente Ponce
Juan Benavente Ponce added the comment: set.intersection and frozenset.intersection docstrings are back to the wrong two-sets-only version in Python 3.3 (Python 2.7 is not affected): intersection(...) Return the intersection of two sets as a new set. (i.e. all elements

[issue7263] Fix set.intersection docstring

2012-12-23 Thread Juan Benavente Ponce
Juan Benavente Ponce added the comment: Comparing the docstrings with the on-line documentation, I have found that, in addition to the already mentioned issue, the fact that many methods only require the first argument to be a set (or frozenset) object is not mentioned anywhere

[issue15634] synchronized decorator for the threading module

2012-08-14 Thread Juan Javier
Juan Javier added the comment: Ok, you are right, serialized is the right name. Also, passing the lock to the decorator will the correct option. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15634

[issue15634] synchronized decorator for the threading module

2012-08-14 Thread Juan Javier
Juan Javier added the comment: What about this? def serialized(lock): def _serialized(func): def __serialized(*args, **kwds): with lock: return func(*args, **kwds) __serialized.__doc__ = func.__doc__ return __serialized return

[issue15634] synchronized decorator for the threading module

2012-08-13 Thread Juan Javier
New submission from Juan Javier: I think it will be useful to have a decorator like this one on the threading module: def synchronized(func): A decorator to make a function execution synchronized. Examples: @synchronized def foo(): pass class Foo: def

[issue13785] Make concurrent.futures.Future state public

2012-07-18 Thread Juan Javier
Changes by Juan Javier jjdomingu...@gmail.com: -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13785 ___ ___ Python

[issue13785] Make concurrent.futures.Future state public

2012-07-18 Thread Juan Javier
Juan Javier jjdomingu...@gmail.com added the comment: I totally agree, I'm going to take a look at the code and I'll write back with some comments. That will be next week, work is currently very demanding. -- status: languishing - open versions: +Python 3.4 -Python 3.3

[issue13785] Make concurrent.futures.Future state public

2012-03-09 Thread Juan Javier
Juan Javier jjdomingu...@gmail.com added the comment: I'm writting an application where users can submit long running jobs and I want to disply a list of those jobs and the state of each one. My idea is to use an executor and use the futures to display information about the jobs: not started

[issue13785] Make concurrent.futures.Future state public

2012-02-29 Thread Juan Javier
Juan Javier jjdomingu...@gmail.com added the comment: The use case is to know the state of a future without having to do something like this @property def state(self): if self.future.running(): return Process.States.Running elif self.future.cancelled

[issue13785] Make concurrent.futures.Future state public

2012-01-15 Thread Juan Javier
Juan Javier jjdomingu...@gmail.com added the comment: Hello, You're right, explaining the difference between CANCELLED and CANCELLED_AND_NOTIFIED is gong to be hard and might be confusing. I also agree that there is no precedent for storing the history of something, and I don't like either

[issue13785] Make concurrent.futures.Future state public

2012-01-14 Thread Juan Javier
New submission from Juan Javier jjdomingu...@gmail.com: Hello, This is a proposal to make the state of Future objects public. The idea is to have access to the current state of the Future using a property instead of calling several methods (done, cancelled, etc.). Also, a history property

[issue12492] Inconsistent Python find() behavior

2011-07-05 Thread Juan Gonzalez
Juan Gonzalez juan.gonza...@ti.com added the comment: Today I tried to use parse() instead of find() and I found out the following response: tony@ubuntu:~/auto/sel/scripts$ python wtfibmdom Traceback (most recent call last): File wtfibmdom, line 22, in module if url.parse(str) 0

[issue12492] Inconsistent Python find() behavior

2011-07-05 Thread Juan Gonzalez
Juan Gonzalez juan.gonza...@ti.com added the comment: Hi Georg, This is the python code listing: from RSS import ns, CollectionChannel, TrackingChannel #Create a tracking channel, which is a data structure that #Indexes RSS data by item URL tc = TrackingChannel() str = 'j3-nspire-prd

[issue12492] Inconsistent Python find() behavior

2011-07-05 Thread Juan Gonzalez
Juan Gonzalez juan.gonza...@ti.com added the comment: I print 1 before the faulty line and like Jesús says I'm surprised I get a 1 Description: Build passed 1 Traceback (most recent call last): File wtfibmdom, line 23, in module if url.find(str) 0: AttributeError: 'int' object has

[issue12492] Inconsistent Python find() behavior

2011-07-04 Thread Juan Gonzalez
New submission from Juan Gonzalez juan.gonza...@ti.com: Something really weird going on in python find() string function. When I call string.find() and python returns -1 it crashes when compared against 0 using the operator. The statement in which crash condition occurs is the following

[issue9733] Can't iterate over multiprocessing.managers.DictProxy

2010-09-01 Thread Juan José Conti
New submission from Juan José Conti jjco...@gmail.com: I expected I could iterate over a DictProxy as I do over a regular dict. from multiprocessing import Manager m = Manager() d = m.dict() d DictProxy object, typeid 'dict' at 0x98a240c for x in d: ... print x ... Traceback (most

[issue6751] Default return value in ConfigParser

2010-08-07 Thread Juan Javier
Juan Javier jjdomingu...@gmail.com added the comment: I would like the method to have the exact same behavior as before if the default argument is not present, and return the given default value when deafult argument is present. If you simply add a default keyword, it will always be present

[issue6751] Default return value in ConfigParser

2010-07-22 Thread Juan Javier
Juan Javier jjdomingu...@gmail.com added the comment: I've applied the enhancement to the three parsers, actually I've made the change to RawconfigParser with a small change to ConfigParser. I've also created some unit tests. -- keywords: +patch Added file: http://bugs.python.org

[issue6751] Default return value in ConfigParser

2010-07-22 Thread Juan Javier
Changes by Juan Javier jjdomingu...@gmail.com: Added file: http://bugs.python.org/file18123/test_cfgparser.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6751

[issue7633] decimal.py: type conversion in context methods

2010-01-29 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: Yeah... I did't like that docstring either :) Removed! Also fixed Decimal.copy_sign, changed Context.copy_sign and added tests. -- Added file: http://bugs.python.org/file16052/issue7633_jjconti4.patch

[issue7633] decimal.py: type conversion in context methods

2010-01-28 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: 1) Agree. Extra checks removed. 2) My mistake. Fixed. 3) Fexed. 4) Methods documentation fixed. Also added examples. 5) Fixed 6) Allow ints in the following unary methods (all except the ones excluded by skrah in cdecimal): - abs - canonical

[issue7633] decimal.py: type conversion in context methods

2010-01-26 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: I've been working in the modified version of my last patch to solve the 6 mentioned points. I'm posting it in less than 24 hs. If you're not hurry, please wait for me. This is just my second patch and is very useful to learn how

[issue7652] Merge C version of decimal into py3k.

2010-01-07 Thread Juan José Conti
Changes by Juan José Conti jjco...@gmail.com: -- nosy: +jjconti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7652 ___ ___ Python-bugs-list

[issue7633] decimal.py: type conversion in context methods

2010-01-06 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: New patch. Fix Context.method that were returning NotImplemented. Decimal.__methods__ don't use raiseit=True in _convert_other so I check in Context.method and raise TypeError if necessary. Added tests for Context.divmod missed in first

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti jjco...@gnu.org added the comment: The same happens with other Context methods, like divide: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. from decimal import * c = getcontext

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: I've been reading http://speleotrove.com/decimal and seems not to be an explicit definition about this. I'm thinking in a patch I could supply tomorrow. What about the idea of changing the implementation from: return a.__add__(b

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: The attached patch solves this issue. Finally, only operand 'a' needs to be converted to Decimal if it's not. I discover this after writing my tests and start the implementation. A Context.method is modified if it has more than one operand

[issue6751] Default return value in ConfigParser

2009-08-21 Thread Juan Javier
New submission from Juan Javier jjdomingu...@yahoo.com: I think it is useful, at least for me, to add an argument, default, to [Safe,Raw]ConfigParser.get that, if present, will be returned if the methid fails to return the value. That is, instead of rasing an exception, return default

[issue3821] trace module bug when using --missing

2008-09-09 Thread Juan Javier
New submission from Juan Javier [EMAIL PROTECTED]: I get the following exception: $ /opt/python3.0b2/bin/python3.0 -m trace -c -m run.py Traceback (most recent call last): File /opt/python3.0b2/lib/python3.0/runpy.py, line 121, in _run_module_as_main __main__, fname, loader, pkg_name

[issue1779] int(- 1) is valud, but float(- 1) isn't. Which is right?

2008-01-19 Thread Juan José Conti
Juan José Conti added the comment: This is my first patch. Bug fix on revision 60076. -- nosy: +jjconti Added file: http://bugs.python.org/file9220/bug_fix_for_1779.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779

[issue1779] int(- 1) is valud, but float(- 1) isn't. Which is right?

2008-01-19 Thread Juan José Conti
Juan José Conti added the comment: The same patch as before plus tests. Added file: http://bugs.python.org/file9228/bug_fix_for_1779-plustests.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779

[issue1720992] automatic imports

2008-01-09 Thread Juan Manuel Borges Caño
Juan Manuel Borges Caño added the comment: Thank you for the link. I think this bug is already closed. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1720992