Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [3.9] bpo-41052: Opt out serialization/deserialization for _random.Random ↵ | Dong-hee Na | 2020-06-21 | 1 | -0/+10 |
| | | | | | | | (GH-21002). (GH-21030) (cherry picked from commit 6989af0bc7ea1e9a1acea16794e6f723d7b44110) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> | ||||
* | bpo-40541: Add optional *counts* parameter to random.sample() (GH-19970) | Raymond Hettinger | 2020-05-08 | 1 | -1/+72 |
| | |||||
* | bpo-40465: Deprecate the optional argument to random.shuffle(). (#19867) | Raymond Hettinger | 2020-05-02 | 1 | -1/+2 |
| | |||||
* | Simplify choice()'s interaction with the private _randbelow() method (GH-19831) | Raymond Hettinger | 2020-05-01 | 1 | -3/+3 |
| | |||||
* | bpo-40325: Deprecate set object support in random.sample() (GH-19591) | Raymond Hettinger | 2020-04-19 | 1 | -1/+5 |
| | |||||
* | bpo-40286: Makes simpler the relation between randbytes() and getrandbits() ↵ | Serhiy Storchaka | 2020-04-17 | 1 | -4/+20 |
| | | | | (GH-19574) | ||||
* | bpo-40282: Allow random.getrandbits(0) (GH-19539) | Antoine Pitrou | 2020-04-17 | 1 | -40/+29 |
| | |||||
* | bpo-40286: Add randbytes() method to random.Random (GH-19527) | Victor Stinner | 2020-04-17 | 1 | -0/+51 |
| | | | | | | | | | | | | Add random.randbytes() function and random.Random.randbytes() method to generate random bytes. Modify secrets.token_bytes() to use SystemRandom.randbytes() rather than calling directly os.urandom(). Rename also genrand_int32() to genrand_uint32(), since it returns an unsigned 32-bit integer, not a signed integer. The _random module is now built with Py_BUILD_CORE_MODULE defined. | ||||
* | bpo-40094: Add test.support.wait_process() (GH-19254) | Victor Stinner | 2020-03-31 | 1 | -2/+1 |
| | | | | | | | | | Moreover, the following tests now check the child process exit code: * test_os.PtyTests * test_mailbox.test_lock_conflict() * test_tempfile.test_process_awareness() * test_uuid.testIssue8621() * multiprocessing resource tracker tests | ||||
* | bpo-38075: Fix random_seed(): use PyObject_CallOneArg() (GH-18897) | Victor Stinner | 2020-03-10 | 1 | -1/+1 |
| | | | | | | Fix the random.Random.seed() method when a bool is passed as the seed. PyObject_Vectorcall() was misused: use PyObject_CallOneArg() instead. | ||||
* | bpo-38881: choices() raises ValueError when all weights are zero (GH-17362) | Raymond Hettinger | 2019-11-23 | 1 | -0/+5 |
| | |||||
* | bpo-38120: Fix DeprecationWarning in test_random for invalid type of ↵ | Xtreak | 2019-09-12 | 1 | -3/+9 |
| | | | | arguments to random.seed. (GH-15987) | ||||
* | Fix typos in docs, comments and test assert messages (#14872) | Min ho Kim | 2019-07-21 | 1 | -1/+1 |
| | |||||
* | bpo-36766: Typos in docs and code comments (GH-13116) | penguindustin | 2019-05-06 | 1 | -1/+1 |
| | |||||
* | bpo-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929) | Serhiy Storchaka | 2019-03-05 | 1 | -3/+2 |
| | |||||
* | bpo-30561: Sync-up expovariate() and gammavariate code (GH-1934) | leodema | 2018-12-24 | 1 | -11/+31 |
| | |||||
* | bpo-24567: Random subnormal.diff (#7954) | Raymond Hettinger | 2018-06-27 | 1 | -0/+8 |
| | | | | | Handle subnormal weights for choices() | ||||
* | bpo-33144: Fix choosing random.Random._randbelow implementation. (GH-6563) | Serhiy Storchaka | 2018-05-08 | 1 | -14/+64 |
| | | | | random() takes precedence over getrandbits() if defined later in the class tree. | ||||
* | bpo-33144: random.Random and subclasses: split _randbelow implementation ↵ | Wolfgang Maier | 2018-04-17 | 1 | -15/+65 |
| | | | | (GH-6291) | ||||
* | bpo-33203: Ensure random.choice always raises IndexError on empty sequence ↵ | Wolfgang Maier | 2018-04-05 | 1 | -1/+4 |
| | | | | | | (GH-6338) | ||||
* | bpo-32297: Few misspellings found in Python source code comments. (#4803) | Mike | 2017-12-14 | 1 | -1/+1 |
| | | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py | ||||
* | bpo-31478: Fix an assertion failure in random.seed() in case a seed has a ↵ | Oren Milman | 2017-09-28 | 1 | -0/+11 |
| | | | | bad __abs__() method. (#3596) | ||||
* | bpo-31482: Missing bytes support for random.seed() version 1 (#3614) | Raymond Hettinger | 2017-09-17 | 1 | -0/+27 |
| | | | bpo-31482: Missing bytes support for random.seed() version 1 #3614 | ||||
* | bpo-31160: Fix test_random for zombie process (#3045) | Victor Stinner | 2017-08-09 | 1 | -1/+7 |
| | | | | TestModule.test_after_fork() now calls os.waitpid() to read the exit status of the child process to avoid creating a zombie process. | ||||
* | bpo-16500: Allow registering at-fork handlers (#1715) | Antoine Pitrou | 2017-05-27 | 1 | -0/+19 |
| | | | | | | | | | | | | * bpo-16500: Allow registering at-fork handlers * Address Serhiy's comments * Add doc for new C API * Add doc for new Python-facing function * Add NEWS entry + doc nit | ||||
* | bpo-30308: Code coverage for argument in random.shuffle (#1504) | csabella | 2017-05-11 | 1 | -1/+11 |
| | | | | | | | | * bpo-30308: Code coverage for argument in random.shuffle * bpo-30308: Code coverage for argument in random.shuffle * bpo-30308: Code coverage for argument in random.shuffle | ||||
* | bpo-29960 _random.Random corrupted on exception in setstate(). (#1019) | bladebryan | 2017-04-22 | 1 | -0/+5 |
| | |||||
* | merge | Raymond Hettinger | 2016-11-21 | 1 | -1/+1 |
|\ | |||||
| * | Issue #28743: Reduce memory consumption for random module tests | Raymond Hettinger | 2016-11-21 | 1 | -1/+1 |
| | | |||||
* | | merge | Raymond Hettinger | 2016-11-21 | 1 | -0/+1 |
|\ \ | |/ | |||||
| * | Issue 28475: Improve error message for random.sample() with k < 0. ↵ | Raymond Hettinger | 2016-11-21 | 1 | -0/+1 |
| | | | | | | | | (Contributed by Francisco Couzo). | ||||
* | | merge | Raymond Hettinger | 2016-11-13 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Fix typos | Raymond Hettinger | 2016-11-13 | 1 | -1/+1 |
| | | |||||
* | | merge | Raymond Hettinger | 2016-10-30 | 1 | -0/+17 |
|\ \ | |/ | |||||
| * | Issue #18844: Strengthen tests to include a case with unequal weighting | Raymond Hettinger | 2016-10-30 | 1 | -0/+17 |
| | | |||||
* | | merge | Raymond Hettinger | 2016-10-29 | 1 | -0/+16 |
|\ \ | |/ | |||||
| * | Issue #18844: Make the various ways for specifing weights produce the same ↵ | Raymond Hettinger | 2016-10-29 | 1 | -0/+16 |
| | | | | | | | | results. | ||||
* | | Close #28476: Reuse math.factorial() in test_random | Victor Stinner | 2016-10-19 | 1 | -5/+1 |
|/ | | | | Patch written by Francisco Couzo. | ||||
* | Issue #18844: Add more tests | Raymond Hettinger | 2016-10-14 | 1 | -0/+14 |
| | |||||
* | Issue #18844: Fix-up examples for random.choices(). Remove over-specified ↵ | Raymond Hettinger | 2016-10-12 | 1 | -4/+0 |
| | | | | test. | ||||
* | Issue #18844: Make the number of selections a keyword-only argument for ↵ | Raymond Hettinger | 2016-09-27 | 1 | -21/+21 |
| | | | | random.choices(). | ||||
* | Rename weighted_choices() to just choices() | Raymond Hettinger | 2016-09-07 | 1 | -27/+27 |
| | |||||
* | Issue #18844: Add random.weighted_choices() | Raymond Hettinger | 2016-09-07 | 1 | -0/+68 |
| | |||||
* | Issue #27706: Fix regression in random.seed(somestr, version=1) | Raymond Hettinger | 2016-08-31 | 1 | -0/+18 |
| | |||||
* | Issue #27171: Fix typos in documentation, comments, and test function names | Martin Panter | 2016-06-02 | 1 | -1/+1 |
| | |||||
* | Issue #24620: Random.setstate() now validates the value of state last element. | Serhiy Storchaka | 2015-07-24 | 1 | -0/+5 |
| | |||||
* | Issue #22777: Test pickling with all protocols. | Serhiy Storchaka | 2014-12-15 | 1 | -6/+8 |
| | |||||
* | Issue 13355: Make random.triangular degrade gracefully when low == high. | Raymond Hettinger | 2014-05-26 | 1 | -1/+1 |
| | |||||
* | Issue #19936: Added executable bits or shebang lines to Python scripts which | Serhiy Storchaka | 2014-01-16 | 1 | -2/+0 |
|\ | | | | | | | | | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface. Fixed shebang lines in the unittestgui and checkpip scripts. | ||||
| * | Issue #19936: Added executable bits or shebang lines to Python scripts which | Serhiy Storchaka | 2014-01-16 | 1 | -2/+0 |
| | | | | | | | | | | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface. Fixed shebang line to use python3 executable in the unittestgui script. |