Skip to content

Commit ac7e15f

Browse files
committed
(only) reserve merge conflicts
2 parents 16b6c88 + a61c446 commit ac7e15f

409 files changed

Lines changed: 32176 additions & 8701 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.git-blame-ignore-revs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# all: Prune trailing whitespace.
2+
dda9b9c6da5d3c31fa8769e581a753e95a270803
3+
4+
# all: Remove the "STATIC" macro and just use "static" instead.
5+
decf8e6a8bb940d5829ca3296790631fcece7b21
6+
7+
# renesas-ra: Fix spelling mistakes found by codespell.
8+
b3f2f18f927fa2fad10daf63d8c391331f5edf58
9+
110
# all: Update Python formatting to ruff-format.
211
bbd8760bd9a2302e5abee29db279102bb11d7732
312

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Documentation issue
2+
description: Report areas of the documentation or examples that need improvement
3+
title: "docs: "
4+
labels: ["documentation"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
This form is for reporting issues with the documentation or examples provided with MicroPython.
10+
11+
If you have a general question \"How Do I ...?\", please post it on [GitHub Discussions](https://github.com/orgs/micropython/discussions/) or [Discord](https://discord.gg/RB8HZSAExQ) instead of here.
12+
- type: checkboxes
13+
id: terms
14+
attributes:
15+
label: Checks
16+
description: |
17+
Before submitting your bug report, please go over these check points:
18+
options:
19+
- label: |
20+
I agree to follow the MicroPython [Code of Conduct](https://github.com/micropython/micropython/blob/master/CODEOFCONDUCT.md) to ensure a safe and respectful space for everyone.
21+
required: true
22+
- label: |
23+
I've searched for [existing issues](https://github.com/micropython/micropython/issues) and didn't find any that matched.
24+
required: true
25+
- type: input
26+
id: page
27+
attributes:
28+
label: Documentation URL
29+
description: |
30+
Does this issue relate to a particular page in the [online documentation](https://docs.micropython.org/en/latest/)? If yes, please paste the URL of the page:
31+
placeholder: |
32+
https://docs.micropython.org/en/latest/
33+
- type: textarea
34+
id: version
35+
attributes:
36+
label: Description
37+
description: |
38+
Please describe what was missing from the documentation and/or what was incorrect/incomplete.
39+
validations:
40+
required: true
41+
- type: markdown
42+
attributes:
43+
value: |
44+
Thanks for taking the time to help improve MicroPython.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Feature request
2+
description: Request a feature or improvement
3+
labels: ['enhancement']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
This form is for requesting features or improvements in MicroPython.
9+
10+
#### Get feedback first
11+
12+
Before submitting a new feature idea here, suggest starting a discussion on [Discord](https://discord.gg/RB8HZSAExQ) or [GitHub Discussions](https://github.com/orgs/micropython/discussions/) to get early feedback from the community and maintainers.
13+
14+
#### Not a MicroPython core feature?
15+
16+
* If you have a question \"How Do I ...?\", please post it on GitHub Discussions or Discord instead of here.
17+
* Could this feature be implemented as a pure Python library? If so, please open the request on the [micropython-lib repository](https://github.com/micropython/micropython-lib/issues) instead.
18+
- type: checkboxes
19+
id: terms
20+
attributes:
21+
label: Checks
22+
description: |
23+
Before submitting your feature request, please go over these check points:
24+
options:
25+
- label: |
26+
I agree to follow the MicroPython [Code of Conduct](https://github.com/micropython/micropython/blob/master/CODEOFCONDUCT.md) to ensure a safe and respectful space for everyone.
27+
required: true
28+
- label: |
29+
I've searched for [existing issues](https://github.com/micropython/micropython/issues) regarding this feature, and didn't find any.
30+
required: true
31+
- type: textarea
32+
id: feature
33+
attributes:
34+
label: Description
35+
description: |
36+
Describe the feature you'd like to see added to MicroPython. What does this feature enable and why is it useful?
37+
38+
* For core Python features, where possible please include a link to the relevant PEP or CPython documentation.
39+
* For new architectures / ports / boards, please provide links to relevant documentation, specifications, and toolchains. Any information about the popularity and unique features about this hardware would also be useful.
40+
* For features for existing ports (e.g. new peripherals or microcontroller features), please describe which port(s) it applies to, and whether this is could be an extension to the machine API or a port-specific module?
41+
* For drivers (e.g. for external hardware), please link to datasheets and/or existing drivers from other sources.
42+
43+
If there is an existing discussion somewhere about this feature, please add a link to it as well.
44+
validations:
45+
required: true
46+
- type: textarea
47+
id: size
48+
attributes:
49+
label: Code Size
50+
description: |
51+
MicroPython aims to strike a balance between functionality and code size. Can this feature be optionally enabled?
52+
53+
If you believe the usefulness of this feature would outweigh the additional code size, please explain. (It's OK to say you're unsure here, we're happy to discuss this with you.)
54+
- type: checkboxes
55+
id: implementation
56+
attributes:
57+
label: Implementation
58+
options:
59+
- label: I intend to implement this feature and would submit a Pull Request if desirable.
60+
- label: I hope the MicroPython maintainers or community will implement this feature.
61+
- label: I would like to [Sponsor](https://github.com/sponsors/micropython#sponsors) development of this feature.
62+
- type: markdown
63+
attributes:
64+
value: |
65+
Thanks for taking the time to suggest improvements for MicroPython.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Security report
2+
description: Report a security issue or vulnerability in MicroPython
3+
labels: ["security"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
This form is for reporting security issues in MicroPython that are not readily exploitable.
9+
10+
1. For issues that are readily exploitable or have high impact, please email contact@micropython.org instead.
11+
1. If this is a question about security, please ask it in [Discussions](https://github.com/orgs/micropython/discussions/) or [Discord](https://discord.gg/RB8HZSAExQ) instead.
12+
- type: checkboxes
13+
id: terms
14+
attributes:
15+
label: Checks
16+
description: |
17+
Before submitting your bug report, please go over these check points:
18+
options:
19+
- label: |
20+
I agree to follow the MicroPython [Code of Conduct](https://github.com/micropython/micropython/blob/master/CODEOFCONDUCT.md) to ensure a safe and respectful space for everyone.
21+
required: true
22+
- label: I wish to report a specific security issue that is **not readily exploitable and does not have high impact** for MicroPython developers or users.
23+
required: true
24+
- label: |
25+
I've searched for [existing issues](https://github.com/micropython/micropython/issues) and didn't find any that matched.
26+
required: true
27+
- type: input
28+
id: port-board-hw
29+
attributes:
30+
label: Port, board and/or hardware
31+
description: |
32+
Which MicroPython port(s) and board(s) are you using?
33+
placeholder: |
34+
esp32 port, ESP32-Duper board.
35+
- type: textarea
36+
id: version
37+
attributes:
38+
label: MicroPython version
39+
description: |
40+
To find the version:
41+
42+
1. Open a serial REPL.
43+
2. Type Ctrl-B to see the startup message.
44+
3. Copy-paste that output here.
45+
46+
If the version or configuration is modified from the official MicroPython releases or the master branch, please tell us the details of this as well.
47+
placeholder: |
48+
MicroPython v6.28.3 on 2029-01-23; PyBoard 9 with STM32F9
49+
- type: textarea
50+
id: report
51+
attributes:
52+
label: Issue Report
53+
description: |
54+
Please provide a clear and concise description of the security issue.
55+
56+
* What does this issue allow an attacker to do?
57+
* How does the attacker exploit this issue?
58+
validations:
59+
required: true

.github/workflows/biome.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: JavaScript code lint and formatting with Biome
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
eslint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Setup Biome
12+
uses: biomejs/setup-biome@v2
13+
with:
14+
version: 1.5.3
15+
- name: Run Biome
16+
run: biome ci --indent-style=space --indent-width=4 tests/ ports/webassembly

.github/workflows/codespell.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Check spelling with codespell
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
codespell:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
# codespell version should be kept in sync with .pre-commit-config.yml
11+
- run: pip install --user codespell==2.2.6 tomli
12+
- run: codespell
13+

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
url = https://github.com/atgreen/libffi
1111
[submodule "lib/berkeley-db-1.xx"]
1212
path = lib/berkeley-db-1.xx
13-
url = https://github.com/pfalcon/berkeley-db-1.xx
13+
url = https://github.com/micropython/berkeley-db-1.xx
1414
[submodule "tools/uf2"]
1515
path = tools/uf2
1616
url = https://github.com/Microsoft/uf2.git
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.. Preamble section inserted into generated output
2+
3+
Positional-only Parameters
4+
--------------------------
5+
6+
To save code size, many functions that accept keyword arguments in CPython only accept positional arguments in MicroPython.
7+
8+
MicroPython marks positional-only parameters in the same way as CPython, by inserting a ``/`` to mark the end of the positional parameters. Any function whose signature ends in ``/`` takes *only* positional arguments. For more details, see `PEP 570 <https://peps.python.org/pep-0570/>`_.
9+
10+
Example
11+
~~~~~~~
12+
13+
For example, in CPython 3.4 this is the signature of the constructor ``socket.socket``::
14+
15+
socket.socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None)
16+
17+
However, the signature documented in :func:`MicroPython<socket.socket>` is::
18+
19+
socket(af=AF_INET, type=SOCK_STREAM, proto=IPPROTO_TCP, /)
20+
21+
The ``/`` at the end of the parameters indicates that they are all positional-only in MicroPython. The following code works in CPython but not in most MicroPython ports::
22+
23+
import socket
24+
s = socket.socket(type=socket.SOCK_DGRAM)
25+
26+
MicroPython will raise an exception::
27+
28+
TypeError: function doesn't take keyword arguments
29+
30+
The following code will work in both CPython and MicroPython::
31+
32+
import socket
33+
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

docs/library/collections.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,31 @@ Classes
3131

3232
- *flag* is optional and can be set to 1 to check for overflow when
3333
adding items. If the deque is full and overflow checking is enabled,
34-
an IndexError will be raised when adding items.
34+
an ``IndexError`` will be raised when adding items.
3535

3636
Deque objects have the following methods:
3737

3838
.. method:: deque.append(x)
3939

4040
Add *x* to the right side of the deque.
41-
Raises IndexError if overflow checking is enabled and there is no more room left.
41+
Raises ``IndexError`` if overflow checking is enabled and there is
42+
no more room in the queue.
4243

4344
.. method:: deque.appendleft(x)
4445

4546
Add *x* to the left side of the deque.
46-
Raises IndexError if overflow checking is enabled and there is no more room left.
47+
Raises ``IndexError`` if overflow checking is enabled and there is
48+
no more room in the queue.
4749

4850
.. method:: deque.pop()
4951

5052
Remove and return an item from the right side of the deque.
51-
Raises IndexError if no items are present.
53+
Raises ``IndexError`` if no items are present.
5254

5355
.. method:: deque.popleft()
5456

5557
Remove and return an item from the left side of the deque.
56-
Raises IndexError if no items are present.
58+
Raises ``IndexError`` if no items are present.
5759

5860
.. method:: deque.extend(iterable)
5961

0 commit comments

Comments
 (0)