pyflyby 1.10.1__cp311-cp311-manylinux_2_24_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyflyby might be problematic. Click here for more details.

Files changed (55) hide show
  1. pyflyby/__init__.py +61 -0
  2. pyflyby/__main__.py +9 -0
  3. pyflyby/_autoimp.py +2229 -0
  4. pyflyby/_cmdline.py +548 -0
  5. pyflyby/_comms.py +221 -0
  6. pyflyby/_dbg.py +1367 -0
  7. pyflyby/_docxref.py +379 -0
  8. pyflyby/_dynimp.py +154 -0
  9. pyflyby/_fast_iter_modules.cpython-311-x86_64-linux-gnu.so +0 -0
  10. pyflyby/_file.py +771 -0
  11. pyflyby/_flags.py +230 -0
  12. pyflyby/_format.py +186 -0
  13. pyflyby/_idents.py +227 -0
  14. pyflyby/_import_sorting.py +165 -0
  15. pyflyby/_importclns.py +658 -0
  16. pyflyby/_importdb.py +680 -0
  17. pyflyby/_imports2s.py +643 -0
  18. pyflyby/_importstmt.py +723 -0
  19. pyflyby/_interactive.py +2113 -0
  20. pyflyby/_livepatch.py +793 -0
  21. pyflyby/_log.py +104 -0
  22. pyflyby/_modules.py +641 -0
  23. pyflyby/_parse.py +1381 -0
  24. pyflyby/_py.py +2166 -0
  25. pyflyby/_saveframe.py +1145 -0
  26. pyflyby/_saveframe_reader.py +471 -0
  27. pyflyby/_util.py +458 -0
  28. pyflyby/_version.py +7 -0
  29. pyflyby/autoimport.py +20 -0
  30. pyflyby/etc/pyflyby/canonical.py +10 -0
  31. pyflyby/etc/pyflyby/common.py +27 -0
  32. pyflyby/etc/pyflyby/forget.py +10 -0
  33. pyflyby/etc/pyflyby/mandatory.py +10 -0
  34. pyflyby/etc/pyflyby/numpy.py +156 -0
  35. pyflyby/etc/pyflyby/std.py +335 -0
  36. pyflyby/importdb.py +19 -0
  37. pyflyby/libexec/pyflyby/colordiff +34 -0
  38. pyflyby/libexec/pyflyby/diff-colorize +148 -0
  39. pyflyby/share/emacs/site-lisp/pyflyby.el +108 -0
  40. pyflyby-1.10.1.data/scripts/collect-exports +76 -0
  41. pyflyby-1.10.1.data/scripts/collect-imports +58 -0
  42. pyflyby-1.10.1.data/scripts/find-import +38 -0
  43. pyflyby-1.10.1.data/scripts/list-bad-xrefs +34 -0
  44. pyflyby-1.10.1.data/scripts/prune-broken-imports +34 -0
  45. pyflyby-1.10.1.data/scripts/pyflyby-diff +34 -0
  46. pyflyby-1.10.1.data/scripts/reformat-imports +27 -0
  47. pyflyby-1.10.1.data/scripts/replace-star-imports +37 -0
  48. pyflyby-1.10.1.data/scripts/saveframe +299 -0
  49. pyflyby-1.10.1.data/scripts/tidy-imports +163 -0
  50. pyflyby-1.10.1.data/scripts/transform-imports +47 -0
  51. pyflyby-1.10.1.dist-info/METADATA +591 -0
  52. pyflyby-1.10.1.dist-info/RECORD +55 -0
  53. pyflyby-1.10.1.dist-info/WHEEL +5 -0
  54. pyflyby-1.10.1.dist-info/entry_points.txt +4 -0
  55. pyflyby-1.10.1.dist-info/licenses/LICENSE.txt +23 -0
@@ -0,0 +1,591 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyflyby
3
+ Version: 1.10.1
4
+ Summary: pyflyby - Python development productivity tools, in particular automatic import management
5
+ Author-Email: Karl Chen <quarl@8166.clguba.z.quarl.org>
6
+ License-Expression: MIT
7
+ License-File: LICENSE.txt
8
+ Classifier: Programming Language :: Python
9
+ Classifier: Topic :: Software Development
10
+ Classifier: Topic :: Software Development :: Code Generators
11
+ Classifier: Topic :: Software Development :: Interpreters
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Project-URL: Homepage, https://pypi.org/project/pyflyby/
15
+ Project-URL: Documentation, https://deshaw.github.io/pyflyby/
16
+ Project-URL: Source, https://github.com/deshaw/pyflyby
17
+ Requires-Python: >=3.9
18
+ Requires-Dist: black
19
+ Requires-Dist: six
20
+ Requires-Dist: tomli; python_version < "3.11"
21
+ Requires-Dist: typing_extensions>=4.6; python_version < "3.12"
22
+ Requires-Dist: prompt_toolkit
23
+ Requires-Dist: platformdirs
24
+ Provides-Extra: test
25
+ Requires-Dist: build; extra == "test"
26
+ Requires-Dist: coverage; extra == "test"
27
+ Requires-Dist: flaky; extra == "test"
28
+ Requires-Dist: hypothesis; extra == "test"
29
+ Requires-Dist: ipykernel>=5.4.3; extra == "test"
30
+ Requires-Dist: ipython; extra == "test"
31
+ Requires-Dist: jupyter; extra == "test"
32
+ Requires-Dist: jupyter_console>=6.2; extra == "test"
33
+ Requires-Dist: notebook<6.1; extra == "test"
34
+ Requires-Dist: pexpect>=3.3; extra == "test"
35
+ Requires-Dist: pytest-cov; extra == "test"
36
+ Requires-Dist: pytest-json-report; extra == "test"
37
+ Requires-Dist: pytest<=8; extra == "test"
38
+ Requires-Dist: requests; extra == "test"
39
+ Requires-Dist: epydoc; extra == "test"
40
+ Requires-Dist: wheel; extra == "test"
41
+ Requires-Dist: setuptools; extra == "test"
42
+ Description-Content-Type: text/x-rst
43
+
44
+ #########
45
+ Pyflyby
46
+ #########
47
+
48
+ .. image:: https://badge.fury.io/py/pyflyby.svg
49
+ :target: https://pypi.org/project/pyflyby/
50
+
51
+ .. image:: https://travis-ci.org/deshaw/pyflyby.png?branch=master
52
+ :target: https://travis-ci.org/deshaw/pyflyby
53
+
54
+ Pyflyby is a set of Python programming productivity tools for Python 3.9+.
55
+
56
+ For command-line interaction:
57
+ * ``py``: command-line multitool
58
+
59
+ For IPython interaction:
60
+ * ``autoimporter``: automatically imports symbols when needed.
61
+
62
+ For editing python source code:
63
+ * ``tidy-imports``: adds missing 'import's, removes unused 'import's,
64
+ and also reformats import blocks.
65
+ * ``find-import``: prints to stdout how to import a particular symbol.
66
+ * ``reformat-imports``: reformats ``import`` blocks
67
+ * ``collect-imports``: prints out all the imports in a given set of files.
68
+ * ``collect-exports``: prints out definitions in a given set of modules,
69
+ in the form of import statements.
70
+ * ``transform-imports``: renames imported modules/functions.
71
+
72
+ `Learn more about Pyflyby <https://www.deshaw.com/library/desco-quansight-improving-jupyter-efficiency>`_ in this blog post.
73
+
74
+ Installation
75
+ ============
76
+
77
+ .. code:: bash
78
+
79
+ $ pip install pyflyby
80
+
81
+ This creates an alias for your `ipython` named `py` which runs the `pyflyby` plug internally.
82
+ `pyflyby` has a dependency on `ipython`, if it isn't already installed do install it with:
83
+
84
+ .. code:: bash
85
+
86
+ $ pip install ipython
87
+
88
+
89
+ Quick start: Autoimporter + IPython
90
+ ===================================
91
+
92
+ .. code:: bash
93
+
94
+ $ py
95
+ In [1]: re.search("[a-z]+", "....hello...").group(0)
96
+ [PYFLYBY] import re
97
+ Out[1]: 'hello'
98
+
99
+ In [2]: chisqprob(arange(5), 2)
100
+ [PYFLYBY] from numpy import arange
101
+ [PYFLYBY] from scipy.stats import chisqprob
102
+ Out[2]: [ 1. 0.6065 0.3679 0.2231 0.1353]
103
+
104
+ To load pyflyby into an existing IPython session as a 1-off:
105
+
106
+ .. code:: bash
107
+
108
+ $ ipython
109
+ In [1]: %load_ext pyflyby
110
+
111
+ To configure IPython/Jupyter Notebook to load pyflyby automatically:
112
+
113
+ .. code:: bash
114
+
115
+ $ py pyflyby.install_in_ipython_config_file
116
+
117
+ or
118
+
119
+ .. code:: bash
120
+
121
+ $ echo 'c.InteractiveShellApp.extensions.append("pyflyby")' \
122
+ >> ~/.ipython/profile_default/ipython_config.py
123
+
124
+ $ ipython
125
+ In [1]: b64decode('aGVsbG8=')
126
+ [PYFLYBY] from base64 import b64decode
127
+ Out[1]: 'hello'
128
+
129
+ Auto importer lazy variables
130
+ ----------------------------
131
+
132
+ It is possible to use the autoimporter to lazily define variables.
133
+
134
+ To use, put the following in your IPython startup files
135
+ (``~/.ipython/profile_default/startup/autoimp.py``), or in your IPython
136
+ configuration file:
137
+
138
+ .. code:: python
139
+
140
+
141
+ from pyflyby import add_import
142
+
143
+ add_import("foo", "foo = 1")
144
+
145
+ add_import(
146
+ "df, data as dd",
147
+ '''
148
+ import pandas as pd
149
+ data = [1,2,3]
150
+ df = pd.DataFrame(data)
151
+ ''')
152
+
153
+
154
+ You can add the keyword ``strict=False`` to not fail if not in IPython or of the
155
+ pyflyby extensions is not loaded.
156
+
157
+
158
+
159
+
160
+ Quick start: ``py`` command-line multi-tool
161
+ ===========================================
162
+
163
+ .. code:: bash
164
+
165
+ $ py b64decode aGVsbG8=
166
+ [PYFLYBY] from base64 import b64decode
167
+ [PYFLYBY] b64decode('aGVsbG8=', altchars=None)
168
+ 'hello'
169
+
170
+ $ py log2 sys.maxint
171
+ [PYFLYBY] from numpy import log2
172
+ [PYFLYBY] import sys
173
+ [PYFLYBY] log2(9223372036854775807)
174
+ 63.0
175
+
176
+ $ py 'plot(cos(arange(30)))'
177
+ [PYFLYBY] from numpy import arange
178
+ [PYFLYBY] from numpy import cos
179
+ [PYFLYBY] from matplotlib.pyplot import plot
180
+ [PYFLYBY] plot(cos(arange(30)))
181
+ <plot>
182
+
183
+ $ py 38497631 / 13951446
184
+ 2.7594007818257693
185
+
186
+ $ py foo.py
187
+
188
+ Quick start: ``tidy-imports``
189
+ =============================
190
+
191
+ To use ``tidy-imports``, just specify the filename(s) to tidy.
192
+
193
+ For example:
194
+
195
+ .. code::
196
+
197
+ $ echo 're.search("[a-z]+", "....hello..."), chisqprob(arange(5), 2)' > foo.py
198
+
199
+ $ tidy-imports foo.py
200
+ --- /tmp/foo.py
201
+ +++ /tmp/foo.py
202
+ @@ -1 +1,9 @@
203
+ +from __future__ import absolute_import, division, with_statement
204
+ +
205
+ +from numpy import arange
206
+ +from scipy.stats import chisqprob
207
+ +import re
208
+ +
209
+ re.search("[a-z]+", "....hello..."), chisqprob(arange(5), 2)
210
+
211
+ Replace /tmp/foo.py? [y/N]
212
+
213
+
214
+ Quick start: import libraries
215
+ =============================
216
+
217
+ Create a file named .pyflyby with lines such as
218
+
219
+ .. code:: python
220
+
221
+ from mypackage.mymodule import MyClass, my_function
222
+ import anotherpackage.anothermodule
223
+
224
+ You can put this file in your home directory or in the same directory as your
225
+ ``*.py`` files.
226
+
227
+
228
+ Details: automatic imports
229
+ ==========================
230
+
231
+ AUTOMATIC IMPORTS - never type "import" again!
232
+
233
+ This module allows your "known imports" to work automatically in your IPython
234
+ interactive session without having to type the 'import' statements (and also
235
+ without having to slow down your Python startup with imports you only use
236
+ occasionally).
237
+
238
+ Example::
239
+
240
+ In [1]: re.search("[a-z]+", "....hello...").group(0)
241
+ [PYFLYBY] import re
242
+ Out[1]: 'hello'
243
+
244
+ In [2]: chisqprob(arange(5), 2)
245
+ [PYFLYBY] from numpy import arange
246
+ [PYFLYBY] from scipy.stats import chisqprob
247
+ Out[2]: [ 1. 0.6065 0.3679 0.2231 0.1353]
248
+
249
+ In [3]: np.sin(arandom(5))
250
+ [PYFLYBY] from numpy.random import random as arandom
251
+ [PYFLYBY] import numpy as np
252
+ Out[3]: [ 0.0282 0.0603 0.4653 0.8371 0.3347]
253
+
254
+ In [4]: isinstance(42, Number)
255
+ [PYFLYBY] from numbers import Number
256
+ Out[4]: True
257
+
258
+
259
+ It just works
260
+ -------------
261
+
262
+ Tab completion works, even on modules that are not yet imported. In the
263
+ following example, notice that numpy is imported when we need to know its
264
+ members, and only then::
265
+
266
+ $ ipython
267
+ In [1]: nump<TAB>
268
+ In [1]: numpy
269
+ In [1]: numpy.arang<TAB>
270
+ [PYFLYBY] import numpy
271
+ In [1]: numpy.arange
272
+
273
+
274
+ The IPython "?" magic help (pinfo/pinfo2) automatically imports symbols first
275
+ if necessary::
276
+
277
+ $ ipython
278
+ In [1]: arange?
279
+ [PYFLYBY] from numpy import arange
280
+ ... Docstring: arange([start,] stop[, step,], dtype=None) ...
281
+
282
+ Other IPython magic commands work as well::
283
+
284
+ $ ipython
285
+ In [1]: %timeit np.cos(pi)
286
+ [PYFLYBY] import numpy as np
287
+ [PYFLYBY] from numpy import pi
288
+ 100000 loops, best of 3: 2.51 us per loop
289
+
290
+ $ echo 'print arange(4)' > foo.py
291
+ $ ipython
292
+ In [1]: %run foo.py
293
+ [PYFLYBY] from numpy import arange
294
+ [0 1 2 3]
295
+
296
+ .. warning::
297
+
298
+ Auto-import on ``Tab`` completion requires IPython 9.3 or newer.
299
+
300
+
301
+ Implementation details
302
+ ----------------------
303
+
304
+ The automatic importing happens at parse time, before code is executed. The
305
+ namespace never contains entries for names that are not yet imported.
306
+
307
+ This method of importing at parse time contrasts with previous implementations
308
+ of automatic importing that use proxy objects. Those implementations using
309
+ proxy objects don't work as well, because it is impossible to make proxy
310
+ objects behave perfectly. For example, ``instance(x, T)`` will return the wrong
311
+ answer if either x or T is a proxy object.
312
+
313
+
314
+ Compatibility
315
+ -------------
316
+
317
+ Tested with:
318
+ - Python 3.9, 3.10, 3.11, 3.12, 3.13
319
+ - IPython 8.18, 8.37.0, 9.4.0 (latest)
320
+ - IPython (text console), IPython Notebook, Spyder
321
+
322
+
323
+ Details: import libraries
324
+ =========================
325
+
326
+ Pyflyby uses "import libraries" that tell how to import a given symbol.
327
+
328
+ An import library file is simply a python source file containing 'import' (or
329
+ 'from ... import ...') lines. These can be generated automatically with
330
+ ``collect-imports`` and ``collect-exports``.
331
+
332
+ Known imports
333
+ -------------
334
+
335
+ Find-imports, ``tidy-imports``, and autoimport consult the database of known
336
+ imports to figure out where to get an import. For example, if the
337
+ imports database contains::
338
+
339
+ from numpy import arange, NaN
340
+
341
+ then when you type the following in IPython::
342
+
343
+ print(arange(10))
344
+
345
+ the autoimporter would automatically execute ``from numpy import arange``.
346
+
347
+ The database can be one file or multiple files. This makes it easy to have
348
+ project-specific known_imports along with global and per-user defaults.
349
+
350
+ The ``PYFLYBY_PATH`` environment variable specifies which files to read.
351
+ This is a colon-separated list of filenames or directory names. The default
352
+ is::
353
+
354
+ PYFLYBY_PATH=/etc/pyflyby:~/.pyflyby:.../.pyflyby
355
+
356
+ If you set::
357
+
358
+ PYFLYBY_PATH=/foo1/bar1:/foo2/bar2
359
+
360
+ then this replaces the default.
361
+
362
+ You can use a hyphen to include the default in the path. If you set::
363
+
364
+ PYFLYBY_PATH=/foo1/bar1:-:/foo2/bar2
365
+
366
+ then this reads ``/foo1/bar1``, then the default locations, then ``/foo2/bar2``.
367
+
368
+ In ``$PYFLYBY_PATH``, ``.../.pyflyby`` (with _three_ dots) means that all ancestor
369
+ directories are searched for a member named ".pyflyby".
370
+
371
+ For example, suppose the following files exist::
372
+
373
+ /etc/pyflyby/stuff.py
374
+ /u/quarl/.pyflyby/blah1.py
375
+ /u/quarl/.pyflyby/more/blah2.py
376
+ /proj/share/mypythonstuff/.pyflyby
377
+ /proj/share/mypythonstuff/foo/bar/.pyflyby/baz.py
378
+ /.pyflyby
379
+
380
+ Further, suppose:
381
+
382
+ * ``/proj`` is on a separate file system from ``/``.
383
+ * ``$HOME=/u/quarl``
384
+
385
+ Then ``tidy-imports /proj/share/mypythonstuff/foo/bar/quux/zot.py`` will by
386
+ default use the following::
387
+
388
+ /etc/pyflyby/stuff.py
389
+ /u/quarl/.pyflyby/blah1.py
390
+ /u/quarl/.pyflyby/more/blah2.py
391
+ /proj/share/mypythonstuff/foo/bar/.pyflyby/baz.py
392
+ /proj/share/mypythonstuff/.pyflyby (a file)
393
+
394
+ .. note::
395
+
396
+ * ``/.pyflyby`` is not included, because traversal stops at file system
397
+ boundaries, and in this example, ``/proj`` is on a different file system than
398
+ ``/``.
399
+ * ``.pyflyby`` (in ``$HOME`` or near the target file) can be a file or a directory.
400
+ If it is a directory, then it is recursively searched for ``*.py`` files.
401
+ * The order usually doesn't matter, but if there are "forget" instructions
402
+ (see below), then the order matters. In the default ``$PYFLYBY_PATH``,
403
+ .../.pyflyby is placed last so that per-directory configuration can
404
+ override per-user configuration, which can override systemwide
405
+ configuration.
406
+
407
+
408
+ Forgetting imports
409
+ ------------------
410
+
411
+ Occasionally you may have reason to tell pyflyby to "forget" entries from the
412
+ database of known imports.
413
+
414
+ You can put the following in any file reachable from ``$PYFLYBY_PATH``::
415
+
416
+ __forget_imports__ = ["from numpy import NaN"]
417
+
418
+ This is useful if you want to use a set of imports maintained by someone else
419
+ except for a few particular imports.
420
+
421
+ Entries in ``$PYFLYBY_PATH`` are processed left-to-right in the order specified,
422
+ so put the files containing these at the end of your ``$PYFLYBY_PATH``. By
423
+ default, ``tidy-imports`` and friends process ``/etc/pyflyby``, then ``~/.pyflyby``,
424
+ then the per-directory ``.pyflyby``.
425
+
426
+
427
+ Mandatory imports
428
+ -----------------
429
+
430
+ Within a certain project you may have a policy to always include certain
431
+ imports. For example, maybe you always want to do ``from __future__ import
432
+ division`` in all files.
433
+
434
+ You can put the following in any file reachable from ``$PYFLYBY_PATH``::
435
+
436
+ __mandatory_imports__ = ["from __future__ import division"]
437
+
438
+ To undo mandatory imports inherited from other ``.pyflyby`` files, use
439
+ ``__forget_imports__`` (see above).
440
+
441
+
442
+ Canonicalize imports
443
+ --------------------
444
+
445
+ Sometimes you want every run of ``tidy-imports`` to automatically rename an import
446
+ to a new name.
447
+
448
+ You can put the following in any file reachable from ``$PYFLYBY_PATH``::
449
+
450
+ __canonical_imports__ = {"oldmodule.oldfunction": "newmodule.newfunction"}
451
+
452
+ This is equivalent to running::
453
+
454
+ tidy-imports --transform=oldmodule.oldfunction=newmodule.newfunction
455
+
456
+
457
+ Soapbox: avoid "star" imports
458
+ =============================
459
+
460
+ When programming in Python, a good software engineering practice is to avoid
461
+ using ``from foopackage import *`` in production code.
462
+
463
+ This style is a maintenance nightmare:
464
+
465
+ * It becomes difficult to figure out where various symbols
466
+ (functions/classes/etc) come from.
467
+
468
+ * It's hard to tell what gets shadowed by what.
469
+
470
+ * When the package changes in trivial ways, your code will be affected.
471
+ Consider the following example: Suppose ``foopackage.py`` contains ``import
472
+ sys``, and ``myprogram.py`` contains ``from foopackage import *; if
473
+ some_condition: sys.exit(0)``. If ``foopackage.py`` changes so that ``import
474
+ sys`` is removed, ``myprogram.py`` is now broken because it's missing ``import
475
+ sys``.
476
+
477
+ To fix such code, you can run ``tidy-imports --replace-star-imports`` to
478
+ automatically replace star imports with the specific needed imports.
479
+
480
+ Per-Project configuration of tidy-imports
481
+ =========================================
482
+
483
+ You can configure Pyflyby on a per-repository basis by using the
484
+ `[tool.pyflyby]` section of `pyproject.toml` files. Pyflyby will look in current
485
+ working directory and all it's parent until it find a `pyproject.toml` file from
486
+ which it will load the defaults.
487
+
488
+
489
+ Most of the long command line flags default values can be configured in this
490
+ section. Simply use the long form option name by replacing dashes `-` by
491
+ underscore `_`. For long option that have the form `--xxx` and `--no-xxx`, you
492
+ can assign a boolean to `xxx`. For example::
493
+
494
+ [tool.pyflyby]
495
+ add_missing=true
496
+ from_spaces=7
497
+ remove_unused=false
498
+
499
+
500
+ Emacs support
501
+ =============
502
+
503
+ * To get a ``M-x tidy-imports`` command in GNU Emacs, add to your ``~/.emacs``::
504
+
505
+ (load "/<site-packages>/pyflyby/share/emacs/site-lisp/pyflyby.el")
506
+
507
+
508
+ - Pyflyby.el doesn't yet work with XEmacs; patches welcome.
509
+
510
+
511
+ saveframe: A utility for debugging / reproducing an issue
512
+ =========================================================
513
+
514
+ PyFlyBy provides a utility named **saveframe** which can be used to save
515
+ information for debugging / reproducing an issue.
516
+
517
+ **Usage**: If you have a piece of code or a script that is failing due an issue
518
+ originating from upstream code, and you cannot share your private code as a reproducer,
519
+ use this utility to save relevant information to a file. Share the generated file with
520
+ the upstream team, enabling them to reproduce and diagnose the issue independently.
521
+
522
+ **Information saved in the file**: This utility captures and saves *error stack frames*
523
+ to a file. It includes the values of local variables from each stack frame, as well
524
+ as metadata about each frame and the exception raised by your code.
525
+
526
+ This utility comes with 2 interfaces:
527
+
528
+ 1. **A function**: For interactive usages such as IPython, Jupyter Notebook, or a
529
+ debugger (pdb/ipdb), use **pyflyby.saveframe** function. To know how to use this
530
+ function, checkout it's documentation:
531
+
532
+ .. code::
533
+
534
+ In [1]: saveframe?
535
+
536
+ 2. **A script**: For cli usages (like a failing script), use **pyflyby/bin/saveframe**
537
+ script. To know how to use this script, checkout its documentation:
538
+
539
+ .. code::
540
+
541
+ $ saveframe --help
542
+
543
+ Authorship
544
+ ==========
545
+
546
+ This plugin was contributed back to the community by the `D. E. Shaw group
547
+ <https://www.deshaw.com/>`_.
548
+
549
+ .. image:: https://www.deshaw.com/assets/logos/blue_logo_417x125.png
550
+ :target: https://www.deshaw.com
551
+ :height: 75 px
552
+
553
+ Pyflyby is written by Karl Chen <quarl@8166.clguba.z.quarl.org>
554
+
555
+ We love contributions! Before you can contribute, please sign and submit this
556
+ `Contributor License Agreement (CLA) <https://www.deshaw.com/oss/cla>`_.
557
+ This CLA is in place to protect all users of this project.
558
+
559
+ License
560
+ =======
561
+
562
+ Pyflyby is released under a very permissive license, the MIT/X11 license; see
563
+ LICENSE.txt.
564
+
565
+
566
+ Release
567
+ =======
568
+
569
+ 1. Check version number in `lib/python/pyflyby/_version.py`, maybe increase it.
570
+ 2. Commit and tag if necessary, and push tags/commits.
571
+ 3. Optional: Set SOURCE_DATE_EPOCH for reproducible build::
572
+
573
+ export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
574
+
575
+ 4. Build the SDIST::
576
+
577
+ python setup.py sdist
578
+
579
+ 5. Optional Repack the Sdist to make sure the ZIP only contain SOURCE_DATE_EPOCH
580
+ date using IPython tools::
581
+
582
+ python ~/dev/ipython/tools/retar.py dist/pyflyby-1.7.8.tar.gz
583
+ shasum -a 256 dist/*
584
+
585
+ 6. Optional, redo 4 & 5 to verify checksum is unchanged.
586
+ 7. Upload using twine::
587
+
588
+ twine upload dist/*
589
+
590
+ 8. Check/update https://github.com/conda-forge/pyflyby-feedstock for new pyflyby
591
+ release on conda-forge
@@ -0,0 +1,55 @@
1
+ pyflyby/__init__.py,sha256=sfTZU9wfNQPpgciMJg8lgtu_YagJflnoB-kjnI33css,2918
2
+ pyflyby/__main__.py,sha256=F_so6X2LPdGUrTWjYvRaTOHHXxCmTGPsp5KcX-Vl6Eo,190
3
+ pyflyby/_autoimp.py,sha256=X_4H74AzGM3gQdYoJ2yCu2p56jfWg15NeAQmF6xIu3c,87748
4
+ pyflyby/_cmdline.py,sha256=a8gNW8M2Pd60UVQcXeb9xyBDB8bM0sq5DFYYzXuzCHk,20890
5
+ pyflyby/_comms.py,sha256=Q3JTbNqkHUw49laMQkFbqCs0FxDy6mi9V2glwdbwfEI,8249
6
+ pyflyby/_dbg.py,sha256=JIyRXYctfmRIqkuBX6Q247q7abWllTeh5i7SxDF_9lc,47023
7
+ pyflyby/_docxref.py,sha256=teYGqDJauLrw6g5mVyXRIl9-q6WuyGjjEj4M8RIkTCU,14117
8
+ pyflyby/_dynimp.py,sha256=y0_RFYAAXOEr8-DYkGfYyFF6z_jkyHZYQXTm40Z54_s,4319
9
+ pyflyby/_fast_iter_modules.cpython-311-x86_64-linux-gnu.so,sha256=XDzuglLvJfVsvvmWAxb6gmsAnGwhSKjDj_QnCjVupDQ,410776
10
+ pyflyby/_file.py,sha256=ooM0StVzbhcpcvJGcsx-asXfe7QG0xfs_N-xUpTaqrQ,24449
11
+ pyflyby/_flags.py,sha256=ln-jkzTAiImrC6VB9ENlfjtlIAJp-b50wgWexfFAURw,7201
12
+ pyflyby/_format.py,sha256=GQu6QwFnVJkqEUlru6eZUpEq8Ym14vcwT7KfUrTdXx4,7038
13
+ pyflyby/_idents.py,sha256=-P-_n15PAIY05rFQ8wEIwblQrCuF4jpJNWQwZYwJvSI,6639
14
+ pyflyby/_import_sorting.py,sha256=msK8Fp9yew1qpVDXinB2fEcsVTcadE0TEbX8TvwbIV0,5756
15
+ pyflyby/_importclns.py,sha256=BB8Zf-XIuQhnW1hMYQXreTNHOsDk7aZlQBYYb2x7bWY,22702
16
+ pyflyby/_importdb.py,sha256=7C7iYVQH_U4S8_NFWt4tPlI4DwiPSWe0-cVeoMIOYWQ,26603
17
+ pyflyby/_imports2s.py,sha256=NFQ1njNIxlCaEjiJBY0F5nUdhdoUiYxhqEpZli4QtCo,24675
18
+ pyflyby/_importstmt.py,sha256=GM4TDdgzuikvtOjGeJ8F7cVI-noTjRjbqj0REt642t4,23794
19
+ pyflyby/_interactive.py,sha256=nyjsM6QaTqhXJDZ153JoQANmAS2hE5bwMbkrOTFFmg8,83743
20
+ pyflyby/_livepatch.py,sha256=4PRwpGwYEKqrwsON-ko7H_skZjcZhHCzepsjjfyOots,29450
21
+ pyflyby/_log.py,sha256=1OcdfahDeT8zP55ZuFE60VreYubTw9VGS2xHUXrZbhg,2860
22
+ pyflyby/_modules.py,sha256=A27seV6hvDOFyL1vGJH_urnPY9Z6qgrp1RE-hk8mFLw,22893
23
+ pyflyby/_parse.py,sha256=UI_PrzegGblOtgGuqZqZ1mYaABSTeVCKrUAaEnPYcEc,49300
24
+ pyflyby/_py.py,sha256=gJ8gngAy0u1yfV8bgey4qsMV8-ZOr_wzCOaGVIUvEQk,80264
25
+ pyflyby/_saveframe.py,sha256=pqWvgAYjIxotNvNxIlSS3hrOOITWkfoz6rifnHUgSUA,45992
26
+ pyflyby/_saveframe_reader.py,sha256=8VDN3W13Tb2D_L7QFdR7u9VwPuNxA8AeRsgzajY-dWI,18548
27
+ pyflyby/_util.py,sha256=I_sYNeJ7buzCAYXTef4nmQ_lWZR5EXZOL3bJoeY6QuQ,13840
28
+ pyflyby/_version.py,sha256=8LHnQQli2xOE9W-IPROE_wivflxsgdYdIhZ3N_Se6ng,160
29
+ pyflyby/autoimport.py,sha256=GsdvaAmsVepkrR9vHtRkdXVrAqQoCG1OrOxUVOkuFc0,487
30
+ pyflyby/importdb.py,sha256=ClY6LeBuWcPGuia3S05JDlbQQyl79D3QoGy_ciUWSDk,494
31
+ pyflyby/etc/pyflyby/canonical.py,sha256=AEkiB4K19Pw4eKCns5dhnFXMmOJnRuwmly9RYihUwXM,270
32
+ pyflyby/etc/pyflyby/common.py,sha256=N1o3hkdjRH5qcu-HrgseThCF6olu1Yny53wlvZUR54c,597
33
+ pyflyby/etc/pyflyby/forget.py,sha256=N0xucS19eeoSS-BKXUI4bgwYrk4yWBOX3cVY0EC4KQE,369
34
+ pyflyby/etc/pyflyby/mandatory.py,sha256=-E52J_y2-Xu-YOHzoXiGVlCXcZqkEK4abVv7dQSNSgY,352
35
+ pyflyby/etc/pyflyby/numpy.py,sha256=LtAWlytttnw72IcA20z327rdRi_P3dXnRbb41mWJ0K0,10469
36
+ pyflyby/etc/pyflyby/std.py,sha256=pDFU6DDwZZLYD4itkimTI0fljsp4C4EO8fj5_wW21Vo,17596
37
+ pyflyby/libexec/pyflyby/colordiff,sha256=TqnG5jATcv9qU2HTuq2mQmb9m_jAjUfNQ4VIUnu5cK8,949
38
+ pyflyby/libexec/pyflyby/diff-colorize,sha256=S6wfKHEafQ9DFqiDvnnd70lrS71n1r1Tm9o2-FwxFgQ,5578
39
+ pyflyby/share/emacs/site-lisp/pyflyby.el,sha256=iKXqFc7kAweJ_TwQUhV3G-SxABme_Idk-iCwzLTmbbY,4122
40
+ pyflyby-1.10.1.data/scripts/collect-exports,sha256=AqGNj2BuIK8RpqLCZJ5Rokqj1Kk4nJYcw9aKFkb96OI,2863
41
+ pyflyby-1.10.1.data/scripts/collect-imports,sha256=8is1rLKRq-1mnyx3pDD7uBKEZt9C1sE1kWlyqpm2YaA,2141
42
+ pyflyby-1.10.1.data/scripts/find-import,sha256=_EmUDFQXCv_2tx79OyWBzdTKm_d8umVW7RY06jspYCE,932
43
+ pyflyby-1.10.1.data/scripts/list-bad-xrefs,sha256=57krqCqA63LIt6C0YGbE_F4eZYYr5F8qE-eg_DNMgRc,1027
44
+ pyflyby-1.10.1.data/scripts/prune-broken-imports,sha256=Wt2G8jTrVQKexUjqblrL5TXQfgRH3edctYukIBNZUVU,861
45
+ pyflyby-1.10.1.data/scripts/pyflyby-diff,sha256=TqnG5jATcv9qU2HTuq2mQmb9m_jAjUfNQ4VIUnu5cK8,949
46
+ pyflyby-1.10.1.data/scripts/reformat-imports,sha256=PIT4kqE_1HenKvtDSpmyH386Ht5HvT1JlWjSb5mja8w,690
47
+ pyflyby-1.10.1.data/scripts/replace-star-imports,sha256=7P8KbCX4K5cc6F-TT4KfGVeWkI0KWK38be8IRRyZfU8,913
48
+ pyflyby-1.10.1.data/scripts/saveframe,sha256=bqU58kNDConm51zTpM3J37c-uhlDo-Uj8fOQ-rnYhwM,12074
49
+ pyflyby-1.10.1.data/scripts/tidy-imports,sha256=OcI1ghA0hn6JPkL7U-8I57db5HvP2P0jsmNsMZhHr_A,6686
50
+ pyflyby-1.10.1.data/scripts/transform-imports,sha256=IAMZTrHsZO5aRwF1exXGPhfL6UawUzJZmSl87K65elY,1450
51
+ pyflyby-1.10.1.dist-info/METADATA,sha256=U67-2QqjcCEeXYsoBGwD50HDIArLDwjIPKFoOUtNZag,17628
52
+ pyflyby-1.10.1.dist-info/WHEEL,sha256=e-oFlY3eLJQVVkSrz9ixwUyvzXafqjrUD6YYCD18aKo,99
53
+ pyflyby-1.10.1.dist-info/entry_points.txt,sha256=aGXu4O2RcVf2hy1daq-edciSegKffMs7GDat7G-2p3k,70
54
+ pyflyby-1.10.1.dist-info/RECORD,,
55
+ pyflyby-1.10.1.dist-info/licenses/LICENSE.txt,sha256=cSDlWua5QEFNdBRChGEKcS_5ABQ2220A3OkP10Q9RA0,1188
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: meson
3
+ Root-Is-Purelib: false
4
+ Tag: cp311-cp311-manylinux_2_24_x86_64
5
+
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ py = pyflyby._py:py_main
3
+ py3 = pyflyby._py:py_main
4
+
@@ -0,0 +1,23 @@
1
+ Pyflyby: Copyright (c) 2011, 2012, 2013, 2014, 2015 Karl Chen
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
20
+
21
+
22
+ Docxref.py includes code derived from Epydoc, which is also distributed under
23
+ the same MIT license.